eslint-plugin-vue-kuzzle 1.0.2 → 2.0.0-dev.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/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Kuzzle Coding Standard for Vue.js.
|
|
4
4
|
|
|
5
|
-
📖 **[Full documentation](https://docs.kuzzle.io/official-plugins/eslint/
|
|
5
|
+
📖 **[Full documentation](https://docs.kuzzle.io/official-plugins/eslint/2/guides/frontend/)**
|
|
6
6
|
|
|
7
7
|
This plugin is standalone: `eslint-plugin-vue`, `@vue/eslint-config-typescript`,
|
|
8
|
-
`@vue/eslint-config-prettier`, `typescript-eslint` and `eslint-plugin-import`
|
|
8
|
+
`@vue/eslint-config-prettier`, `typescript-eslint` and `eslint-plugin-import-x`
|
|
9
9
|
ship with it, so a consuming project only needs `eslint` itself.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -34,7 +34,7 @@ eslintrc support, and every config is now a plain array you spread.
|
|
|
34
34
|
- `vueKuzzle.configs.default`: the full standard — `base`, the Vue-aware
|
|
35
35
|
TypeScript parser setup from `@vue/eslint-config-typescript`, then
|
|
36
36
|
`typescript`. This is what you want unless you have a reason not to
|
|
37
|
-
- `vueKuzzle.configs.base`: Vue recommended rules, `import/order`, `no-console`,
|
|
37
|
+
- `vueKuzzle.configs.base`: Vue recommended rules, `import-x/order`, `no-console`,
|
|
38
38
|
`no-debugger`, then Prettier. No TypeScript
|
|
39
39
|
- `vueKuzzle.configs.typescript`: the Kuzzle TypeScript rules alone, applied to
|
|
40
40
|
`.ts`, `.tsx` and `.vue`. Composing this yourself means also providing a
|
|
@@ -49,7 +49,7 @@ config your project actually wants.
|
|
|
49
49
|
|
|
50
50
|
## Overriding
|
|
51
51
|
|
|
52
|
-
`import/order` is opinionated about aliases, and assumes `~` and `@`. Turn it
|
|
52
|
+
`import-x/order` is opinionated about aliases, and assumes `~` and `@`. Turn it
|
|
53
53
|
off, or reconfigure it with the exported helper:
|
|
54
54
|
|
|
55
55
|
```js
|
|
@@ -60,12 +60,26 @@ export default [
|
|
|
60
60
|
...vueKuzzle.configs.default,
|
|
61
61
|
{
|
|
62
62
|
rules: {
|
|
63
|
-
'import/order': ['error', importOptions(['@src', '@components'])],
|
|
63
|
+
'import-x/order': ['error', importOptions(['@src', '@components'])],
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
];
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
## Migrating from 1.x
|
|
70
|
+
|
|
71
|
+
`eslint-plugin-import` is replaced by `eslint-plugin-import-x`, the maintained
|
|
72
|
+
fork: `import/order` becomes `import-x/order`. Rename it in your own overrides
|
|
73
|
+
and in any `eslint-disable` comment — an override left on the old name is
|
|
74
|
+
silently ignored. `importOptions()` itself is unchanged.
|
|
75
|
+
|
|
76
|
+
`eslint-plugin-import` 2.32.0, its latest release, calls
|
|
77
|
+
`sourceCode.getTokenOrCommentBefore()`, which ESLint 10 removed: the rule
|
|
78
|
+
crashed the lint run instead of reporting.
|
|
79
|
+
|
|
80
|
+
See the [migration guide](https://docs.kuzzle.io/official-plugins/eslint/2/guides/migration/)
|
|
81
|
+
for the details.
|
|
82
|
+
|
|
69
83
|
## Migrating from 1.0.0-eslint-9.x
|
|
70
84
|
|
|
71
85
|
Those prereleases never worked. The published tarball shipped `lib/*.ts` while
|
package/dist/configs/base.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import prettier from '@vue/eslint-config-prettier';
|
|
2
|
-
import importPlugin from 'eslint-plugin-import';
|
|
2
|
+
import importPlugin from 'eslint-plugin-import-x';
|
|
3
3
|
import pluginVue from 'eslint-plugin-vue';
|
|
4
4
|
import importOptions from '../utils/importOptions.js';
|
|
5
5
|
/**
|
|
@@ -12,10 +12,10 @@ const baseConfig = [
|
|
|
12
12
|
...pluginVue.configs['flat/recommended'],
|
|
13
13
|
{
|
|
14
14
|
plugins: {
|
|
15
|
-
import: importPlugin,
|
|
15
|
+
'import-x': importPlugin,
|
|
16
16
|
},
|
|
17
17
|
rules: {
|
|
18
|
-
'import/order': ['error', importOptions(['~', '@'])],
|
|
18
|
+
'import-x/order': ['error', importOptions(['~', '@'])],
|
|
19
19
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
20
20
|
'no-debugger': 'error',
|
|
21
21
|
},
|
package/dist/configs/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../lib/configs/base.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,YAAY,MAAM,
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../lib/configs/base.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,6BAA6B,CAAC;AACnD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,GAAoC;IAClD,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACxC;QACE,OAAO,EAAE;YACP,UAAU,EAAE,YAAY;SACzB;QACD,KAAK,EAAE;YACL,gBAAgB,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACtD,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;YACrD,aAAa,EAAE,OAAO;SACvB;KACF;IACD,QAAQ;CACT,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ? Eslint plugin rules are not applicable for this function, because it's not a code of eslint rule
|
|
2
|
-
/* eslint-disable eslint-plugin/prefer-
|
|
2
|
+
/* eslint-disable eslint-plugin/prefer-object-rule, eslint-plugin/require-meta-type, eslint-plugin/require-meta-schema */
|
|
3
3
|
const importOptions = (alias) => {
|
|
4
4
|
const aliases = Array.isArray(alias) ? alias : [alias];
|
|
5
5
|
return {
|
|
@@ -14,7 +14,7 @@ const importOptions = (alias) => {
|
|
|
14
14
|
],
|
|
15
15
|
/**
|
|
16
16
|
* ? Particular case: need to exclude `vue` of external import group to can be sorted with pattern
|
|
17
|
-
* @see https://github.com/
|
|
17
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/order.md#pathgroupsexcludedimporttypes-array
|
|
18
18
|
*/
|
|
19
19
|
pathGroupsExcludedImportTypes: ['vue'],
|
|
20
20
|
'newlines-between': 'always',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importOptions.js","sourceRoot":"","sources":["../../lib/utils/importOptions.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,
|
|
1
|
+
{"version":3,"file":"importOptions.js","sourceRoot":"","sources":["../../lib/utils/importOptions.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,yHAAyH;AACzH,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAE,EAAE;IACjD,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAEvD,OAAO;QACL,MAAM,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC;QACpD,UAAU,EAAE;YACV,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE;YACzD,+DAA+D;YAC/D,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YAC/E,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE;YAC9D,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;YAC1E,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE;SAC1D;QACD;;;WAGG;QACH,6BAA6B,EAAE,CAAC,KAAK,CAAC;QACtC,kBAAkB,EAAE,QAAQ;QAC5B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE;YACX,KAAK,EAAE,KAAK;SACb;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-vue-kuzzle",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-dev.1",
|
|
4
4
|
"description": "Kuzzle Vue Coding Standard",
|
|
5
5
|
"homepage": "https://github.com/kuzzleio/eslint-plugin-kuzzle",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "npm run clean && tsc --build"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"eslint": "^9.10.0",
|
|
27
|
+
"eslint": "^9.10.0 || ^10.0.0",
|
|
28
28
|
"typescript": ">= 5.2.0 <6.1.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependenciesMeta": {
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
37
37
|
"@vue/eslint-config-typescript": "^14.9.0",
|
|
38
|
-
"eslint-plugin-import": "^
|
|
38
|
+
"eslint-plugin-import-x": "^4.17.1",
|
|
39
39
|
"eslint-plugin-vue": "^10.11.0",
|
|
40
40
|
"globals": "^16.5.0",
|
|
41
41
|
"typescript-eslint": "^8.70.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^22.20.
|
|
44
|
+
"@types/node": "^22.20.3",
|
|
45
45
|
"@typescript-eslint/utils": "^8.70.0",
|
|
46
|
-
"rimraf": "^6.
|
|
46
|
+
"rimraf": "^6.1.3",
|
|
47
47
|
"typescript": "~5.9.0",
|
|
48
|
-
"vitest": "^
|
|
48
|
+
"vitest": "^5.0.1"
|
|
49
49
|
},
|
|
50
50
|
"license": "Apache-2.0",
|
|
51
51
|
"files": [
|