-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
59 lines (59 loc) · 1.4 KB
/
.eslintrc.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
module.exports = {
parser: "@babel/eslint-parser",
env: {
browser: true,
es6: true,
},
extends: ["prettier", "plugin:jsx-a11y/recommended"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
requireConfigFile: false,
ecmaVersion: 2018,
sourceType: "module",
babelOptions: {
presets: ["@babel/preset-react"],
},
},
plugins: ["react", "prettier", "unused-imports", "jsx-a11y"],
rules: {
"prettier/prettier": 0,
"react/jsx-filename-extension": ["warn", { extensions: [".js", ".jsx"] }],
"jsx-a11y/anchor-has-content": "off",
"no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"padding-line-between-statements": [
"warn",
{ blankLine: "always", prev: "*", next: "return" },
{ blankLine: "always", prev: ["const", "let", "var"], next: "*" },
{
blankLine: "any",
prev: ["const", "let", "var"],
next: ["const", "let", "var"],
},
],
},
settings: {
"import/resolver": {
node: {
paths: ["src"],
},
},
},
};