eslint-config-seek 0.0.0-eslint-9-etc-20240918042509 → 0.0.0-eslint-9-etc-20240922063038
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 +23 -36
- package/index.js +2 -10
- package/package.json +3 -6
package/base.js
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
const importX = require('eslint-plugin-import-x');
|
|
2
2
|
const globals = require('globals');
|
|
3
|
-
const tsParser = require('@typescript-eslint/parser');
|
|
4
3
|
const jestPlugin = require('eslint-plugin-jest');
|
|
5
4
|
const cypress = require('eslint-plugin-cypress');
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const { FlatCompat } = require('@eslint/eslintrc');
|
|
9
|
-
|
|
10
|
-
const compat = new FlatCompat({
|
|
11
|
-
baseDirectory: __dirname,
|
|
12
|
-
recommendedConfig: js.configs.recommended,
|
|
13
|
-
allConfig: js.configs.all,
|
|
14
|
-
});
|
|
5
|
+
const eslintConfigPrettier = require('eslint-config-prettier');
|
|
6
|
+
const tseslint = require('typescript-eslint');
|
|
15
7
|
|
|
16
8
|
const OFF = 0;
|
|
17
9
|
const ERROR = 2;
|
|
@@ -100,12 +92,17 @@ const settings = {
|
|
|
100
92
|
};
|
|
101
93
|
|
|
102
94
|
module.exports = [
|
|
103
|
-
|
|
95
|
+
eslintConfigPrettier,
|
|
96
|
+
importX.flatConfigs.typescript,
|
|
97
|
+
{
|
|
98
|
+
...importX.flatConfigs.errors,
|
|
99
|
+
files: [`**/*.{${jsExtensions}}`],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
...importX.flatConfigs.warnings,
|
|
103
|
+
files: [`**/*.{${jsExtensions}}`],
|
|
104
|
+
},
|
|
104
105
|
{
|
|
105
|
-
plugins: {
|
|
106
|
-
'import-x': importX,
|
|
107
|
-
},
|
|
108
|
-
|
|
109
106
|
languageOptions: {
|
|
110
107
|
globals: {
|
|
111
108
|
...globals.node,
|
|
@@ -120,21 +117,17 @@ module.exports = [
|
|
|
120
117
|
settings,
|
|
121
118
|
rules: baseRules,
|
|
122
119
|
},
|
|
123
|
-
...
|
|
124
|
-
|
|
125
|
-
'plugin:@typescript-eslint/recommended',
|
|
126
|
-
'plugin:@typescript-eslint/stylistic',
|
|
127
|
-
'prettier',
|
|
128
|
-
)
|
|
129
|
-
.map((config) => ({
|
|
120
|
+
...[tseslint.configs.recommended, tseslint.configs.stylistic].map(
|
|
121
|
+
(config) => ({
|
|
130
122
|
...config,
|
|
131
123
|
files: [`**/*.{${tsExtensions}}`],
|
|
132
|
-
})
|
|
124
|
+
}),
|
|
125
|
+
),
|
|
133
126
|
{
|
|
134
127
|
files: [`**/*.{${tsExtensions}}`],
|
|
135
128
|
|
|
136
129
|
languageOptions: {
|
|
137
|
-
parser:
|
|
130
|
+
parser: tseslint.parser,
|
|
138
131
|
|
|
139
132
|
parserOptions: {
|
|
140
133
|
projectService: true,
|
|
@@ -191,12 +184,6 @@ module.exports = [
|
|
|
191
184
|
'import-x/no-duplicates': [ERROR, { 'prefer-inline': true }],
|
|
192
185
|
},
|
|
193
186
|
},
|
|
194
|
-
...compat
|
|
195
|
-
.extends('plugin:import-x/errors', 'plugin:import-x/warnings')
|
|
196
|
-
.map((config) => ({
|
|
197
|
-
...config,
|
|
198
|
-
files: [`**/*.{${jsExtensions}}`],
|
|
199
|
-
})),
|
|
200
187
|
{
|
|
201
188
|
files: [`**/*.{${jsExtensions}}`],
|
|
202
189
|
languageOptions: {
|
|
@@ -214,13 +201,13 @@ module.exports = [
|
|
|
214
201
|
'import-x/no-duplicates': ERROR,
|
|
215
202
|
},
|
|
216
203
|
},
|
|
217
|
-
|
|
218
|
-
...
|
|
204
|
+
{
|
|
205
|
+
...jestPlugin.configs['flat/recommended'],
|
|
219
206
|
files: [
|
|
220
207
|
`**/__tests__/**/*.{${allExtensions}}`,
|
|
221
208
|
`**/*.@(spec|test).{${allExtensions}}`,
|
|
222
209
|
],
|
|
223
|
-
}
|
|
210
|
+
},
|
|
224
211
|
{
|
|
225
212
|
files: [
|
|
226
213
|
`**/__tests__/**/*.{${allExtensions}}`,
|
|
@@ -233,10 +220,10 @@ module.exports = [
|
|
|
233
220
|
},
|
|
234
221
|
},
|
|
235
222
|
},
|
|
236
|
-
|
|
237
|
-
...
|
|
223
|
+
{
|
|
224
|
+
...cypress.configs.recommended,
|
|
238
225
|
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
239
|
-
}
|
|
226
|
+
},
|
|
240
227
|
{
|
|
241
228
|
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
242
229
|
plugins: { cypress },
|
package/index.js
CHANGED
|
@@ -4,15 +4,6 @@ const base = require('./base');
|
|
|
4
4
|
const { fixupPluginRules } = require('@eslint/compat');
|
|
5
5
|
|
|
6
6
|
const globals = require('globals');
|
|
7
|
-
const js = require('@eslint/js');
|
|
8
|
-
|
|
9
|
-
const { FlatCompat } = require('@eslint/eslintrc');
|
|
10
|
-
|
|
11
|
-
const compat = new FlatCompat({
|
|
12
|
-
baseDirectory: __dirname,
|
|
13
|
-
recommendedConfig: js.configs.recommended,
|
|
14
|
-
allConfig: js.configs.all,
|
|
15
|
-
});
|
|
16
7
|
|
|
17
8
|
const OFF = 0;
|
|
18
9
|
const ERROR = 2;
|
|
@@ -33,7 +24,8 @@ const reactRules = {
|
|
|
33
24
|
};
|
|
34
25
|
|
|
35
26
|
module.exports = [
|
|
36
|
-
|
|
27
|
+
react.configs.flat.recommended,
|
|
28
|
+
react.configs.flat['jsx-runtime'],
|
|
37
29
|
...base,
|
|
38
30
|
{
|
|
39
31
|
plugins: {
|
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-20240922063038",
|
|
4
4
|
"description": "ESLint configuration used by SEEK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -20,14 +20,11 @@
|
|
|
20
20
|
"homepage": "https://github.com/seek-oss/eslint-config-seek#readme",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@eslint/compat": "^1.1.1",
|
|
23
|
-
"
|
|
24
|
-
"@eslint/js": "^9.9.1",
|
|
25
|
-
"@typescript-eslint/eslint-plugin": "^8.3.0",
|
|
26
|
-
"@typescript-eslint/parser": "^8.3.0",
|
|
23
|
+
"typescript-eslint": "^8.6.0",
|
|
27
24
|
"eslint-config-prettier": "^9.1.0",
|
|
28
25
|
"eslint-import-resolver-typescript": "^3.6.3",
|
|
29
26
|
"eslint-plugin-cypress": "^3.5.0",
|
|
30
|
-
"eslint-plugin-import-x": "^4.
|
|
27
|
+
"eslint-plugin-import-x": "^4.2.1",
|
|
31
28
|
"eslint-plugin-jest": "^28.8.0",
|
|
32
29
|
"eslint-plugin-react": "^7.35.0",
|
|
33
30
|
"eslint-plugin-react-hooks": "^4.6.2",
|