-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.json
107 lines (107 loc) · 2.88 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
{
"extends": [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
"@socialgouv/eslint-config-recommended"
],
"plugins": ["testing-library"],
"settings": {
"jest": {
"version": 27
}
},
"ignorePatterns": [
"public/scripts/tarteaucitron/tarteaucitron.js",
"public/scripts/eulerian.yssn.recette.1jeune1solution.gouv.fr.js",
"public/scripts/eulerian.yssn.1jeune1solution.gouv.fr.js",
"public/scripts/tarteaucitron/tarteaucitron.service.js",
"public/scripts/tarteaucitron/lang/*",
"docs/**/*.tsx",
"docs/build/*",
"storybook-static/*"
],
"rules": {
"prettier/prettier": "off",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"semi": "error",
"comma-dangle": ["error", "always-multiline"],
"quotes": ["error", "single", { "avoidEscape": true }],
"object-curly-spacing": ["error", "always"],
"arrow-parens": "error",
"eol-last": "error",
"no-redeclare": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"args": "after-used",
"destructuredArrayIgnorePattern": "^_",
"reportUsedIgnorePattern": true
}],
"@typescript-eslint/no-unused-expressions": ["error", {
"allowTernary": true
}],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": true,
"ts-expect-error": false
}
],
"@typescript-eslint/no-namespace": "off",
"quote-props": ["error", "as-needed"],
"no-console": "error",
"import/named": "off",
"import/no-named-as-default-member": "off",
"jest/expect-expect": [
"warn",
{
"assertFunctionNames": ["expect", "checkA11y"]
}
],
"react/jsx-closing-bracket-location": ["error", "after-props"],
"react/jsx-wrap-multilines": ["error", {
"declaration": "parens-new-line",
"assignment": "parens-new-line",
"return": "parens-new-line",
"arrow": "parens-new-line",
"condition": "parens-new-line",
"logical": "parens-new-line",
"prop": "parens-new-line"
}],
"react/jsx-tag-spacing": ["error", {
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "never",
"beforeClosing": "never"
}],
"react/jsx-max-props-per-line": ["error", {
"maximum": 1,
"when": "multiline"
}]
},
"overrides": [
// Only uses Testing Library lint rules in test files
{
"files": [
"tests/client/components/*.tsx",
"**/?(*.)+(spec|test).[jt]s?(x)"
],
"extends": ["plugin:testing-library/react"]
},
{
"files": [
"next.config.js",
"docusaurus.config.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
},
{
"files": ["*.cy.ts"],
"rules": {
"jest/expect-expect": "off"
}
}
]
}