-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
153 lines (152 loc) · 4.65 KB
/
.eslintrc
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
151
152
153
{
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/all",
"plugin:react/all",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/strict",
"plugin:deprecation/recommended"
],
"parserOptions": {
"project": ["./tsconfig.json"]
},
"env": {
"browser": true,
"es2021": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": [
"public",
"next.config.js"
],
"parser": "@typescript-eslint/parser",
"plugins": ["sort-keys-fix", "unused-imports"],
"rules": {
"array-bracket-newline": "error",
"array-bracket-spacing": "error",
"array-element-newline": ["error", "consistent"],
"arrow-parens": "error",
"arrow-spacing": "error",
"brace-style": "error",
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"imports": "always-multiline",
"objects": "always-multiline"
}
],
"comma-spacing": "error",
"default-case": "error",
"eol-last": "error",
"eqeqeq": "error",
"function-paren-newline": ["error", "consistent"],
"id-match": "error",
"indent": ["error", 2, { "SwitchCase": 1 }],
"jsx-quotes": "error",
"keyword-spacing": "error",
"max-len": [
"error",
{
"code": 160,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"no-console": "error",
"no-multiple-empty-lines": "error",
"no-multi-spaces": "error",
"no-param-reassign": "error",
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always"],
"object-curly-newline": "error",
"object-property-newline": ["error", { "allowAllPropertiesOnSameLine": true }],
"prefer-const": "error",
"quote-props": ["error", "as-needed"],
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "never"],
"space-before-blocks": "error",
"space-infix-ops": "error",
"yoda": "error",
"import/newline-after-import": "error",
"import/no-anonymous-default-export": "off",
"import/no-extraneous-dependencies": "error",
"import/no-mutable-exports": "error",
"import/order": [
"warn",
{
"groups": [["builtin", "external"], ["internal", "parent", "sibling", "index", "object", "type"]],
"newlines-between": "always",
"alphabetize": { "order": "asc", "caseInsensitive": true }
}
],
"react/forbid-component-props": "off",
"react/jsx-boolean-value": ["error", "always", { "never": ["aria-hidden"] }],
"react/jsx-curly-brace-presence": "off",
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
"react/jsx-indent": [2, 2],
"react/jsx-indent-props": [2, 2],
"react/jsx-max-depth": "off",
"react/jsx-newline": "off",
"react/jsx-no-bind": "off",
"react/jsx-no-literals": "off",
"react/react-in-jsx-scope": "off",
"sort-keys-fix/sort-keys-fix": "error",
"@typescript-eslint/array-type": ["error", { "default": "generic", "readonly": "generic" }],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/max-params": "off",
"@typescript-eslint/no-magic-numbers": "off",
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/prefer-destructuring": "off",
"@typescript-eslint/prefer-readonly-parameter-types": ["off", {
"allow": [
"FormEvent",
"HTMLFormElement",
"HTMLInputElement",
"SubmitEvent",
"SyntheticEvent",
"ReactElement",
"ChartDataset",
"ClientSafeProvider",
"inventaireModel"
]
}],
"unused-imports/no-unused-imports": "error"
},
"overrides": [
{
"files": ["**/*.test.ts?(x)"],
"extends": [
"plugin:vitest/all"
],
"rules": {
"@typescript-eslint/unbound-method": "off",
"vitest/max-expects": "off",
"vitest/no-conditional-expect": "off",
"vitest/no-hooks": "off",
"vitest/require-hook": "off",
"vitest/prefer-expect-assertions": "off"
}
},
{
"files": ["**/*.test.tsx"],
"extends": ["plugin:testing-library/react"]
}
]
}