-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-common.js
41 lines (38 loc) · 1.45 KB
/
app-common.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 = {
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx", ".json"],
},
typescript: true,
},
},
ignorePatterns: ["**/report/*.js"],
rules: {
// note you must disable the base rule as it can report incorrect errors
// https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined/64024916#64024916
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["off"],
"@typescript-eslint/no-explicit-any": "off",
"prefer-arrow-callback": "off",
quotes: ["error", "single", { avoidEscape: true }],
// TO BE REMOVED later
"no-multiple-empty-lines": "off",
"react/jsx-props-no-spreading": "off",
"react/static-property-placement": "off",
"max-classes-per-file": "off",
"class-methods-use-this": "off",
"no-useless-constructor": "off",
semi: ["error", "never"],
"max-len": ["error", { code: 120, tabWidth: 2, ignoreUrls: true, ignoreStrings: false, ignorePattern: "d=.*" }],
// https://github.com/typescript-eslint/typescript-eslint/issues/455
"@typescript-eslint/indent": "off",
// exceptions for Styled components
"react/no-unknown-property": ["error", { ignore: ["css"] }],
// exception for react functional arrow components
"react/function-component-definition": ["error", {
namedComponents: "arrow-function",
unnamedComponents: "arrow-function",
}],
},
}