-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ESLint to project * Change name of JavaScript GitHub action and also break ESLint to test CI * Unbreak ESLint * Move eslint to precommit, add more rules * alphabetize eslintrc rules Co-authored-by: Sorin Sbarnea <[email protected]>
- Loading branch information
1 parent
03040fe
commit 0e2c045
Showing
3 changed files
with
139 additions
and
70 deletions.
There are no files selected for viewing
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,63 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"parserOptions": { | ||
"ecmaVersion": 12 | ||
}, | ||
"rules": { | ||
"array-bracket-spacing": "error", | ||
"block-scoped-var": "error", | ||
"block-spacing": "error", | ||
"brace-style": "error", | ||
"class-methods-use-this": "error", | ||
"consistent-return": "error", | ||
"default-case": "error", | ||
"default-case-last": "error", | ||
"default-param-last": "error", | ||
"grouped-accessor-pairs": "error", | ||
"indent": [ | ||
"error", | ||
4 | ||
], | ||
"linebreak-style": [ | ||
"error", | ||
"unix" | ||
], | ||
"no-caller": "error", | ||
"no-console": "error", | ||
"no-empty-function": "error", | ||
"no-eval": "error", | ||
"no-extra-parens": "error", | ||
"no-labels": "error", | ||
"no-new": "error", | ||
"no-new-func": "error", | ||
"no-new-wrappers": "error", | ||
"no-return-await": "error", | ||
"no-script-url": "error", | ||
"no-self-compare": "error", | ||
"no-shadow": "error", | ||
"no-throw-literal": "error", | ||
"no-undefined": "error", | ||
"no-unreachable-loop": "error", | ||
"no-unused-expressions": "error", | ||
"no-useless-backreference": "error", | ||
"no-useless-concat": "error", | ||
"no-var": "error", | ||
"prefer-const": "error", | ||
"prefer-promise-reject-errors": "error", | ||
"require-atomic-updates": "error", | ||
"require-await": "error", | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"yoda": "error" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -37,6 +37,13 @@ repos: | |
hooks: | ||
- id: pyupgrade | ||
args: [--py3-plus] | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v7.13.0 | ||
hooks: | ||
- id: eslint | ||
additional_dependencies: | ||
- [email protected] | ||
args: [pytest_html] | ||
- repo: local | ||
hooks: | ||
- id: rst | ||
|
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