generated from NHSDigital/nhs-notify-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
118 lines (118 loc) · 2.82 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
109
110
111
112
113
114
115
116
117
118
{
"settings": {
"import/resolver": {
"typescript": {} // this loads <rootdir>/tsconfig.json to eslint
}
},
"extends": [
"airbnb",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:security/recommended-legacy",
"plugin:sonarjs/recommended-legacy",
"plugin:unicorn/recommended"
],
"plugins": [
"@typescript-eslint",
"html",
"import",
"jest",
"jsx-a11y",
"prettier",
"react",
"react-hooks",
"security",
"sonarjs",
"unicorn"
],
"rules": {
"react/display-name": "off",
"no-restricted-syntax": "off",
"consistent-return": "off",
"prettier/prettier": "error",
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": [
"error",
{
"case": "kebabCase",
"ignore": [
".tsx"
]
}
],
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/function-component-definition": "off",
"react/jsx-no-useless-fragment": [
"error",
{
"allowExpressions": true
}
],
"import/prefer-default-export": "off",
"import/extensions": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"security/detect-object-injection": "off",
"sonarjs/no-duplicate-string": "off",
"react/no-danger": "off",
"no-param-reassign": "off",
"react/require-default-props": "off",
"no-useless-constructor": "off",
"sonarjs/no-small-switch": "off",
"sonarjs/no-unused-vars": "off",
"react/jsx-no-bind": "off",
"unicorn/no-null": "off",
"prefer-regex-literals": "off",
"class-methods-use-this": "off",
"no-underscore-dangle": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"jest.config.ts",
"jest.setup.ts",
"src/__tests__/**"
]
}
],
"no-empty-function": "off"
},
"overrides": [
{
"files": [
"*.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-require-imports": "off",
"unicorn/prefer-module": "off",
"global-require": "off"
}
},
{
"files": [
"*.test.{ts,tsx}"
],
"rules": {
"unicorn/no-useless-undefined": "off",
"unicorn/consistent-function-scoping": "off",
"max-classes-per-file": "off"
}
}
]
}