eslint-config-seek 0.0.0-eslint-9-etc-20240922070719 → 0.0.0-fix-naming-convention-rule-format-20250602054747
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 +43 -15
- package/index.js +1 -2
- package/package.json +9 -10
package/base.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
const importX = require('eslint-plugin-import-x');
|
|
2
2
|
const globals = require('globals');
|
|
3
3
|
const jestPlugin = require('eslint-plugin-jest');
|
|
4
|
-
const cypress = require('eslint-plugin-cypress');
|
|
4
|
+
const cypress = require('eslint-plugin-cypress/flat');
|
|
5
5
|
const eslintConfigPrettier = require('eslint-config-prettier');
|
|
6
6
|
const tseslint = require('typescript-eslint');
|
|
7
7
|
|
|
8
8
|
const OFF = 0;
|
|
9
|
+
const WARN = 1;
|
|
9
10
|
const ERROR = 2;
|
|
10
11
|
|
|
11
12
|
const baseRules = {
|
|
@@ -13,7 +14,6 @@ const baseRules = {
|
|
|
13
14
|
'no-console': ERROR,
|
|
14
15
|
'no-unexpected-multiline': ERROR,
|
|
15
16
|
'block-scoped-var': ERROR,
|
|
16
|
-
curly: [ERROR, 'all'],
|
|
17
17
|
'default-case': ERROR,
|
|
18
18
|
'dot-notation': ERROR,
|
|
19
19
|
eqeqeq: [ERROR, 'always', { null: 'ignore' }],
|
|
@@ -81,6 +81,10 @@ const baseRules = {
|
|
|
81
81
|
'no-return-await': OFF,
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
+
const eslintConfigPrettierOverrideRules = {
|
|
85
|
+
curly: [ERROR, 'all'],
|
|
86
|
+
};
|
|
87
|
+
|
|
84
88
|
const { js: jsExtensions, ts: tsExtensions } = require('./extensions');
|
|
85
89
|
const allExtensions = [...jsExtensions, ...tsExtensions];
|
|
86
90
|
|
|
@@ -92,10 +96,11 @@ const settings = {
|
|
|
92
96
|
};
|
|
93
97
|
|
|
94
98
|
module.exports = [
|
|
95
|
-
eslintConfigPrettier,
|
|
96
99
|
{
|
|
97
100
|
plugins: {
|
|
98
|
-
|
|
101
|
+
jest: jestPlugin,
|
|
102
|
+
cypress,
|
|
103
|
+
'@typescript-eslint': tseslint.plugin,
|
|
99
104
|
},
|
|
100
105
|
},
|
|
101
106
|
importX.flatConfigs.typescript,
|
|
@@ -122,8 +127,24 @@ module.exports = [
|
|
|
122
127
|
settings,
|
|
123
128
|
rules: baseRules,
|
|
124
129
|
},
|
|
130
|
+
eslintConfigPrettier,
|
|
131
|
+
{
|
|
132
|
+
languageOptions: {
|
|
133
|
+
globals: {
|
|
134
|
+
...globals.node,
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
parserOptions: {
|
|
138
|
+
requireConfigFile: false,
|
|
139
|
+
ecmaVersion: 'latest',
|
|
140
|
+
sourceType: 'module',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
settings,
|
|
144
|
+
rules: eslintConfigPrettierOverrideRules,
|
|
145
|
+
},
|
|
125
146
|
...[...tseslint.configs.recommended, ...tseslint.configs.stylistic].map(
|
|
126
|
-
(config) => ({
|
|
147
|
+
({ plugins, ...config }) => ({
|
|
127
148
|
...config,
|
|
128
149
|
files: [`**/*.{${tsExtensions}}`],
|
|
129
150
|
}),
|
|
@@ -153,6 +174,21 @@ module.exports = [
|
|
|
153
174
|
'@typescript-eslint/ban-ts-comment': OFF,
|
|
154
175
|
'@typescript-eslint/no-explicit-any': OFF,
|
|
155
176
|
'@typescript-eslint/explicit-function-return-type': OFF,
|
|
177
|
+
'@typescript-eslint/naming-convention': [
|
|
178
|
+
// TODO - upgrade to ERROR in next major version
|
|
179
|
+
WARN,
|
|
180
|
+
{
|
|
181
|
+
selector: 'typeLike',
|
|
182
|
+
format: ['PascalCase'],
|
|
183
|
+
leadingUnderscore: 'allow',
|
|
184
|
+
},
|
|
185
|
+
// 'typeLike' includes enums
|
|
186
|
+
// This selector opts out of the rule for enums
|
|
187
|
+
{
|
|
188
|
+
selector: 'enum',
|
|
189
|
+
format: [],
|
|
190
|
+
},
|
|
191
|
+
],
|
|
156
192
|
'@typescript-eslint/no-empty-function': OFF,
|
|
157
193
|
'@typescript-eslint/no-empty-interface': OFF,
|
|
158
194
|
'@typescript-eslint/no-inferrable-types': [
|
|
@@ -187,6 +223,7 @@ module.exports = [
|
|
|
187
223
|
// However, there is a pending PR which improves the behaviour of this rule https://github.com/import-js/eslint-plugin-import/pull/2716
|
|
188
224
|
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports
|
|
189
225
|
'import-x/no-duplicates': [ERROR, { 'prefer-inline': true }],
|
|
226
|
+
'import-x/export': ERROR,
|
|
190
227
|
},
|
|
191
228
|
},
|
|
192
229
|
{
|
|
@@ -204,6 +241,7 @@ module.exports = [
|
|
|
204
241
|
{ commonjs: true, amd: true, ignore: ['.svg$', '^file?'] },
|
|
205
242
|
],
|
|
206
243
|
'import-x/no-duplicates': ERROR,
|
|
244
|
+
'import-x/export': ERROR,
|
|
207
245
|
},
|
|
208
246
|
},
|
|
209
247
|
{
|
|
@@ -218,7 +256,6 @@ module.exports = [
|
|
|
218
256
|
`**/__tests__/**/*.{${allExtensions}}`,
|
|
219
257
|
`**/*.@(spec|test).{${allExtensions}}`,
|
|
220
258
|
],
|
|
221
|
-
plugins: { jest: jestPlugin },
|
|
222
259
|
languageOptions: {
|
|
223
260
|
globals: {
|
|
224
261
|
...globals.jest,
|
|
@@ -229,13 +266,4 @@ module.exports = [
|
|
|
229
266
|
...cypress.configs.recommended,
|
|
230
267
|
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
231
268
|
},
|
|
232
|
-
{
|
|
233
|
-
files: [`**/cypress/**/*.{${allExtensions}}`],
|
|
234
|
-
plugins: { cypress },
|
|
235
|
-
languageOptions: {
|
|
236
|
-
globals: {
|
|
237
|
-
...cypress.environments.globals.globals,
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
269
|
];
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const react = require('eslint-plugin-react');
|
|
2
2
|
const reactHooks = require('eslint-plugin-react-hooks');
|
|
3
3
|
const base = require('./base');
|
|
4
|
-
const { fixupPluginRules } = require('@eslint/compat');
|
|
5
4
|
|
|
6
5
|
const globals = require('globals');
|
|
7
6
|
|
|
@@ -30,7 +29,7 @@ module.exports = [
|
|
|
30
29
|
{
|
|
31
30
|
plugins: {
|
|
32
31
|
react,
|
|
33
|
-
'react-hooks':
|
|
32
|
+
'react-hooks': reactHooks,
|
|
34
33
|
},
|
|
35
34
|
|
|
36
35
|
languageOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seek",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-fix-naming-convention-rule-format-20250602054747",
|
|
4
4
|
"description": "ESLint configuration used by SEEK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -19,23 +19,22 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/seek-oss/eslint-config-seek#readme",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@eslint/compat": "^1.1.1",
|
|
23
22
|
"typescript-eslint": "^8.6.0",
|
|
24
|
-
"eslint-config-prettier": "^
|
|
25
|
-
"eslint-import-resolver-typescript": "^
|
|
26
|
-
"eslint-plugin-cypress": "^
|
|
27
|
-
"eslint-plugin-import-x": "^4.
|
|
23
|
+
"eslint-config-prettier": "^10.0.0",
|
|
24
|
+
"eslint-import-resolver-typescript": "^4.0.0",
|
|
25
|
+
"eslint-plugin-cypress": "^4.0.0",
|
|
26
|
+
"eslint-plugin-import-x": "^4.9.0",
|
|
28
27
|
"eslint-plugin-jest": "^28.8.0",
|
|
29
28
|
"eslint-plugin-react": "^7.35.0",
|
|
30
|
-
"eslint-plugin-react-hooks": "^
|
|
31
|
-
"globals": "^
|
|
29
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
30
|
+
"globals": "^16.0.0"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
33
|
"@changesets/cli": "^2.27.7",
|
|
35
34
|
"@changesets/get-github-info": "^0.6.0",
|
|
36
35
|
"eslint": "^9.8.0",
|
|
37
36
|
"prettier": "^3.3.3",
|
|
38
|
-
"typescript": "~5.
|
|
37
|
+
"typescript": "~5.8.0"
|
|
39
38
|
},
|
|
40
39
|
"peerDependencies": {
|
|
41
40
|
"eslint": ">=9.9.1",
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"node": ">=18.18.0"
|
|
46
45
|
},
|
|
47
46
|
"volta": {
|
|
48
|
-
"node": "
|
|
47
|
+
"node": "22.15.1"
|
|
49
48
|
},
|
|
50
49
|
"scripts": {
|
|
51
50
|
"release": "changeset publish",
|