@scayle/eslint-config-storefront 4.2.0 → 4.3.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 +23 -5
- package/README.md +4 -0
- package/config/flat/index.mjs +10 -1
- package/config/flat/sonarjs.mjs +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @aboutyou/eslint-config-sfc
|
|
2
2
|
|
|
3
|
+
## 4.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependency `@antfu/eslint-config@^2.21.3` to `@antfu/eslint-config@^3.0.0`
|
|
8
|
+
- Updated dependency `eslint-flat-config-utils@^0.3.0` to `eslint-flat-config-utils@^0.4.0`
|
|
9
|
+
- Updated dependency `eslint-config-flat-gitignore@^0.1.6` to `eslint-config-flat-gitignore@^0.3.0`
|
|
10
|
+
|
|
11
|
+
## 4.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- add explicit rule handling for test files and allow 'console.logs' within tests
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- disable eslint rules 'sonarjs/no-duplicate-string' and 'yaml/plain-scalar'
|
|
20
|
+
|
|
3
21
|
## 4.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -25,18 +43,18 @@
|
|
|
25
43
|
|
|
26
44
|
```js
|
|
27
45
|
// eslint.config.mjs
|
|
28
|
-
import eslintConfigStorefront from
|
|
46
|
+
import eslintConfigStorefront from '@scayle/eslint-config-storefront'
|
|
29
47
|
|
|
30
|
-
export default eslintConfigStorefront()
|
|
48
|
+
export default eslintConfigStorefront()
|
|
31
49
|
```
|
|
32
50
|
|
|
33
51
|
For Nuxt projects using `@nuxt/eslint` module:
|
|
34
52
|
|
|
35
53
|
```js
|
|
36
|
-
import withNuxt from
|
|
37
|
-
import eslintConfigStorefront from
|
|
54
|
+
import withNuxt from './.nuxt/eslint.config.mjs'
|
|
55
|
+
import eslintConfigStorefront from '@scayle/eslint-config-storefront'
|
|
38
56
|
|
|
39
|
-
export default withNuxt(eslintConfigStorefront())
|
|
57
|
+
export default withNuxt(eslintConfigStorefront())
|
|
40
58
|
```
|
|
41
59
|
|
|
42
60
|
The `@scayle/eslint-config-storefront` package exports a factory function `eslintConfigStorefront()`. The factory function is able to automatically detect if a project is using the `@nuxt/eslint` package and automatically disables certain duplicate rules that are provided by `@nuxt/eslint`. This can also manually be adjusted by passing `{ isNuxt: true }` as parameter to `eslintConfigStorefront()`.
|
package/README.md
CHANGED
package/config/flat/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FlatConfigComposer } from 'eslint-flat-config-utils'
|
|
2
2
|
import { isPackageExists } from 'local-pkg'
|
|
3
3
|
import {
|
|
4
|
+
GLOB_TESTS,
|
|
4
5
|
combine,
|
|
5
6
|
comments,
|
|
6
7
|
ignores,
|
|
@@ -69,10 +70,18 @@ export const eslintConfigStorefront = function(config = {
|
|
|
69
70
|
// Disable default rules by imported @antfu/eslint-config
|
|
70
71
|
rules: {
|
|
71
72
|
'node/prefer-global/process': 'off',
|
|
72
|
-
'yaml/plain-scalar': '
|
|
73
|
+
'yaml/plain-scalar': 'off',
|
|
73
74
|
},
|
|
74
75
|
ignores: ['**/fixtures/**/*'],
|
|
75
76
|
},
|
|
77
|
+
// Specific rules handling for test files
|
|
78
|
+
{
|
|
79
|
+
// See https://github.com/antfu/eslint-config/blob/main/src/globs.ts#L34
|
|
80
|
+
files: GLOB_TESTS,
|
|
81
|
+
rules: {
|
|
82
|
+
'no-console': 'off',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
76
85
|
]
|
|
77
86
|
|
|
78
87
|
return flatConfigComposer.append(
|
package/config/flat/sonarjs.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/eslint-config-storefront",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "SCAYLE Commerce Engine specific eslint configuration",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"typescript": "^5.4.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"local-pkg": "0.5.0",
|
|
39
|
-
"@antfu/eslint-config": "
|
|
40
|
-
"@eslint/eslintrc": "3.0
|
|
41
|
-
"eslint-flat-config-utils": "0.
|
|
42
|
-
"eslint-config-flat-gitignore": "0.
|
|
43
|
-
"eslint-plugin-no-unsanitized": "4.0.2",
|
|
44
|
-
"eslint-plugin-promise": "
|
|
45
|
-
"eslint-plugin-sonarjs": "1.0.3"
|
|
38
|
+
"local-pkg": "^0.5.0",
|
|
39
|
+
"@antfu/eslint-config": "^3.0.0",
|
|
40
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
41
|
+
"eslint-flat-config-utils": "^0.4.0",
|
|
42
|
+
"eslint-config-flat-gitignore": "^0.3.0",
|
|
43
|
+
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
44
|
+
"eslint-plugin-promise": "^7.0.0",
|
|
45
|
+
"eslint-plugin-sonarjs": "^1.0.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"dprint": "0.
|
|
49
|
-
"eslint": "9.
|
|
48
|
+
"dprint": "0.47.2",
|
|
49
|
+
"eslint": "9.12.0",
|
|
50
50
|
"eslint-formatter-gitlab": "5.1.0",
|
|
51
|
-
"publint": "0.2.
|
|
51
|
+
"publint": "0.2.11"
|
|
52
52
|
}
|
|
53
53
|
}
|