-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
111 lines (111 loc) · 3.42 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
{
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"es2020": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:import/warnings",
"plugin:jsx-a11y/strict",
"plugin:prettier/recommended",
"plugin:@next/next/recommended",
"airbnb"
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"alias": {
"map": [
["@assets", "./src/assets/"],
["@ui", "./src/components/ui/"],
["@components", "./src/components/"],
["@widgets", "./src/components/widgets/"],
["@containers", "./src/containers/"],
["@layout", "./src/layouts/"],
["@utils", "./src/utils/"],
["@hooks", "./src/hooks/"]
],
"extensions": [".js", ".jsx"]
},
"node": {
"paths": ["./"]
}
}
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 11,
"sourceType": "module",
"requireConfigFile": false,
"babelOptions": {
"presets": ["@babel/preset-react"]
}
},
"plugins": ["react", "react-hooks", "prettier", "jsx-a11y"],
"rules": {
"object-curly-newline": "off",
"import/prefer-default-export": "off",
"prettier/prettier": "error",
"indent": ["error", 4, { "SwitchCase": 1 }],
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
"camelcase": ["off", { "properties": "never" }],
"eslint-plugin/fixer-return:": "off",
"operator-linebreak": "off",
"implicit-arrow-linebreak": "off",
"comma-dangle": ["error", "only-multiline"],
"function-paren-newline": "off",
"react/jsx-indent": [2, 4],
"react/jsx-indent-props": "off",
"react/jsx-one-expression-per-line": "off",
"no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"react/jsx-props-no-spreading": "off",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": 0,
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/no-danger": "off",
"react/jsx-fragments": "off",
"react/jsx-curly-newline": "off",
"jsx-a11y/label-has-associated-control": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"jsx-a11y/label-has-for": [
"error",
{
"required": {
"some": ["nesting", "id"]
}
}
],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"react/function-component-definition": [
"error",
{
"namedComponents": "arrow-function"
}
],
"no-underscore-dangle": "off",
"@next/next/no-html-link-for-pages": "error",
"no-multi-assign": "off"
}
}