-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
111 lines (111 loc) · 2.35 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
{
"extends": [
"react-app",
"airbnb",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:sonarjs/recommended-legacy"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"react",
"jest",
"prettier",
"sonarjs"
],
"env": {
"browser": true,
"node": true,
"es6": true, // Add ES6 environment for new ES6 globals
},
"settings": {
"import/extensions": [
".js",
".jsx",
".ts",
".tsx"
],
"import/parsers": {
"@typescript-eslint/parser": [
".ts",
".tsx"
]
},
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
},
"rules": {
"prettier/prettier": [
"error"
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"default-param-last": [
"off"
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/test/**",
"**/tests/**",
"**/__tests__/**",
"**/spec/**",
"**/__mocks__/**",
]
}
], // Update the pattern to include common test directories
"react/function-component-definition": "off",
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
], // Update the pattern to include TypeScript files
"react/react-in-jsx-scope": "off", // Turn off as React 17 doesn't require React to be in scope
"react/jsx-props-no-spreading": "off", // Turn off if you want to allow prop spreading
"react/prop-types": "off",
"react/require-default-props": "off",
"no-console": "warn", // Warn on console.log usage
"no-param-reassign": [
"error",
{
"props": false
}
],
"jest/expect-expect": 0
}
}