-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
105 lines (105 loc) · 3.08 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
{
"extends": [
"next",
"plugin:react/all",
"eslint:recommended",
"eslint-config-next",
"next/core-web-vitals",
"plugin:import/recommended",
"plugin:jsx-a11y/strict",
"plugin:promise/recommended",
"plugin:jest-dom/recommended",
"plugin:sonarjs/recommended",
// Prettier should be last to override other configs that might conflict with it
"prettier"
],
"rules": {
"react/no-danger": "off",
"react/prop-types": "off",
"jsx-a11y/alt-text": "off",
"react-in-jsx-scope": "off",
"no-case-declarations": "off",
"react/no-string-refs": "off",
"react/jsx-sort-props": "off",
"no-prototype-builtins": "off",
"jsx-a11y/no-autofocus": "off",
"react/jsx-no-literals": "off",
"react/sort-prop-types": "off",
"react/button-has-type": "off",
"react/forbid-prop-types": "off",
"react/jsx-no-leaked-render": "off",
"react/require-optimization": "off",
"react/require-default-props": "off",
"react/jsx-sort-default-props": "off",
"react/forbid-component-props": "off",
"react/function-component-definition": "off",
"react/default-props-match-prop-types": "off",
"yoda": "error",
"curly": "error",
"dot-notation": "error",
"no-fallthrough": "error",
"spaced-comment": "error",
"prefer-template": "error",
"no-useless-return": "error",
"no-implicit-coercion": "error",
"prefer-object-spread": "error",
"react/jsx-max-depth": ["error", { "max": 5 }],
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
"lines-between-class-members": [
"error",
"always",
{ "exceptAfterSingleLine": true }
],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "*", "next": "return" },
{ "blankLine": "always", "prev": ["const", "let", "var"], "next": "*" },
{
"blankLine": "any",
"prev": ["const", "let", "var"],
"next": ["const", "let", "var"]
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:import/typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/strict"
],
"rules": {
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-member-accessibility": "error"
},
"parserOptions": {
"tsconfigRootDir": ".",
"project": ["./tsconfig.json"]
}
}
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
"browser": true,
"es2021": true,
"es6": true,
"node": true,
"jest": true
},
"settings": {
"react": { "version": "detect" },
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/resolver": {
"typescript": { "alwaysTryTypes": true, "project": "__dirname" },
"node": true
}
}
}