@scayle/eslint-config-storefront 4.7.25 → 4.8.1
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/CHANGELOG.md +22 -6
- package/README.md +3 -3
- package/config/flat/index.mjs +36 -29
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @aboutyou/eslint-config-sfc
|
|
2
2
|
|
|
3
|
+
## 4.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `@antfu/eslint-config@^8.0.0` to `@antfu/eslint-config@^9.0.0`
|
|
8
|
+
- Updated dependency `@eslint/eslintrc@^3.2.0` to `@eslint/eslintrc@^3.3.5`
|
|
9
|
+
- Updated dependency `eslint-config-flat-gitignore@^2.0.0` to `eslint-config-flat-gitignore@^2.2.0`
|
|
10
|
+
- Updated dependency `eslint-flat-config-utils@^3.0.0` to `eslint-flat-config-utils@^3.2.0`
|
|
11
|
+
- Updated dependency `eslint-plugin-import-x@^4.16.1` to `eslint-plugin-import-x@^4.16.2`
|
|
12
|
+
- Updated dependency `eslint-plugin-promise@^7.2.1` to `eslint-plugin-promise@^7.3.0`
|
|
13
|
+
- Updated dependency `eslint-plugin-sonarjs@^4.0.0` to `eslint-plugin-sonarjs@^4.0.3`
|
|
14
|
+
- Updated dependency `local-pkg@^1.0.0` to `local-pkg@^1.2.1`
|
|
15
|
+
- Updated dependency `typescript-eslint@8.57.2` to `typescript-eslint@8.60.0`
|
|
16
|
+
|
|
17
|
+
## 4.8.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- All packages now require Node.js 22 or later, in line with the current Node.js LTS release schedule. See the [Node.js release schedule](https://nodejs.org/en/about/previous-releases#release-schedule) for details.
|
|
22
|
+
|
|
23
|
+
If your project is still running an older Node.js version, now is a good time to upgrade to Node.js 22 at minimum, or ideally Node.js 24, for the latest security patches and stability improvements.
|
|
24
|
+
|
|
3
25
|
## 4.7.25
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -184,7 +206,6 @@
|
|
|
184
206
|
- Added eslint plugin `eslint-plugin-import-x` to support additional import-related rules.
|
|
185
207
|
|
|
186
208
|
The following rules have been added and set to throw errors:
|
|
187
|
-
|
|
188
209
|
- `'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level']'`
|
|
189
210
|
- `'import-x/first': 'error'`
|
|
190
211
|
- `'import-x/no-duplicates': 'error'`
|
|
@@ -301,7 +322,6 @@
|
|
|
301
322
|
### Minor Changes
|
|
302
323
|
|
|
303
324
|
- We've updated to `eslint-plugin-sonarjs@3.x`. This fixes the executions of multiple SonarJS rules like "cognitive-complexity" during linting and also adds additional new rules.
|
|
304
|
-
|
|
305
325
|
- Check the official [`eslint-plugin-sonarjs` - CHANGELOG.md](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/CHANGELOG.md) for more details.
|
|
306
326
|
|
|
307
327
|
### Patch Changes
|
|
@@ -448,7 +468,6 @@
|
|
|
448
468
|
### Major Changes
|
|
449
469
|
|
|
450
470
|
- **Changed NPM package names**
|
|
451
|
-
|
|
452
471
|
- **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
|
|
453
472
|
- **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
|
|
454
473
|
- **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core`
|
|
@@ -457,7 +476,6 @@
|
|
|
457
476
|
|
|
458
477
|
_NOTE: Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
|
|
459
478
|
it is required to change the consuming projects local `.npmrc` file as follows:_
|
|
460
|
-
|
|
461
479
|
- Before:
|
|
462
480
|
|
|
463
481
|
```
|
|
@@ -478,7 +496,6 @@
|
|
|
478
496
|
### Major Changes
|
|
479
497
|
|
|
480
498
|
- **Changed NPM package names**
|
|
481
|
-
|
|
482
499
|
- **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-nuxt` to `@scayle/storefront-nuxt2`
|
|
483
500
|
- **Breaking**: Change package scope and name of `@aboutyou/sfc-nuxt3` to `@scayle/storefront-nuxt`
|
|
484
501
|
- **Breaking**: Change package scope and name of `@aboutyou/scayle-sfc-lib` to `@scayle/storefront-core``
|
|
@@ -487,7 +504,6 @@
|
|
|
487
504
|
|
|
488
505
|
Due to the changes of the NPM package scope from `@aboutyou` to `@scayle`,
|
|
489
506
|
it is required to change the consuming projects local `.npmrc` file as follows:
|
|
490
|
-
|
|
491
507
|
- Before: `@aboutyou:registry=https://gitlab.com/api/v4/packages/npm/`
|
|
492
508
|
- After: `@scayle:registry=https://gitlab.com/api/v4/packages/npm/`
|
|
493
509
|
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
56
56
|
// Auto fix
|
|
57
57
|
"editor.codeActionsOnSave": {
|
|
58
58
|
"source.fixAll.eslint": "explicit",
|
|
59
|
-
"source.organizeImports": "never"
|
|
59
|
+
"source.organizeImports": "never",
|
|
60
60
|
},
|
|
61
61
|
|
|
62
62
|
// Enable eslint for all supported languages
|
|
@@ -70,8 +70,8 @@ Add the following settings to your `.vscode/settings.json`:
|
|
|
70
70
|
"markdown",
|
|
71
71
|
"json",
|
|
72
72
|
"jsonc",
|
|
73
|
-
"yaml"
|
|
74
|
-
]
|
|
73
|
+
"yaml",
|
|
74
|
+
],
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
|
package/config/flat/index.mjs
CHANGED
|
@@ -28,10 +28,12 @@ import { importX } from './importX.mjs'
|
|
|
28
28
|
* @param {string=} config.typescript.tsconfigPath
|
|
29
29
|
* @returns {FlatConfigComposer<Linter.FlatConfig<Linter.RulesRecord>, never>} Returns a FlatConfigComposer object to be consumed in projects eslint.config.mjs files
|
|
30
30
|
*/
|
|
31
|
-
export const eslintConfigStorefront = function(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
export const eslintConfigStorefront = function (
|
|
32
|
+
config = {
|
|
33
|
+
isNuxt: isPackageExists('@nuxt/eslint'),
|
|
34
|
+
typescript: { tsconfigPath: undefined },
|
|
35
|
+
},
|
|
36
|
+
) {
|
|
35
37
|
const flatConfigComposer = new FlatConfigComposer()
|
|
36
38
|
const isNuxtProject = config.isNuxt
|
|
37
39
|
|
|
@@ -62,21 +64,24 @@ export const eslintConfigStorefront = function(config = {
|
|
|
62
64
|
const CURLY_RULE = ['error', 'all']
|
|
63
65
|
|
|
64
66
|
const TYPESCRIPT_RULES = {
|
|
65
|
-
|
|
67
|
+
curly: CURLY_RULE,
|
|
66
68
|
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
|
|
67
|
-
'@typescript-eslint/no-empty-object-type': [
|
|
68
|
-
'
|
|
69
|
-
|
|
69
|
+
'@typescript-eslint/no-empty-object-type': [
|
|
70
|
+
'error',
|
|
71
|
+
{
|
|
72
|
+
allowInterfaces: 'always',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
70
75
|
'@typescript-eslint/no-unused-vars': [
|
|
71
76
|
'error',
|
|
72
77
|
{
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
args: 'all',
|
|
79
|
+
argsIgnorePattern: '^_',
|
|
80
|
+
caughtErrors: 'all',
|
|
81
|
+
caughtErrorsIgnorePattern: '^_',
|
|
82
|
+
destructuredArrayIgnorePattern: '^_',
|
|
83
|
+
varsIgnorePattern: '^_',
|
|
84
|
+
ignoreRestSiblings: true,
|
|
80
85
|
},
|
|
81
86
|
],
|
|
82
87
|
}
|
|
@@ -91,11 +96,15 @@ export const eslintConfigStorefront = function(config = {
|
|
|
91
96
|
]
|
|
92
97
|
|
|
93
98
|
const GLOBAL_RULES = {
|
|
94
|
-
|
|
99
|
+
curly: CURLY_RULE,
|
|
95
100
|
'node/prefer-global/process': 'off',
|
|
96
101
|
}
|
|
97
102
|
|
|
98
|
-
const TEST_RULES = {
|
|
103
|
+
const TEST_RULES = {
|
|
104
|
+
'no-console': 'off',
|
|
105
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
106
|
+
'promise/avoid-new': 'off',
|
|
107
|
+
}
|
|
99
108
|
|
|
100
109
|
const IGNORE_PATTERNS = ['**/fixtures/**/*', '**/*.jsonc']
|
|
101
110
|
|
|
@@ -103,15 +112,15 @@ export const eslintConfigStorefront = function(config = {
|
|
|
103
112
|
// don't need to be extended from `@antfu/eslint-config` if it is used
|
|
104
113
|
const nonNuxtRules = !isNuxtProject
|
|
105
114
|
? combine(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
gitignore(),
|
|
116
|
+
ignores(),
|
|
117
|
+
importX(),
|
|
118
|
+
javascript(),
|
|
119
|
+
typescript(config.typescript),
|
|
120
|
+
jsdoc(),
|
|
121
|
+
tseslint.configs.recommended,
|
|
122
|
+
[{ rules: TYPESCRIPT_RULES }],
|
|
123
|
+
)
|
|
115
124
|
: {}
|
|
116
125
|
|
|
117
126
|
const configs = [
|
|
@@ -142,7 +151,5 @@ export const eslintConfigStorefront = function(config = {
|
|
|
142
151
|
},
|
|
143
152
|
]
|
|
144
153
|
|
|
145
|
-
return flatConfigComposer.append(
|
|
146
|
-
...configs,
|
|
147
|
-
)
|
|
154
|
+
return flatConfigComposer.append(...configs)
|
|
148
155
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/eslint-config-storefront",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.1",
|
|
4
4
|
"description": "SCAYLE Commerce Engine specific eslint configuration",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
"./index.mjs",
|
|
30
30
|
"./config/"
|
|
31
31
|
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">= 22.0.0"
|
|
34
|
+
},
|
|
32
35
|
"peerDependencies": {
|
|
33
36
|
"eslint": ">=9.0.0",
|
|
34
37
|
"typescript": ">=5.4.0"
|
|
35
38
|
},
|
|
36
39
|
"dependencies": {
|
|
37
|
-
"@antfu/eslint-config": "^
|
|
38
|
-
"@eslint/eslintrc": "^3.
|
|
39
|
-
"eslint-config-flat-gitignore": "^2.
|
|
40
|
-
"eslint-flat-config-utils": "^3.
|
|
41
|
-
"eslint-plugin-import-x": "^4.16.
|
|
42
|
-
"eslint-plugin-promise": "^7.
|
|
43
|
-
"eslint-plugin-sonarjs": "^4.0.
|
|
44
|
-
"local-pkg": "^1.
|
|
45
|
-
"typescript-eslint": "8.
|
|
40
|
+
"@antfu/eslint-config": "^9.0.0",
|
|
41
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
42
|
+
"eslint-config-flat-gitignore": "^2.2.0",
|
|
43
|
+
"eslint-flat-config-utils": "^3.2.0",
|
|
44
|
+
"eslint-plugin-import-x": "^4.16.2",
|
|
45
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
46
|
+
"eslint-plugin-sonarjs": "^4.0.3",
|
|
47
|
+
"local-pkg": "^1.2.1",
|
|
48
|
+
"typescript-eslint": "8.60.0"
|
|
46
49
|
},
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"eslint": "
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"typescript": "5.9.3"
|
|
51
|
+
"eslint": "10.4.0",
|
|
52
|
+
"eslint-formatter-gitlab": "7.1.0",
|
|
53
|
+
"publint": "0.3.21",
|
|
54
|
+
"typescript": "6.0.3"
|
|
53
55
|
},
|
|
54
56
|
"scripts": {
|
|
55
|
-
"format": "dprint check",
|
|
56
|
-
"format:fix": "dprint fmt",
|
|
57
57
|
"lint": "eslint .",
|
|
58
58
|
"lint:ci": "eslint . --format gitlab",
|
|
59
59
|
"lint:fix": "eslint . --fix",
|