-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy path.eslintrc.json
80 lines (80 loc) · 2.64 KB
/
.eslintrc.json
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
{
"env": {
"browser": true, // Browser global variables like `window` etc.
"commonjs": true, // CommonJS global variables and CommonJS scoping.Allows require, exports and module.
"es6": true, // Enable all ECMAScript 6 features except for modules.
"jest": true, // Jest global variables like `it` etc.
"node": true // Defines things like process.env when generating through node
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018, // Allows for the parsing of modern ECMAScript features
"sourceType": "module" // Allows for the use of imports
},
"plugins": [
"import",
"@typescript-eslint"
],
"root": true, // For configuration cascading.
"rules": {
"react/prop-types": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
// TODO remove this rule after integration to TS
"no-unused-vars": ["off"],
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"react/no-children-prop": "off",
"no-prototype-builtins": "off",
"react/display-name": "off",
"react/no-unescaped-entities": "off",
"eqeqeq": "error",
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
],
"no-sequences": "error",
"yoda": "error",
"no-param-reassign": "error",
"no-unused-expressions": "error",
"comma-dangle": ["error", {
"arrays": "never",
"objects": "never",
"imports": "never",
"exports": "never",
"functions": "never"
}],
"semi": ["error", "always", { "omitLastInOneLineBlock": true }],
"object-curly-spacing": ["error", "always"],
"array-bracket-spacing": ["error", "never"],
"arrow-spacing": "error",
"keyword-spacing": "error",
"switch-colon-spacing": "error",
"eol-last": ["error", "always"],
"quotes": ["error", "single"],
"prefer-const": "error"
},
"settings": {
"react": {
"version": "detect" // Detect react version
}
},
"globals": {
"React": true,
"JSX": true,
"NodeJS": true,
"Undefinable": true
}
}