@alexlit/config-eslint 159.1.0 → 160.0.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/package.json +6 -5
- package/plugins/import-x.js +5 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "160.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Sharable ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
"@eslint/json": "^2.1.0",
|
|
45
45
|
"@intlify/eslint-plugin-vue-i18n": "^4.5.1",
|
|
46
46
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
47
|
-
"@tanstack/eslint-plugin-query": "^5.104.
|
|
47
|
+
"@tanstack/eslint-plugin-query": "^5.104.1",
|
|
48
48
|
"@unocss/eslint-config": "^66.10.5",
|
|
49
49
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
50
|
-
"eslint": "^10.
|
|
50
|
+
"eslint": "^10.12.0",
|
|
51
51
|
"eslint-config-prettier": "^10.1.8",
|
|
52
52
|
"eslint-plugin-de-morgan": "^2.2.0",
|
|
53
53
|
"eslint-plugin-import-x": "^4.17.1",
|
|
54
|
-
"eslint-plugin-jsdoc": "^65.0
|
|
54
|
+
"eslint-plugin-jsdoc": "^65.1.0",
|
|
55
55
|
"eslint-plugin-perfectionist": "^5.12.1",
|
|
56
56
|
"eslint-plugin-pinia": "^0.4.2",
|
|
57
57
|
"eslint-plugin-prettier": "^5.5.6",
|
|
58
58
|
"eslint-plugin-regexp": "^3.3.1",
|
|
59
59
|
"eslint-plugin-sonarjs": "^4.2.2",
|
|
60
60
|
"eslint-plugin-tailwindcss": "^4.4.0",
|
|
61
|
-
"eslint-plugin-unicorn": "^
|
|
61
|
+
"eslint-plugin-unicorn": "^77.0.0",
|
|
62
62
|
"eslint-plugin-vue": "^10.11.1",
|
|
63
63
|
"eslint-plugin-vuejs-accessibility": "^2.6.0",
|
|
64
64
|
"eslint-plugin-zod": "^5.0.0",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"jsonc-eslint-parser": "^3.3.0",
|
|
67
67
|
"typescript": "^6.0.3",
|
|
68
68
|
"typescript-eslint": "^8.71.0",
|
|
69
|
+
"vue-eslint-parser": "^10.4.1",
|
|
69
70
|
"yaml-eslint-parser": "^2.1.0"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
package/plugins/import-x.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import plugin from 'eslint-plugin-import-x';
|
|
2
2
|
import { createNodeResolver } from 'eslint-plugin-import-x/node-resolver';
|
|
3
3
|
import { defineConfig } from 'eslint/config';
|
|
4
|
+
import vueParser from 'vue-eslint-parser';
|
|
4
5
|
|
|
5
6
|
import { DATA_FILES, FILES, VUE_FILES } from '../base.js';
|
|
6
7
|
|
|
@@ -19,8 +20,6 @@ const EXTENSIONS = [
|
|
|
19
20
|
|
|
20
21
|
/** @see [eslint-plugin-import-x](https://github.com/un-ts/eslint-plugin-import-x) */
|
|
21
22
|
export const importX = defineConfig([
|
|
22
|
-
// `recommended` comes without a `files` key, so it would also land on data
|
|
23
|
-
// files, which are not modules and have nothing to import from.
|
|
24
23
|
{ ...plugin.flatConfigs.recommended, files: FILES, ignores: DATA_FILES },
|
|
25
24
|
|
|
26
25
|
{
|
|
@@ -34,46 +33,23 @@ export const importX = defineConfig([
|
|
|
34
33
|
'import-x/no-absolute-path': 'error',
|
|
35
34
|
'import-x/no-cycle': 'error',
|
|
36
35
|
'import-x/no-extraneous-dependencies': 'error',
|
|
37
|
-
// Both come from `recommended`, but they are wrong for ESLint plugins:
|
|
38
|
-
// the default export is the plugin object, so `plugin.configs` is a
|
|
39
|
-
// property of it, not a named export of the package. Some packages even
|
|
40
|
-
// export `plugin` as a named export, which makes `no-named-as-default`
|
|
41
|
-
// fire on the conventional `import plugin from '…'` line.
|
|
42
36
|
'import-x/no-named-as-default': 'off',
|
|
43
37
|
'import-x/no-named-as-default-member': 'off',
|
|
44
38
|
'import-x/no-nodejs-modules': 'off',
|
|
45
39
|
'import-x/no-self-import': 'error',
|
|
46
|
-
'import-x/no-unresolved': 'off',
|
|
40
|
+
'import-x/no-unresolved': 'off',
|
|
47
41
|
'import-x/no-useless-path-segments': ['error', { noUselessIndex: true }],
|
|
48
42
|
'import-x/unambiguous': 'error',
|
|
49
43
|
},
|
|
50
44
|
settings: {
|
|
51
45
|
'import-x/extensions': EXTENSIONS,
|
|
52
|
-
'import-x/
|
|
53
|
-
|
|
54
|
-
// other aliases are resolved the same way the bundler resolves them.
|
|
46
|
+
'import-x/ignore': ['node_modules', String.raw`\.vue$`],
|
|
47
|
+
'import-x/parsers': { '.vue': [vueParser] },
|
|
55
48
|
'import-x/resolver-next': [
|
|
56
49
|
createNodeResolver({ extensions: EXTENSIONS, tsconfig: 'auto' }),
|
|
57
50
|
],
|
|
58
51
|
},
|
|
59
52
|
},
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
// files: TEST_FILES,
|
|
63
|
-
// rules: {
|
|
64
|
-
// 'import-x/no-extraneous-dependencies': [
|
|
65
|
-
// 'error',
|
|
66
|
-
// { devDependencies: true },
|
|
67
|
-
// ],
|
|
68
|
-
// },
|
|
69
|
-
// },
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
files: VUE_FILES,
|
|
73
|
-
rules: {
|
|
74
|
-
// A component without a `<script>` block is a valid component, not an
|
|
75
|
-
// ambiguous module that needs explicit imports.
|
|
76
|
-
'import-x/unambiguous': 'off',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
54
|
+
{ files: VUE_FILES, rules: { 'import-x/unambiguous': 'off' } },
|
|
79
55
|
]);
|