-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
41 lines (41 loc) · 1.19 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
39
40
41
module.exports = {
parser: "@typescript-eslint/parser",
extends: ["airbnb", "plugin:@typescript-eslint/recommended", "react-app"],
plugins: ["@typescript-eslint", "react"],
rules: {
"@typescript-eslint/indent": ["error", 2],
"@typescript-eslint/explicit-function-return-type": "off",
"react/jsx-one-expression-per-line": "off", // makes it hard to insert spaces
"@typescript-eslint/explicit-member-accessibility": "off",
"class-methods-use-this": "off",
"react/sort-comp": "off", // forces to sort properties in a very awkward manner
"lines-between-class-members": "off", // forces to separate class property definitions
"no-param-reassign": "off",
"no-case-declarations": "off",
"no-console": "off"
},
overrides: [
{
// disable TS rules for JS files
files: ["*.js"],
rules: {
"@typescript-eslint/no-var-requires": "off"
}
},
{
// disable JS rules for TS files
files: ["*.tsx"],
rules: {
"react/jsx-filename-extension": "off"
}
}
],
settings: {
"import/resolver": {
node: {
paths: ["src"],
extensions: [".js", ".jsx", ".ts", ".tsx"]
}
},
},
};