eslint-config-seek 0.0.0-eslint-9-etc-20240918015504 → 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 +25 -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,
|
|
@@ -113,26 +110,24 @@ module.exports = [
|
|
|
113
110
|
|
|
114
111
|
parserOptions: {
|
|
115
112
|
requireConfigFile: false,
|
|
113
|
+
ecmaVersion: 'latest',
|
|
114
|
+
sourceType: 'module',
|
|
116
115
|
},
|
|
117
116
|
},
|
|
118
117
|
settings,
|
|
119
118
|
rules: baseRules,
|
|
120
119
|
},
|
|
121
|
-
...
|
|
122
|
-
|
|
123
|
-
'plugin:@typescript-eslint/recommended',
|
|
124
|
-
'plugin:@typescript-eslint/stylistic',
|
|
125
|
-
'prettier',
|
|
126
|
-
)
|
|
127
|
-
.map((config) => ({
|
|
120
|
+
...[tseslint.configs.recommended, tseslint.configs.stylistic].map(
|
|
121
|
+
(config) => ({
|
|
128
122
|
...config,
|
|
129
123
|
files: [`**/*.{${tsExtensions}}`],
|
|
130
|
-
})
|
|
124
|
+
}),
|
|
125
|
+
),
|
|
131
126
|
{
|
|
132
127
|
files: [`**/*.{${tsExtensions}}`],
|
|
133
128
|
|
|
134
129
|
languageOptions: {
|
|
135
|
-
parser:
|
|
130
|
+
parser: tseslint.parser,
|
|
136
131
|
|
|
137
132
|
parserOptions: {
|
|
138
133
|
projectService: true,
|
|
@@ -189,12 +184,6 @@ module.exports = [
|
|
|
189
184
|
'import-x/no-duplicates': [ERROR, { 'prefer-inline': true }],
|
|
190
185
|
},
|
|
191
186
|
},
|
|
192
|
-
...compat
|
|
193
|
-
.extends('plugin:import-x/errors', 'plugin:import-x/warnings')
|
|
194
|
-
.map((config) => ({
|
|
195
|
-
...config,
|
|
196
|
-
files: [`**/*.{${jsExtensions}}`],
|
|
197
|
-
})),
|
|
198
187
|
{
|
|
199
188
|
files: [`**/*.{${jsExtensions}}`],
|
|
200
189
|
languageOptions: {
|
|
@@ -212,13 +201,13 @@ module.exports = [
|
|
|
212
201
|
'import-x/no-duplicates': ERROR,
|
|
213
202
|
},
|
|
214
203
|
},
|
|
215
|
-
|
|
216
|
-
...
|
|
204
|
+
{
|
|
205
|
+
...jestPlugin.configs['flat/recommended'],
|
|
217
206
|
files: [
|
|
218
207
|
`**/__tests__/**/*.{${allExtensions}}`,
|
|
219
208
|
`**/*.@(spec|test).{${allExtensions}}`,
|
|
220
209
|
],
|
|
221
|
-
}
|
|
210
|
+
},
|
|
222
211
|
{
|
|
223
212
|
files: [
|
|
224
213
|
`**/__tests__/**/*.{${allExtensions}}`,
|
|
@@ -231,10 +220,10 @@ module.exports = [
|
|
|
231
220
|
},
|
|
232
221
|
},
|
|
233
222
|
},
|
|
234
|
-
|
|
235
|
-
...
|
|
223
|
+
{
|
|
224
|
+
...cypress.configs.recommended,
|
|
236
225
|
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
237
|
-
}
|
|
226
|
+
},
|
|
238
227
|
{
|
|
239
228
|
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
240
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",
|