forked from ministryofjustice/bichard7-next-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
108 lines (108 loc) · 3.29 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
{
"extends": "plugin:@next/next/recommended",
"env": {
"es6": true
},
"rules": {
"semi": ["error", "never"],
"quotes": ["error", "double", { "avoidEscape": true }],
"comma-dangle": "off"
},
"overrides": [
{
"files": ["**/*.js"],
"extends": ["airbnb", "prettier", "plugin:prettier/recommended"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"curly": ["error", "all"],
"no-useless-escape": "off",
"import/no-import-module-exports": "off"
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"extends": [
"airbnb-typescript",
"next",
"plugin:@typescript-eslint/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaVersion": 2020,
"project": ["tsconfig.json", "cypress/tsconfig.json", "cypress/*.cy.tsx"]
},
"plugins": ["@typescript-eslint", "filenames", "no-only-tests"],
"rules": {
"curly": ["error", "all"],
"no-console": "off",
"no-plusplus": "off",
"no-useless-escape": "off",
"require-await": "off",
"filenames/match-exported": "error",
"import/first": "error",
"import/no-cycle": "error",
"import/no-anonymous-default-export": "off",
"import/prefer-default-export": "off",
"prettier/prettier": ["error"],
"react/jsx-curly-brace-presence": ["error", { "props": "ignore", "children": "always" }],
"react/require-default-props": ["off"],
"@next/next/no-html-link-for-pages": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "variableLike",
"format": ["StrictPascalCase", "strictCamelCase", "UPPER_CASE"],
"filter": {
"regex": "^_+$",
"match": false
},
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_+$", "varsIgnorePattern": "^_+$" }],
"no-only-tests/no-only-tests": [
"error",
{
"block": ["test", "it", "assert"],
"focus": ["only", "focus"]
}
]
}
},
{
"files": ["**/_*.{ts,tsx}", "src/{emails,pages}/**/*.{ts,tsx}", "*.config.{js,ts}"],
"rules": {
"filenames/match-exported": "off",
"import/no-extraneous-dependencies": "off"
}
},
{
"files": ["**/*.test.*"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
},
{
"files": ["**/*.stories.*"],
"rules": {
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
},
{
"files": ["cypress/**/*.ts", "cypress/**/*.tsx"],
"extends": ["plugin:cypress/recommended"],
"rules": {
"no-console": "off",
"no-unused-expressions": "off",
"@typescript-eslint/naming-convention": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}
]
}