-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
86 lines (86 loc) · 2.24 KB
/
.eslintrc
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true
},
"extends": [
"airbnb",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint"
],
"plugins": ["react", "jsx-a11y", "import", "prettier", "@typescript-eslint"],
"globals": {},
"rules": {
// prettier
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"no-shadow": "off",
// TypeScript,
"@typescript-eslint/no-shadow": ["error"],
"lines-between-class-members": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/lines-between-class-members": ["error"],
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-object-literal-type-assertion": "off",
// note you must disable the base rule as it can report incorrect errors
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
// React
"react-hooks/exhaustive-deps": "off",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"react/prop-types": ["off", {}],
// Redux
"no-case-declarations": "off",
// import
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"mjs": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
}
}