eslint-config-seek 0.0.0-eslint-9-etc-20240819093637 → 0.0.0-eslint-9-etc-20240908035232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +3 -19
- package/index.js +15 -0
- package/package.json +9 -11
package/base.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const root = require('find-root')(process.cwd());
|
|
2
1
|
const importX = require('eslint-plugin-import-x');
|
|
3
2
|
const globals = require('globals');
|
|
4
3
|
const babelParser = require('@babel/eslint-parser');
|
|
@@ -6,7 +5,6 @@ const tsParser = require('@typescript-eslint/parser');
|
|
|
6
5
|
const jestPlugin = require('eslint-plugin-jest');
|
|
7
6
|
const cypress = require('eslint-plugin-cypress');
|
|
8
7
|
const js = require('@eslint/js');
|
|
9
|
-
const unusedImports = require('eslint-plugin-unused-imports');
|
|
10
8
|
|
|
11
9
|
const { FlatCompat } = require('@eslint/eslintrc');
|
|
12
10
|
|
|
@@ -65,15 +63,10 @@ const baseRules = {
|
|
|
65
63
|
'no-label-var': ERROR,
|
|
66
64
|
'no-shadow': ERROR,
|
|
67
65
|
'no-undef-init': ERROR,
|
|
68
|
-
|
|
69
|
-
// Use unused-imports instead of no-unused-vars for autofix support
|
|
70
|
-
'no-unused-vars': OFF,
|
|
71
|
-
'unused-imports/no-unused-imports': ERROR,
|
|
72
|
-
'unused-imports/no-unused-vars': [
|
|
66
|
+
'no-unused-vars': [
|
|
73
67
|
ERROR,
|
|
74
68
|
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
|
|
75
69
|
],
|
|
76
|
-
|
|
77
70
|
'handle-callback-err': ERROR,
|
|
78
71
|
'no-new-require': ERROR,
|
|
79
72
|
'no-path-concat': ERROR,
|
|
@@ -103,9 +96,7 @@ const allExtensions = [...jsExtensions, ...tsExtensions];
|
|
|
103
96
|
const settings = {
|
|
104
97
|
'import-x/resolver': {
|
|
105
98
|
typescript: true,
|
|
106
|
-
node:
|
|
107
|
-
moduleDirectory: [root, 'node_modules'],
|
|
108
|
-
},
|
|
99
|
+
node: true,
|
|
109
100
|
},
|
|
110
101
|
};
|
|
111
102
|
|
|
@@ -114,7 +105,6 @@ module.exports = [
|
|
|
114
105
|
{
|
|
115
106
|
plugins: {
|
|
116
107
|
'import-x': importX,
|
|
117
|
-
'unused-imports': unusedImports,
|
|
118
108
|
},
|
|
119
109
|
|
|
120
110
|
languageOptions: {
|
|
@@ -156,21 +146,15 @@ module.exports = [
|
|
|
156
146
|
warnOnUnsupportedTypeScriptVersion: false,
|
|
157
147
|
},
|
|
158
148
|
},
|
|
159
|
-
plugins: { 'unused-imports': unusedImports },
|
|
160
149
|
settings,
|
|
161
150
|
rules: {
|
|
162
151
|
'@typescript-eslint/array-type': [ERROR, { default: 'array-simple' }],
|
|
163
152
|
'@typescript-eslint/consistent-type-definitions': OFF,
|
|
164
153
|
'@typescript-eslint/no-unused-expressions': ERROR,
|
|
165
|
-
|
|
166
|
-
// Use unused-imports instead of no-unused-vars for autofix support
|
|
167
|
-
'@typescript-eslint/no-unused-vars': [OFF],
|
|
168
|
-
'unused-imports/no-unused-imports': ERROR,
|
|
169
|
-
'unused-imports/no-unused-vars': [
|
|
154
|
+
'@typescript-eslint/no-unused-vars': [
|
|
170
155
|
ERROR,
|
|
171
156
|
{ argsIgnorePattern: '^_', ignoreRestSiblings: true },
|
|
172
157
|
],
|
|
173
|
-
|
|
174
158
|
'@typescript-eslint/no-use-before-define': OFF,
|
|
175
159
|
'@typescript-eslint/no-non-null-assertion': OFF,
|
|
176
160
|
'@typescript-eslint/ban-ts-comment': OFF,
|
package/index.js
CHANGED
|
@@ -64,4 +64,19 @@ module.exports = [
|
|
|
64
64
|
|
|
65
65
|
rules: reactRules,
|
|
66
66
|
},
|
|
67
|
+
{
|
|
68
|
+
files: ['**/*.tsx'],
|
|
69
|
+
|
|
70
|
+
rules: {
|
|
71
|
+
// temporary override until everybody removes the React import
|
|
72
|
+
'@typescript-eslint/no-unused-vars': [
|
|
73
|
+
ERROR,
|
|
74
|
+
{
|
|
75
|
+
argsIgnorePattern: '^_',
|
|
76
|
+
ignoreRestSiblings: true,
|
|
77
|
+
varsIgnorePattern: '^React$',
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
67
82
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seek",
|
|
3
|
-
"version": "0.0.0-eslint-9-etc-
|
|
3
|
+
"version": "0.0.0-eslint-9-etc-20240908035232",
|
|
4
4
|
"description": "ESLint configuration used by SEEK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -24,18 +24,16 @@
|
|
|
24
24
|
"@babel/preset-react": "^7.24.7",
|
|
25
25
|
"@eslint/compat": "^1.1.1",
|
|
26
26
|
"@eslint/eslintrc": "^3.1.0",
|
|
27
|
-
"@eslint/js": "^9.
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^8.0
|
|
29
|
-
"@typescript-eslint/parser": "^8.0
|
|
27
|
+
"@eslint/js": "^9.9.1",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
29
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
30
30
|
"eslint-config-prettier": "^9.1.0",
|
|
31
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
32
|
-
"eslint-plugin-cypress": "^3.
|
|
33
|
-
"eslint-plugin-import-x": "^
|
|
34
|
-
"eslint-plugin-jest": "^28.
|
|
31
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
32
|
+
"eslint-plugin-cypress": "^3.5.0",
|
|
33
|
+
"eslint-plugin-import-x": "^4.0.0",
|
|
34
|
+
"eslint-plugin-jest": "^28.8.0",
|
|
35
35
|
"eslint-plugin-react": "^7.35.0",
|
|
36
36
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
37
|
-
"eslint-plugin-unused-imports": "^4.1.3",
|
|
38
|
-
"find-root": "^1.1.0",
|
|
39
37
|
"globals": "^15.9.0"
|
|
40
38
|
},
|
|
41
39
|
"devDependencies": {
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
"typescript": "~5.5.4"
|
|
47
45
|
},
|
|
48
46
|
"peerDependencies": {
|
|
49
|
-
"eslint": ">=9.
|
|
47
|
+
"eslint": ">=9.9.1",
|
|
50
48
|
"typescript": ">=5.5.4"
|
|
51
49
|
},
|
|
52
50
|
"engines": {
|