-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change eslint configuration and fix resulting issues (#4423)
* Remove app/service/query-string (unused) and its dependency. * Fix usage of mixed operators. * eslint --fix fixes for missing dependencies for react hooks * Fix: useCallback dependency passed to $http's .catch. * Satisfy react/no-direct-mutation-state. * Fix no-mixed-operators violations. * Move the decision of whether to render Custom chart one level up to make sure hooks are called in the same order. * Fix: name was undefined. It wasn't detected before because there is such global. * Simplify eslint config and switch to creat-react-app's eslint base. * Add prettier config. * Make sure eslint doesn't conflict with prettier * A few updates post eslint (#4425) * Prettier command in package.json
- Loading branch information
Showing
31 changed files
with
844 additions
and
618 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build/*.js | ||
dist | ||
config/*.js | ||
client/dist |
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 |
---|---|---|
@@ -1,66 +1,17 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["airbnb", "plugin:compat/recommended"], | ||
extends: ["react-app", "plugin:compat/recommended", "prettier"], | ||
plugins: ["jest", "compat", "no-only-tests"], | ||
settings: { | ||
"import/resolver": "webpack" | ||
}, | ||
parser: "babel-eslint", | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
rules: { | ||
// allow debugger during development | ||
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, | ||
"no-param-reassign": 0, | ||
"no-mixed-operators": 0, | ||
"no-underscore-dangle": 0, | ||
"no-use-before-define": ["error", "nofunc"], | ||
"prefer-destructuring": "off", | ||
"prefer-template": "off", | ||
"no-restricted-properties": "off", | ||
"no-restricted-globals": "off", | ||
"no-multi-assign": "off", | ||
"no-lonely-if": "off", | ||
"consistent-return": "off", | ||
"no-control-regex": "off", | ||
"no-multiple-empty-lines": "warn", | ||
"no-only-tests/no-only-tests": "error", | ||
"operator-linebreak": "off", | ||
"react/destructuring-assignment": "off", | ||
"react/jsx-filename-extension": "off", | ||
"react/jsx-one-expression-per-line": "off", | ||
"react/jsx-uses-react": "error", | ||
"react/jsx-uses-vars": "error", | ||
"react/jsx-wrap-multilines": "warn", | ||
"react/no-access-state-in-setstate": "warn", | ||
"react/prefer-stateless-function": "warn", | ||
"react/forbid-prop-types": "warn", | ||
"react/prop-types": "warn", | ||
"jsx-a11y/anchor-is-valid": "off", | ||
"jsx-a11y/click-events-have-key-events": "off", | ||
"jsx-a11y/label-has-associated-control": [ | ||
"warn", | ||
{ | ||
controlComponents: true | ||
} | ||
], | ||
"jsx-a11y/label-has-for": "off", | ||
"jsx-a11y/no-static-element-interactions": "off", | ||
"max-len": [ | ||
"error", | ||
120, | ||
2, | ||
{ | ||
ignoreUrls: true, | ||
ignoreComments: false, | ||
ignoreRegExpLiterals: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true | ||
} | ||
], | ||
"no-else-return": ["error", { allowElseIf: true }], | ||
"object-curly-newline": ["error", { consistent: true }] | ||
} | ||
}; |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.