@mikey-pro/eslint-config 10.3.7 → 10.3.8

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.
Files changed (2) hide show
  1. package/base-config.js +12 -8
  2. package/package.json +1 -1
package/base-config.js CHANGED
@@ -150,10 +150,20 @@ export const baseConfig = {
150
150
  ],
151
151
  'import-x/no-useless-path-segments': 'error',
152
152
  'import-x/no-webpack-loader-syntax': 'error',
153
+ // Must agree with simple-import-sort/imports (node: builtins, packages,
154
+ // then aliases like @/, then relative with parent/sibling/index merged).
155
+ // simple-import-sort owns ordering within a group (no alphabetize here:
156
+ // it would put '.' before '../x', the opposite of simple-import-sort), and
157
+ // scoped packages (@scope/pkg) sort among externals, so no '@*' pathGroup.
153
158
  'import-x/order': [
154
159
  'error',
155
160
  {
156
- alphabetize: { order: 'asc' },
161
+ groups: [
162
+ 'builtin',
163
+ 'external',
164
+ 'internal',
165
+ ['parent', 'sibling', 'index'],
166
+ ],
157
167
  'newlines-between': 'always',
158
168
  pathGroups: [
159
169
  {
@@ -161,15 +171,9 @@ export const baseConfig = {
161
171
  pattern: 'node:*',
162
172
  position: 'before',
163
173
  },
164
- {
165
- group: 'external',
166
- pattern: '@*',
167
- position: 'after',
168
- },
169
174
  {
170
175
  group: 'internal',
171
- pattern: '@/**',
172
- position: 'after',
176
+ pattern: '{@,~}/**',
173
177
  },
174
178
  ],
175
179
  pathGroupsExcludedImportTypes: ['builtin'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "10.3.7",
3
+ "version": "10.3.8",
4
4
  "description": "Mikey Pro ESLint configuration - Ultimate coding style guide for excellence",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",