@scayle/eslint-config-storefront 4.5.14 → 4.6.0
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 +21 -0
- package/config/flat/index.mjs +22 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @aboutyou/eslint-config-sfc
|
|
2
2
|
|
|
3
|
+
## 4.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added eslint plugin `eslint-plugin-import-x` to support additional import-related rules.
|
|
8
|
+
|
|
9
|
+
The following rules have been added and set to throw errors:
|
|
10
|
+
|
|
11
|
+
- `'import-x/consistent-type-specifier-style': ['error', 'prefer-top-level']'`
|
|
12
|
+
- `'import-x/first': 'error'`
|
|
13
|
+
- `'import-x/no-duplicates': 'error'`
|
|
14
|
+
- `'import-x/no-mutable-exports': 'error'`
|
|
15
|
+
- `'import-x/no-named-default': 'error'`
|
|
16
|
+
- `'import-x/no-self-import': 'error'`
|
|
17
|
+
- `'import-x/no-extraneous-dependencies': 'error'`
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Added dependency `eslint-plugin-import-x@^4.16.1`
|
|
22
|
+
- Updated dependency `typescript-eslint@8.35.1` to `typescript-eslint@8.36.0`
|
|
23
|
+
|
|
3
24
|
## 4.5.14
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/config/flat/index.mjs
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
yaml,
|
|
16
16
|
} from '@antfu/eslint-config'
|
|
17
17
|
import gitignore from 'eslint-config-flat-gitignore'
|
|
18
|
+
import { importX } from 'eslint-plugin-import-x'
|
|
18
19
|
import tseslint from 'typescript-eslint'
|
|
19
20
|
import { sonarjs } from './sonarjs.mjs'
|
|
20
21
|
import { promise } from './promise.mjs'
|
|
@@ -42,6 +43,25 @@ export const eslintConfigStorefront = function(config = {
|
|
|
42
43
|
}) {
|
|
43
44
|
const flatConfigComposer = new FlatConfigComposer()
|
|
44
45
|
|
|
46
|
+
const importXConfig = {
|
|
47
|
+
plugins: {
|
|
48
|
+
'import-x': importX,
|
|
49
|
+
},
|
|
50
|
+
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
|
|
51
|
+
rules: {
|
|
52
|
+
'import-x/consistent-type-specifier-style': [
|
|
53
|
+
'error',
|
|
54
|
+
'prefer-top-level',
|
|
55
|
+
],
|
|
56
|
+
'import-x/first': 'error',
|
|
57
|
+
'import-x/no-duplicates': 'error',
|
|
58
|
+
'import-x/no-mutable-exports': 'error',
|
|
59
|
+
'import-x/no-named-default': 'error',
|
|
60
|
+
'import-x/no-self-import': 'error',
|
|
61
|
+
'import-x/no-extraneous-dependencies': 'error',
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
|
|
45
65
|
// The following rules are already handled by `@nuxt/eslint` and
|
|
46
66
|
// don't need to be extended from `@antfu/eslint-config` if it is used
|
|
47
67
|
const nonNuxtRules = !config.isNuxt
|
|
@@ -80,6 +100,7 @@ export const eslintConfigStorefront = function(config = {
|
|
|
80
100
|
],
|
|
81
101
|
},
|
|
82
102
|
}],
|
|
103
|
+
importXConfig,
|
|
83
104
|
)
|
|
84
105
|
: {}
|
|
85
106
|
|
|
@@ -93,6 +114,7 @@ export const eslintConfigStorefront = function(config = {
|
|
|
93
114
|
sonarjs(),
|
|
94
115
|
promise(),
|
|
95
116
|
sanitized(),
|
|
117
|
+
importXConfig,
|
|
96
118
|
),
|
|
97
119
|
nonNuxtRules,
|
|
98
120
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/eslint-config-storefront",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "SCAYLE Commerce Engine specific eslint configuration",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@eslint/eslintrc": "^3.2.0",
|
|
39
39
|
"eslint-config-flat-gitignore": "^2.0.0",
|
|
40
40
|
"eslint-flat-config-utils": "^2.0.0",
|
|
41
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
41
42
|
"eslint-plugin-no-unsanitized": "^4.1.2",
|
|
42
43
|
"eslint-plugin-promise": "^7.2.1",
|
|
43
44
|
"eslint-plugin-sonarjs": "^3.0.1",
|