diff --git a/.commitlintrc.json b/.commitlintrc.json new file mode 100644 index 00000000..be41cebd --- /dev/null +++ b/.commitlintrc.json @@ -0,0 +1,28 @@ +{ + "extends": ["@commitlint/config-angular"], + "rules": { + "subject-case": [ + 2, + "always", + ["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"] + ], + "type-enum": [ + 2, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test", + "sample" + ] + ] + } +} diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 464954bf..7996ad76 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.7' +version: "3.7" services: nginx: image: nginx:1.21.0-alpine diff --git a/.dockerignore b/.dockerignore index 792bd1c6..d4196008 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,9 +4,10 @@ .github +.vscode + node_modules scripts test - diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..c4b7c77f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# editorconfig.org +root = true + +[*] +end_of_line = lf +indent_style = tab +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +indent_size = 4 + +[*.{yaml,yml}] +indent_style = space +indent_size = 2 + +[*.md] +indent_style = space +trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..0979a6c0 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +**/node_modules/** diff --git a/.eslintrc.js b/.eslintrc.js index dbd3c588..6e46d654 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,97 +1,116 @@ -/* eslint-disable */ module.exports = { root: true, env: { - node: true + node: true, + jest: true }, extends: [ - "airbnb-base", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended" + 'airbnb-base', + 'plugin:import/errors', + 'plugin:import/warnings', + 'plugin:import/typescript', + 'plugin:@typescript-eslint/recommended', + 'plugin:prettier/recommended', + 'prettier' ], - parser: "@typescript-eslint/parser", + parser: '@typescript-eslint/parser', parserOptions: { project: ['./typescript/tsconfig.eslint.json'], - sourceType: "module", + sourceType: 'module', tsconfigRootDir: __dirname }, globals: { - Atomics: "readonly", - SharedArrayBuffer: "readonly" + Atomics: 'readonly', + SharedArrayBuffer: 'readonly' }, - plugins: [ - "import", - "@typescript-eslint", - "prettier" - ], + plugins: ['import', '@typescript-eslint', '@typescript-eslint/eslint-plugin', 'prettier'], rules: { - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/naming-convention": [ - "error", + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/naming-convention': [ + 'error', + { + selector: 'interface', + format: ['PascalCase'], + prefix: ['I'] + } + ], + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + 'ts-ignore': false + } + ], + '@typescript-eslint/ban-types': ['off'], + '@typescript-eslint/indent': ['error', 'tab'], + '@typescript-eslint/semi': ['error'], + '@typescript-eslint/consistent-type-imports': ['warn'], + '@typescript-eslint/no-inferrable-types': [ + 'error', + { + ignoreParameters: true + } + ], + 'import/extensions': [ + 'error', + 'ignorePackages', { - "selector": "interface", - "format": ["PascalCase"], - "prefix": ["I"] + js: 'never', + ts: 'never' } ], - "@typescript-eslint/ban-ts-comment": ["error", { - "ts-ignore": false - }], - "@typescript-eslint/ban-types": ["off"], - "@typescript-eslint/indent": ["error", "tab"], - "@typescript-eslint/semi": ["error"], - "@typescript-eslint/consistent-type-imports": ["warn"], - "import/extensions": ["error", "ignorePackages", { - "js": "never", - "ts": "never" - }], - "import/prefer-default-export": "off", - "import/no-extraneous-dependencies": ["off"], - "import/no-cycle": ["off"], - "no-restricted-syntax": ["error", "WithStatement"], - "class-methods-use-this": "off", - "linebreak-style": ["error", "unix"], - "comma-dangle": ["error", "never"], - "no-param-reassign": ["error", { - "props": false - }], - "no-dupe-class-members": "off", - "no-await-in-loop": "off", - "arrow-parens": "off", - "no-continue": "off", - "no-tabs": ["error", { - "allowIndentationTabs": true - }], - "indent": "off", - "eol-last": ["off"], - "max-len": ["error", { "code": 150 }], - "no-shadow": "off", - "function-paren-newline": "off", - "consistent-return": "off", - "no-useless-return": "off", - "no-useless-constructor": "off", - "prettier/prettier": ["error", { - "parser": "typescript", - "trailingComma": "none", - "printWidth": 120, - "useTabs": true, - "tabWidth": 2, - "bracketSpacing": true, - "singleQuote": true, - "semi": true, - "arrowParens": "avoid", - "endOfLine": "auto" - }] + 'import/prefer-default-export': 'off', + 'import/no-extraneous-dependencies': 'off', + 'import/no-cycle': ['off'], + 'no-restricted-syntax': ['error', 'WithStatement'], + 'class-methods-use-this': 'off', + 'linebreak-style': ['error', 'unix'], + 'comma-dangle': ['error', 'never'], + 'no-param-reassign': [ + 'error', + { + props: false + } + ], + 'no-dupe-class-members': 'off', + 'no-await-in-loop': 'off', + 'arrow-parens': 'off', + 'no-continue': 'off', + 'no-tabs': [ + 'error', + { + allowIndentationTabs: true + } + ], + indent: 'off', + 'eol-last': ['off'], + 'max-len': ['error', { code: 150 }], + 'no-shadow': 'off', + 'function-paren-newline': 'off', + 'consistent-return': 'off', + 'no-useless-return': 'off', + 'no-useless-constructor': 'off', + 'prettier/prettier': [ + 'error', + { + parser: 'typescript', + trailingComma: 'none', + printWidth: 120, + useTabs: true, + tabWidth: 2, + bracketSpacing: true, + singleQuote: true, + semi: true, + arrowParens: 'avoid', + endOfLine: 'auto' + } + ] }, overrides: [ { - files: ["{apps,packages}/*/test/**/*.test.ts"], + files: ['{apps,packages}/*/test/**/*.test.ts'], env: { jest: true } } ] -} +}; diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..65be1805 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +yarn.lock -diff -merge +yarn.lock linguist-generated=true +* text eol=lf diff --git a/.github/husky/commit-msg b/.github/husky/commit-msg new file mode 100644 index 00000000..90d2db91 --- /dev/null +++ b/.github/husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx commitlint -c .commitlintrc.json --edit $HUSKY_GIT_PARAMS diff --git a/.github/husky/pre-commit b/.github/husky/pre-commit new file mode 100644 index 00000000..36af2198 --- /dev/null +++ b/.github/husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx lint-staged diff --git a/.github/husky/pre-push b/.github/husky/pre-push index 65053c08..5f2360af 100644 --- a/.github/husky/pre-push +++ b/.github/husky/pre-push @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -yarn run test \ No newline at end of file +yarn run test diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index 40b69276..00000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Always validate the PR title AND all the commits -titleAndCommits: true -# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") -# this is only relevant when using commitsOnly: true (or titleAndCommits: true) -allowMergeCommits: true diff --git a/.github/workflows/CI.yml b/.github/workflows/continuous-integration.yml similarity index 77% rename from .github/workflows/CI.yml rename to .github/workflows/continuous-integration.yml index 5adc01ca..0eeacf7a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,17 +1,18 @@ -name: CI +name: Continuous Integration on: push: branches: - main - release/* + - develop paths-ignore: - - '.dockerignore' - - '.github/**' - - '.vscode/**' - - '.gitignore' - - 'LICENSE' - - '**.md' + - "**.md" + - ".github/**" + - ".vscode/**" + - .dockerignore + - .gitignore + - LICENSE pull_request: branches: - main @@ -57,6 +58,11 @@ jobs: run: | yarn yarn build - yarn test + yarn test --coverage env: CI: true + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/sentry-deployment.yml b/.github/workflows/sentry-deployment.yml new file mode 100644 index 00000000..1e4bfce4 --- /dev/null +++ b/.github/workflows/sentry-deployment.yml @@ -0,0 +1,23 @@ +name: Sentry Deployment + +on: + push: + branches: + - main + +jobs: + sentryDeploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create a Sentry release + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + with: + tagName: ${{ github.sha }} + environment: production diff --git a/.gitignore b/.gitignore index 3233cd1f..03ad5ed8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,15 +9,14 @@ yarn-debug.log* yarn-error.log* lerna-debug.log* +# Tests +/coverage # 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 @@ -26,6 +25,8 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Dependency directories node_modules/ +apps/*/node_modules/ +packages/*/node_modules/ jspm_packages/ .github/husky/_ @@ -44,10 +45,6 @@ jspm_packages/ # Yarn Integrity file .yarn-integrity -# dotenv environment variables file -.env -*.env - # TypeScript cache *.tsbuildinfo @@ -61,3 +58,12 @@ sw.* apps/*/lib packages/*/lib .nuxt + +# IDEs and editors +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..b58b603f --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/Miko.iml b/.idea/Miko.iml new file mode 100644 index 00000000..9953237a --- /dev/null +++ b/.idea/Miko.iml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 00000000..59947d94 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,65 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 00000000..79ee123c --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 00000000..cd711a0e --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 00000000..ba54d02c --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/.idea/jsLinters/eslint.xml b/.idea/jsLinters/eslint.xml new file mode 100644 index 00000000..88b7ee8f --- /dev/null +++ b/.idea/jsLinters/eslint.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/kubernetes-settings.xml b/.idea/kubernetes-settings.xml new file mode 100644 index 00000000..c6f754aa --- /dev/null +++ b/.idea/kubernetes-settings.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..a39490e9 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..d926d452 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations/_BOT__Start.xml b/.idea/runConfigurations/_BOT__Start.xml new file mode 100644 index 00000000..2bf6edeb --- /dev/null +++ b/.idea/runConfigurations/_BOT__Start.xml @@ -0,0 +1,16 @@ + + + + + + - diff --git a/apps/web/app/pages/commands.vue b/apps/web/app/pages/commands.vue index ec9a1a46..53a39b48 100644 --- a/apps/web/app/pages/commands.vue +++ b/apps/web/app/pages/commands.vue @@ -1,7 +1,7 @@