-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: migrate to eslint and upgrade dependencies
- Loading branch information
1 parent
99f0135
commit 3787a57
Showing
15 changed files
with
4,640 additions
and
7,381 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"ignorePatterns": ["coverage", "node_modules", "dist"], | ||
"env": { | ||
"browser": true, | ||
"es2020": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:import/typescript", | ||
"plugin:prettier/recommended" | ||
], | ||
"rules": { | ||
"semi": ["warn", "always"], | ||
"complexity": ["error", 25], | ||
"curly": ["error", "all"], | ||
"no-restricted-syntax": ["error", "LabeledStatement", "WithStatement"], | ||
"no-implicit-coercion": ["error", { "boolean": false }], | ||
"no-new-wrappers": ["error"], | ||
"no-new-object": ["error"], | ||
"new-cap": ["error", { "newIsCap": false, "capIsNew": false }], | ||
"no-array-constructor": ["error"], | ||
"max-params": ["error", 5], | ||
"max-lines": ["error", 500], | ||
"max-statements": ["error", 50], | ||
"one-var": ["error", "never"], | ||
"max-nested-callbacks": ["error", 3], | ||
"no-negated-condition": "error", | ||
"no-case-declarations": 0, | ||
"class-methods-use-this": 0, | ||
"no-param-reassign": 0, | ||
"no-use-before-define": 0, | ||
"no-plusplus": 0, | ||
"no-console": 0, | ||
"prefer-destructuring": 0, | ||
"consistent-return": 0, | ||
"guard-for-in": 0, | ||
"max-classes-per-file": 0, | ||
|
||
"prettier/prettier": "warn", | ||
"import/order": "warn", | ||
"import/prefer-default-export": 0, | ||
"import/no-unresolved": 0, | ||
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": true }], | ||
"@typescript-eslint/no-inferrable-types": 0, | ||
"@typescript-eslint/ban-types": 0, | ||
"@typescript-eslint/explicit-module-boundary-types": 0, | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/no-unused-vars": 0 | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["webpack.config.js"], | ||
"env": { | ||
"browser": false, | ||
"node": true | ||
} | ||
}, | ||
{ | ||
"files": ["src/**/*.spec.ts"], | ||
"env": { | ||
"jest": true | ||
}, | ||
"rules": { | ||
"@typescript-eslint/unbound-method": 0, | ||
"@typescript-eslint/no-empty-function": 0, | ||
"max-lines": ["error", 1200] | ||
} | ||
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.5.0' | ||
|
||
- name: Install | ||
run: yarn install | ||
|
||
- name: Run Tests | ||
run: yarn test | ||
- name: Submit coverage | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/dist | ||
.DS_Store | ||
/.rpt2_cache | ||
yarn-error.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.