Skip to content

Commit

Permalink
chore (scaffolding): First commit. Firebase project established.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdbroughton committed May 11, 2022
1 parent f10ba49 commit 0b44705
Show file tree
Hide file tree
Showing 22 changed files with 9,956 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": [
"plugin:json/recommended",
"./configuration/jsonDefaults.json",
"./node_modules/gts/",
"./configuration/esLintDefaults.json",
"eslint-config-prettier",
"plugin:prettier/recommended"
],
"plugins": [
"json",
"eslint-plugin-prettier"
]
}
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "jsdb-rimshot"
}
}
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
**/node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
24 changes: 24 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": ["source.organizeImports", "source.fixAll"],
"editor.formatOnSave": true,
"eslint.options": {
"extensions": [".html", ".js", ".vue", ".jsx", ".ts"]
},
"eslint.validate": [
"javascript",
"vue",
"html",
"typescriptvue",
"typescript"
],
"eslint.workingDirectories": ["./client"],
"typescript.preferences.quoteStyle": "single",
"javascript.suggest.autoImports": true,
"typescript.suggest.autoImports": true,
"typescript.preferences.importModuleSpecifier": "non-relative",
"javascript.preferences.importModuleSpecifier": "non-relative",
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};
19 changes: 19 additions & 0 deletions configuration/esLintDefaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"document": false,
"window": false
},
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false
},
"rules": {
"node/no-unpublished-require": "off",
"node/no-unsupported-features/es-syntax": "off",
"quote-props": [
"error",
"as-needed"
]
}
}
11 changes: 11 additions & 0 deletions configuration/jsonDefaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"overrides": [
{
"files": "**/*.json",
"rules": {
"json/duplicate-key": "error",
"no-multiple-empty-lines": [2, { "max": 0, "maxBOF": 0, "maxEOF": 0 }]
}
}
]
}
8 changes: 8 additions & 0 deletions configuration/prettierDefaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["plugin:prettier/recommended"],
"bracketSpacing": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"singleQuote": true
}
46 changes: 46 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"emulators": {
"auth": {
"port": 9099
},
"firestore": {
"port": 8080
},
"functions": {
"port": 5001
},
"hosting": {
"port": 5000
},
"storage": {
"port": 9199
},
"ui": {
"enabled": true
}
},
"firestore": {
"indexes": "firestore.indexes.json",
"rules": "firestore.rules"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
},
"hosting": {
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"predeploy": "cd topics/ui && npm run build",
"public": "topics/ui/dist",
"rewrites": [
{
"destination": "/index.html",
"source": "**"
}
]
},
"storage": {
"rules": "storage.rules"
}
}
4 changes: 4 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"indexes": [],
"fieldOverrides": []
}
8 changes: 8 additions & 0 deletions firestore.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if false;
}
}
}
Loading

0 comments on commit 0b44705

Please sign in to comment.