-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.json
150 lines (150 loc) · 4.84 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["react", "react-hooks", "import"],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".mjs", ".js", ".json"]
},
"webpack": {
"config": {
"resolve": {
"extensions": [".js", ".jsx"]
}
}
}
},
"import/extensions": [".js", ".mjs", ".jsx", ".json"]
},
"rules": {
"accessor-pairs": "error",
"arrow-body-style": "error",
"import/default": "error",
"import/dynamic-import-chunkname": [
"error",
{
"importFunctions": [],
"webpackChunknameFormat": "[0-9a-zA-Z-_/.]+"
}
],
"import/export": "error",
"import/extensions": ["error", "never", { "json": true }],
"import/first": "error",
"import/imports-first": "error",
"import/max-dependencies": ["error", { "max": 10 }],
"import/named": "error",
"import/namespace": "error",
"import/newline-after-import": "error",
"import/no-absolute-path": "error",
"import/no-amd": "error",
"import/no-anonymous-default-export": [
"error",
{
"allowArray": false,
"allowArrowFunction": false,
"allowAnonymousClass": false,
"allowAnonymousFunction": false,
"allowLiteral": false,
"allowObject": false
}
],
"import/no-commonjs": "error",
"import/no-cycle": ["error", { "maxDepth": "∞" }],
"import/no-default-export": "error",
"import/no-deprecated": "error",
"import/no-duplicates": "error",
"import/no-dynamic-require": "error",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"test/**", // tape, common npm pattern
"tests/**", // also common npm pattern
"spec/**", // mocha, rspec-like pattern
"**/__tests__/**", // jest pattern
"**/__mocks__/**", // jest pattern
"test.{js,jsx}", // repos with a single test file
"test-*.{js,jsx}", // repos with multiple top-level test files
"**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
"**/jest.config.js", // jest config
"**/jest.setup.js", // jest setup
"**/vue.config.js", // vue-cli config
"**/webpack.config.js", // webpack config
"**/webpack.config.*.js", // webpack config
"**/rollup.config.js", // rollup config
"**/rollup.config.*.js", // rollup config
"**/gulpfile.js", // gulp config
"**/gulpfile.*.js", // gulp config
"**/Gruntfile{,.js}", // grunt config
"**/protractor.conf.js", // protractor config
"**/protractor.conf.*.js", // protractor config
"**/karma.conf.js" // karma config
],
"optionalDependencies": false
}
],
"import/no-mutable-exports": "error",
"import/no-named-as-default-member": "error",
"import/no-named-as-default": "error",
"import/no-named-default": "error",
"import/no-namespace": "error",
"import/no-nodejs-modules": "error",
"import/no-restricted-paths": "error",
"import/no-self-import": "error",
"import/no-unassigned-import": "error",
"import/no-unresolved": ["error", { "commonjs": true, "caseSensitive": true }],
"import/no-useless-path-segments": ["error", { "commonjs": true }],
"import/no-webpack-loader-syntax": "error",
"import/order": [
"error",
{
"newlines-between": "always-and-inside-groups",
"groups": ["builtin", "external", "parent", "sibling", "index"]
}
],
"import/unambiguous": "error",
"no-console": "error",
"no-else-return": ["error", { "allowElseIf": false }],
"no-plusplus": "error",
"no-unused-expressions": "error",
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
"no-var": "error",
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var", "directive", "if", "break"], "next": "*" },
{ "blankLine": "any", "prev": ["const", "let", "var"], "next": ["const", "let", "var"] },
{ "blankLine": "any", "prev": "directive", "next": "directive" }
],
"prefer-const": "error",
"prefer-template": "error",
"quote-props": "off",
"quotes": "off",
"react/no-unused-prop-types": "error"
}
}