-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
72 lines (71 loc) · 2.03 KB
/
index.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
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
const typescriptEslintRules = require("./configs/@typescript-eslint");
const eslintRules = require("./configs/eslint");
const importRules = require("./configs/import");
const jsxA11yRules = require("./configs/jsx-a11y");
const reactRules = require("./configs/react");
const reactHooksRules = require("./configs/react-hooks");
module.exports = {
env: {
es6: true,
node: true,
browser: true
},
parser: "@typescript-eslint/parser",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
jsx: true,
generators: false,
objectLiteralDuplicateProperties: false
},
ecmaVersion: 2018
},
plugins: ["import", "react", "jsx-a11y", "jest", "@typescript-eslint", "react-hooks"],
rules: {
...typescriptEslintRules,
...eslintRules,
...importRules,
...jsxA11yRules,
...reactRules,
...reactHooksRules
},
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"]
}
},
react: {
pragma: "React",
version: "detect"
},
propWrapperFunctions: ["forbidExtraProps", "exact", "Object.freeze"],
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/core-modules": [],
"import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"]
},
overrides: [
{
files: ["**/*.test.ts", "**/*.test.tsx"],
env: {
"jest/globals": true
},
rules: {
"import/no-extraneous-dependencies": "off",
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
"jest/no-alias-methods": "error",
"jest/no-identical-title": "error",
"jest/no-jasmine-globals": "error",
"jest/no-test-prefixes": "error",
"jest/no-done-callback": "error",
"jest/no-test-return-statement": "error",
"jest/prefer-to-have-length": "error",
"jest/prefer-spy-on": "error",
"jest/valid-expect": "error",
"max-classes-per-file": "off",
"react/static-property-placement": "off"
}
}
]
};