-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
103 lines (99 loc) · 2.39 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
{
"env": {
"browser": true,
"es2020": true,
"node": true,
"jest": true
},
"extends": [
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"prettier",
"prettier/@typescript-eslint",
"prettier/standard",
"prettier/react"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"tsx": true,
"ts": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"prettier"
],
"settings": {
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"globals": {
"JSX": "readonly",
"NodeJS": "readonly"
},
"rules": {
"prettier/prettier": "error",
"import/extensions": [1, { "css": "always" }],
"import/no-unresolved": "error",
"react/jsx-props-no-spreading": 0,
"react/jsx-filename-extension": [1, {
"extensions": [
".jsx",
".tsx"
]
}],
"react/prop-types": "off",
"react/no-unused-prop-types": "warn",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"@typescript-eslint/no-use-before-define": ["error"],
"indent": ["error", 2, {
"ignoredNodes": [
"JSXElement",
"JSXElement *",
"JSXElement > *",
"JSXAttribute",
"JSXIdentifier",
"JSXNamespacedName",
"JSXMemberExpression",
"JSXSpreadAttribute",
"JSXExpressionContainer",
"JSXOpeningElement",
"JSXClosingElement",
"JSXText",
"JSXEmptyExpression",
"JSXSpreadChild"
],
"ignoreComments": true
}],
"comma-dangle": ["warn", "always-multiline"],
"implicit-arrow-linebreak": "off",
"no-plusplus": "off",
"object-curly-newline": ["warn", {
"ObjectExpression": { "multiline": true },
"ObjectPattern": { "multiline": true },
"ImportDeclaration": { "multiline": true },
"ExportDeclaration": { "multiline": true }
}],
"no-unused-vars": ["warn", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],
"no-use-before-define": "off",
"no-unused-expressions": "off",
// Next.js-specific rules
"jsx-a11y/anchor-is-valid": "off"
}
}