-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.eslintrc.js
38 lines (38 loc) · 1.37 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
"react-app",
],
parser: "@typescript-eslint/parser",
plugins: ["prettier", "react", "@typescript-eslint"],
rules: {
"no-console": "warn",
// we have a lot of anonymous renderers passed as props
"react/display-name": "off",
// I care more about readibility than possible errors
"react/no-unescaped-entities": "off",
// typescript will take care of this for me
"react/prop-types": "off",
// This is too annoying for a personal project
"@typescript-eslint/no-explicit-any": "off",
// Want to enable this, but will take lots of fiddling
"@typescript-eslint/explicit-function-return-type": "off",
// Lots of places where we use ! for simplicity
"@typescript-eslint/no-non-null-assertion": "off",
// idk why this is a rule, it's better than importing lodash/noop
"@typescript-eslint/no-empty-function": "off",
// We use `require()` for jest imports
"@typescript-eslint/no-var-requires": "off",
// Enabled only for parameters with defaults for clarity
"@typescript-eslint/no-inferrable-types": [
"error",
{ ignoreParameters: true },
],
},
}