@sxzz/eslint-config 3.13.0 → 3.15.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/README.md +2 -0
- package/dist/index.d.ts +6 -8
- package/dist/index.js +66 -29
- package/package.json +19 -17
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ declare const imports: Linter.FlatConfig[];
|
|
|
29
29
|
declare const restrictedSyntaxJs: string[];
|
|
30
30
|
declare const javascript: Linter.FlatConfig[];
|
|
31
31
|
|
|
32
|
+
declare const jsdoc: Linter.FlatConfig[];
|
|
33
|
+
|
|
32
34
|
declare const jsonc: Linter.FlatConfig[];
|
|
33
35
|
|
|
34
36
|
declare const markdown: Linter.FlatConfig[];
|
|
@@ -42,7 +44,7 @@ declare const prettier: Linter.FlatConfig[];
|
|
|
42
44
|
declare const sortPackageJson: Linter.FlatConfig[];
|
|
43
45
|
declare const sortTsconfig: Linter.FlatConfig[];
|
|
44
46
|
|
|
45
|
-
declare const typescriptCore: Linter.FlatConfig
|
|
47
|
+
declare const typescriptCore: Linter.FlatConfig[];
|
|
46
48
|
declare const typescript: Linter.FlatConfig[];
|
|
47
49
|
|
|
48
50
|
declare const unicorn: Linter.FlatConfig[];
|
|
@@ -98,6 +100,7 @@ declare const pluginUnocss: typeof _unocss_eslint_plugin.default;
|
|
|
98
100
|
declare const pluginPrettier: any;
|
|
99
101
|
declare const configPrettier: any;
|
|
100
102
|
declare const pluginUnusedImports: any;
|
|
103
|
+
declare const pluginJsdoc: any;
|
|
101
104
|
|
|
102
105
|
/** Ignore common files and include javascript support */
|
|
103
106
|
declare const presetJavaScript: Linter.FlatConfig<Linter.RulesRecord>[];
|
|
@@ -117,12 +120,7 @@ declare const presetBasic: Linter.FlatConfig<Linter.RulesRecord>[];
|
|
|
117
120
|
*/
|
|
118
121
|
declare const presetAll: Linter.FlatConfig<Linter.RulesRecord>[];
|
|
119
122
|
|
|
120
|
-
/**
|
|
121
|
-
*
|
|
122
|
-
* @param config
|
|
123
|
-
* @param features
|
|
124
|
-
* @returns
|
|
125
|
-
*/
|
|
123
|
+
/** `sxzz`'s preset. */
|
|
126
124
|
declare function sxzz(config?: Linter.FlatConfig | Linter.FlatConfig[], { command: enableCommand, markdown: enableMarkdown, prettier: enablePrettier, unocss: enableUnocss, vue: enableVue, }?: Partial<{
|
|
127
125
|
/** Vue support. Auto-enable. */
|
|
128
126
|
vue: boolean;
|
|
@@ -136,4 +134,4 @@ declare function sxzz(config?: Linter.FlatConfig | Linter.FlatConfig[], { comman
|
|
|
136
134
|
command: boolean;
|
|
137
135
|
}>): Linter.FlatConfig[];
|
|
138
136
|
|
|
139
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, node, pluginAntfu, pluginComments, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
137
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropDefault, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsdoc, jsonc, markdown, node, pluginAntfu, pluginComments, pluginJsdoc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import * as _pluginUnocss from "@unocss/eslint-plugin";
|
|
|
11
11
|
import * as _pluginPrettier from "eslint-plugin-prettier";
|
|
12
12
|
import * as _configPrettier from "eslint-config-prettier";
|
|
13
13
|
import * as _pluginUnusedImports from "eslint-plugin-unused-imports";
|
|
14
|
+
import * as _pluginJsdoc from "eslint-plugin-jsdoc";
|
|
14
15
|
import * as pluginImport from "eslint-plugin-import-x";
|
|
15
16
|
import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
16
17
|
import * as pluginYml from "eslint-plugin-yml";
|
|
@@ -33,6 +34,7 @@ var pluginUnocss = /* @__PURE__ */ interopDefault(_pluginUnocss);
|
|
|
33
34
|
var pluginPrettier = /* @__PURE__ */ interopDefault(_pluginPrettier);
|
|
34
35
|
var configPrettier = /* @__PURE__ */ interopDefault(_configPrettier);
|
|
35
36
|
var pluginUnusedImports = /* @__PURE__ */ interopDefault(_pluginUnusedImports);
|
|
37
|
+
var pluginJsdoc = /* @__PURE__ */ interopDefault(_pluginJsdoc);
|
|
36
38
|
|
|
37
39
|
// src/configs/command.ts
|
|
38
40
|
var command = [default2()];
|
|
@@ -131,24 +133,7 @@ var imports = [
|
|
|
131
133
|
"import/no-mutable-exports": "error",
|
|
132
134
|
"import/no-named-default": "error",
|
|
133
135
|
"import/no-self-import": "error",
|
|
134
|
-
"import/no-webpack-loader-syntax": "error"
|
|
135
|
-
"import/order": [
|
|
136
|
-
"error",
|
|
137
|
-
{
|
|
138
|
-
groups: [
|
|
139
|
-
"builtin",
|
|
140
|
-
"external",
|
|
141
|
-
"internal",
|
|
142
|
-
"parent",
|
|
143
|
-
"sibling",
|
|
144
|
-
"index",
|
|
145
|
-
"object",
|
|
146
|
-
"type"
|
|
147
|
-
],
|
|
148
|
-
pathGroups: [{ group: "internal", pattern: "{{@,~}/,#}**" }],
|
|
149
|
-
pathGroupsExcludedImportTypes: ["type"]
|
|
150
|
-
}
|
|
151
|
-
]
|
|
136
|
+
"import/no-webpack-loader-syntax": "error"
|
|
152
137
|
}
|
|
153
138
|
},
|
|
154
139
|
{
|
|
@@ -305,16 +290,6 @@ var javascript = [
|
|
|
305
290
|
"prefer-template": "error",
|
|
306
291
|
"require-await": "error",
|
|
307
292
|
"require-yield": "error",
|
|
308
|
-
"sort-imports": [
|
|
309
|
-
"error",
|
|
310
|
-
{
|
|
311
|
-
allowSeparatedGroups: false,
|
|
312
|
-
ignoreCase: false,
|
|
313
|
-
ignoreDeclarationSort: true,
|
|
314
|
-
ignoreMemberSort: false,
|
|
315
|
-
memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
|
|
316
|
-
}
|
|
317
|
-
],
|
|
318
293
|
"unicode-bom": ["error", "never"],
|
|
319
294
|
"unused-imports/no-unused-imports": isInEditor ? "off" : "error",
|
|
320
295
|
"unused-imports/no-unused-vars": [
|
|
@@ -344,6 +319,32 @@ var javascript = [
|
|
|
344
319
|
}
|
|
345
320
|
];
|
|
346
321
|
|
|
322
|
+
// src/configs/jsdoc.ts
|
|
323
|
+
var jsdoc = [
|
|
324
|
+
{
|
|
325
|
+
plugins: {
|
|
326
|
+
jsdoc: pluginJsdoc
|
|
327
|
+
},
|
|
328
|
+
rules: {
|
|
329
|
+
"jsdoc/check-access": "warn",
|
|
330
|
+
"jsdoc/check-param-names": "warn",
|
|
331
|
+
"jsdoc/check-property-names": "warn",
|
|
332
|
+
"jsdoc/check-types": "warn",
|
|
333
|
+
"jsdoc/empty-tags": "warn",
|
|
334
|
+
"jsdoc/implements-on-classes": "warn",
|
|
335
|
+
"jsdoc/no-defaults": "warn",
|
|
336
|
+
"jsdoc/no-multi-asterisks": "warn",
|
|
337
|
+
"jsdoc/require-param-name": "warn",
|
|
338
|
+
"jsdoc/require-property": "warn",
|
|
339
|
+
"jsdoc/require-property-description": "warn",
|
|
340
|
+
"jsdoc/require-property-name": "warn",
|
|
341
|
+
"jsdoc/require-returns-check": "warn",
|
|
342
|
+
"jsdoc/require-returns-description": "warn",
|
|
343
|
+
"jsdoc/require-yields-check": "warn"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
];
|
|
347
|
+
|
|
347
348
|
// src/configs/jsonc.ts
|
|
348
349
|
var jsonc = [
|
|
349
350
|
{
|
|
@@ -416,6 +417,39 @@ var sortKeys = [
|
|
|
416
417
|
{
|
|
417
418
|
plugins: {
|
|
418
419
|
perfectionist: pluginPerfectionist
|
|
420
|
+
},
|
|
421
|
+
rules: {
|
|
422
|
+
"perfectionist/sort-imports": [
|
|
423
|
+
"warn",
|
|
424
|
+
{
|
|
425
|
+
groups: [
|
|
426
|
+
"builtin",
|
|
427
|
+
"external",
|
|
428
|
+
"internal",
|
|
429
|
+
"internal-type",
|
|
430
|
+
"parent",
|
|
431
|
+
"parent-type",
|
|
432
|
+
"sibling",
|
|
433
|
+
"sibling-type",
|
|
434
|
+
"index",
|
|
435
|
+
"index-type",
|
|
436
|
+
"object",
|
|
437
|
+
"type",
|
|
438
|
+
"side-effect",
|
|
439
|
+
"side-effect-style"
|
|
440
|
+
],
|
|
441
|
+
internalPattern: ["~/**", "@/**", "#**"],
|
|
442
|
+
newlinesBetween: "ignore"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"perfectionist/sort-named-exports": [
|
|
446
|
+
"warn",
|
|
447
|
+
{ groupKind: "values-first" }
|
|
448
|
+
],
|
|
449
|
+
"perfectionist/sort-named-imports": [
|
|
450
|
+
"warn",
|
|
451
|
+
{ groupKind: "values-first" }
|
|
452
|
+
]
|
|
419
453
|
}
|
|
420
454
|
}
|
|
421
455
|
];
|
|
@@ -933,7 +967,8 @@ var presetJavaScript = [
|
|
|
933
967
|
...comments,
|
|
934
968
|
...imports,
|
|
935
969
|
...unicorn,
|
|
936
|
-
...node
|
|
970
|
+
...node,
|
|
971
|
+
...jsdoc
|
|
937
972
|
];
|
|
938
973
|
var presetJsonc = [...jsonc, ...sortPackageJson, ...sortTsconfig];
|
|
939
974
|
var presetLangsExtensions = [...markdown, ...yml, ...presetJsonc];
|
|
@@ -1010,6 +1045,7 @@ export {
|
|
|
1010
1045
|
imports,
|
|
1011
1046
|
isInEditor,
|
|
1012
1047
|
javascript,
|
|
1048
|
+
jsdoc,
|
|
1013
1049
|
jsonc,
|
|
1014
1050
|
markdown,
|
|
1015
1051
|
node,
|
|
@@ -1019,6 +1055,7 @@ export {
|
|
|
1019
1055
|
pluginAntfu,
|
|
1020
1056
|
pluginComments,
|
|
1021
1057
|
pluginImport,
|
|
1058
|
+
pluginJsdoc,
|
|
1022
1059
|
pluginJsonc,
|
|
1023
1060
|
pluginMarkdown,
|
|
1024
1061
|
pluginNode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "ESLint config for @sxzz.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,38 +27,40 @@
|
|
|
27
27
|
"eslint": "^8.56.0 || ^9.0.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
30
|
+
"@unocss/eslint-plugin": "^0.61.5",
|
|
31
31
|
"eslint-config-prettier": "^9.1.0",
|
|
32
|
-
"eslint-plugin-antfu": "^2.3.
|
|
32
|
+
"eslint-plugin-antfu": "^2.3.4",
|
|
33
33
|
"eslint-plugin-command": "^0.2.3",
|
|
34
34
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
35
|
-
"eslint-plugin-import-x": "^0.
|
|
35
|
+
"eslint-plugin-import-x": "^3.0.1",
|
|
36
|
+
"eslint-plugin-jsdoc": "^48.8.3",
|
|
36
37
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
37
|
-
"eslint-plugin-markdown": "^5.
|
|
38
|
+
"eslint-plugin-markdown": "^5.1.0",
|
|
38
39
|
"eslint-plugin-n": "^17.9.0",
|
|
39
|
-
"eslint-plugin-perfectionist": "^
|
|
40
|
-
"eslint-plugin-prettier": "^5.1
|
|
41
|
-
"eslint-plugin-unicorn": "^
|
|
40
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
41
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
42
|
+
"eslint-plugin-unicorn": "^54.0.0",
|
|
42
43
|
"eslint-plugin-unused-imports": "^4.0.0",
|
|
43
|
-
"eslint-plugin-vue": "^9.
|
|
44
|
+
"eslint-plugin-vue": "^9.27.0",
|
|
44
45
|
"eslint-plugin-yml": "^1.14.0",
|
|
45
|
-
"globals": "^15.
|
|
46
|
+
"globals": "^15.8.0",
|
|
46
47
|
"jsonc-eslint-parser": "^2.4.0",
|
|
47
48
|
"local-pkg": "^0.5.0",
|
|
48
|
-
"prettier": "^3.3.
|
|
49
|
-
"typescript-eslint": "^7.
|
|
49
|
+
"prettier": "^3.3.3",
|
|
50
|
+
"typescript-eslint": "^7.16.1",
|
|
50
51
|
"vue-eslint-parser": "^9.4.3",
|
|
51
52
|
"yaml-eslint-parser": "^1.2.3"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@sxzz/prettier-config": "^2.0.2",
|
|
55
56
|
"@types/eslint": "^8.56.10",
|
|
56
|
-
"@types/node": "^20.14.
|
|
57
|
+
"@types/node": "^20.14.11",
|
|
57
58
|
"bumpp": "^9.4.1",
|
|
58
|
-
"eslint": "
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
59
|
+
"eslint": "npm:eslint-ts-patch@9.5.0-0",
|
|
60
|
+
"eslint-ts-patch": "9.5.0-0",
|
|
61
|
+
"tsup": "^8.2.1",
|
|
62
|
+
"tsx": "^4.16.2",
|
|
63
|
+
"typescript": "^5.5.3"
|
|
62
64
|
},
|
|
63
65
|
"engines": {
|
|
64
66
|
"node": "^18.18.0 || >=20.0.0"
|