@sxzz/eslint-config 7.8.0 → 7.8.2
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/dist/index.d.mts +5 -3
- package/dist/index.mjs +12 -14
- package/package.json +18 -18
package/dist/index.d.mts
CHANGED
|
@@ -20,7 +20,6 @@ import configJs from "@eslint/js";
|
|
|
20
20
|
import configComments from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
|
21
21
|
import configCommand from "eslint-plugin-command/config";
|
|
22
22
|
import parserVue from "vue-eslint-parser";
|
|
23
|
-
import parserJsonc from "jsonc-eslint-parser";
|
|
24
23
|
import { Arrayable, Awaitable, FlatConfigComposer } from "eslint-flat-config-utils";
|
|
25
24
|
import { Linter } from "eslint";
|
|
26
25
|
|
|
@@ -7981,6 +7980,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
|
|
|
7981
7980
|
endLines?: (number | null);
|
|
7982
7981
|
maxBlockLines?: (number | null);
|
|
7983
7982
|
startLines?: (number | null);
|
|
7983
|
+
startLinesWithNoTags?: number;
|
|
7984
7984
|
tags?: {
|
|
7985
7985
|
[k: string]: {
|
|
7986
7986
|
count?: number;
|
|
@@ -8191,6 +8191,7 @@ type JsoncObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
8191
8191
|
type JsoncObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
8192
8192
|
arraysInObjects?: boolean;
|
|
8193
8193
|
objectsInObjects?: boolean;
|
|
8194
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
8194
8195
|
}];
|
|
8195
8196
|
type JsoncObjectPropertyNewline = [] | [{
|
|
8196
8197
|
allowAllPropertiesOnSameLine?: boolean;
|
|
@@ -13462,6 +13463,7 @@ type YmlFlowMappingCurlyNewline = [] | [(("always" | "never") | {
|
|
|
13462
13463
|
type YmlFlowMappingCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
13463
13464
|
arraysInObjects?: boolean;
|
|
13464
13465
|
objectsInObjects?: boolean;
|
|
13466
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
13465
13467
|
}];
|
|
13466
13468
|
type YmlFlowSequenceBracketNewline = [] | [(("always" | "never" | "consistent") | {
|
|
13467
13469
|
multiline?: boolean;
|
|
@@ -13628,7 +13630,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
13628
13630
|
exceptRange?: boolean;
|
|
13629
13631
|
onlyEquality?: boolean;
|
|
13630
13632
|
}];
|
|
13631
|
-
type ConfigNames = "sxzz/global-ignores" | "sxzz/gitignore" | "sxzz/js/recommended" | "sxzz/js" | "sxzz/comments/recommended" | "sxzz/comments" | "sxzz/imports" | "sxzz/unicorn/unopinionated" | "sxzz/unicorn" | "sxzz/node" | "sxzz/jsdoc" | "sxzz/regexp" | "sxzz/de-morgan" | "sxzz/typescript > typescript-eslint/base" | "sxzz/typescript > typescript-eslint/eslint-recommended" | "sxzz/typescript > typescript-eslint/recommended" | "sxzz/typescript" | "sxzz/typescript/dts-rules" | "sxzz/typescript/cjs-rules" | "sxzz/sort/imports" | "sxzz/markdown/recommended/plugin" | "sxzz/markdown/recommended/processor" | "sxzz/markdown/recommended/code-blocks" | "sxzz/markdown-rules" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml" | "sxzz/
|
|
13633
|
+
type ConfigNames = "sxzz/global-ignores" | "sxzz/gitignore" | "sxzz/js/recommended" | "sxzz/js" | "sxzz/comments/recommended" | "sxzz/comments" | "sxzz/imports" | "sxzz/unicorn/unopinionated" | "sxzz/unicorn" | "sxzz/node" | "sxzz/jsdoc" | "sxzz/regexp" | "sxzz/de-morgan" | "sxzz/typescript > typescript-eslint/base" | "sxzz/typescript > typescript-eslint/eslint-recommended" | "sxzz/typescript > typescript-eslint/recommended" | "sxzz/typescript" | "sxzz/typescript/dts-rules" | "sxzz/typescript/cjs-rules" | "sxzz/sort/imports" | "sxzz/markdown/recommended/plugin" | "sxzz/markdown/recommended/processor" | "sxzz/markdown/recommended/code-blocks" | "sxzz/markdown-rules" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml/standard" | "sxzz/yaml" | "sxzz/jsonc/recommended" | "sxzz/jsonc/recommended" | "sxzz/jsonc/recommended" | "sxzz/jsonc" | "sxzz/sort/package.json" | "sxzz/sort/tsconfig" | "sxzz/sort/pnpm-workspace" | "sxzz/astro/base/plugin" | "sxzz/astro/base" | "sxzz/astro/base/javascript" | "sxzz/astro/base/typescript" | "sxzz/astro/recommended" | "sxzz/vue/typescript > typescript-eslint/base" | "sxzz/vue/typescript > typescript-eslint/eslint-recommended" | "sxzz/vue/typescript > typescript-eslint/recommended" | "sxzz/vue/typescript" | "sxzz/vue" | "sxzz/unocss" | "sxzz/prettier" | "sxzz/command" | "sxzz/pnpm/package-json" | "sxzz/pnpm/pnpm-workspace-yaml" | "sxzz/baseline" | "sxzz/special/cli" | "sxzz/special/tests" | "sxzz/special/allow-default-export" | "sxzz/special/github" | "sxzz/special/components";
|
|
13632
13634
|
//#endregion
|
|
13633
13635
|
//#region src/types.d.ts
|
|
13634
13636
|
type Config = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
@@ -13789,4 +13791,4 @@ interface Options {
|
|
|
13789
13791
|
/** `@sxzz`'s preset. */
|
|
13790
13792
|
declare function sxzz(options?: Options, ...userConfigs: Awaitable<Arrayable<Config> | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<Config, ConfigNames>;
|
|
13791
13793
|
//#endregion
|
|
13792
|
-
export { BaselineOptions, Config, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, 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, Options, Rules, astro, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasAstro, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node,
|
|
13794
|
+
export { BaselineOptions, Config, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, 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, Options, Rules, astro, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasAstro, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserVue, pluginAntfu, pluginDeMorgan, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPnpm, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.mjs
CHANGED
|
@@ -18,13 +18,12 @@ import pluginIgnore from "eslint-config-flat-gitignore";
|
|
|
18
18
|
import pluginDeMorgan from "eslint-plugin-de-morgan";
|
|
19
19
|
import pluginPnpm from "eslint-plugin-pnpm";
|
|
20
20
|
import pluginImport from "eslint-plugin-importer";
|
|
21
|
-
|
|
21
|
+
import pluginJsonc from "eslint-plugin-jsonc";
|
|
22
22
|
import pluginYml from "eslint-plugin-yml";
|
|
23
23
|
const configJs = __cjs_require("@eslint/js");
|
|
24
24
|
const configComments = __cjs_require("@eslint-community/eslint-plugin-eslint-comments/configs");
|
|
25
25
|
import configCommand from "eslint-plugin-command/config";
|
|
26
26
|
const parserVue = __cjs_require("vue-eslint-parser");
|
|
27
|
-
const parserJsonc = __cjs_require("jsonc-eslint-parser");
|
|
28
27
|
const globals = __cjs_require("globals");
|
|
29
28
|
import { configs } from "eslint-plugin-regexp";
|
|
30
29
|
const {
|
|
@@ -147,6 +146,7 @@ const GLOB_EXCLUDE = [
|
|
|
147
146
|
"**/.output",
|
|
148
147
|
"**/.vite-inspect",
|
|
149
148
|
"**/.nitro",
|
|
149
|
+
"**/.context",
|
|
150
150
|
"**/CHANGELOG*.md",
|
|
151
151
|
"**/*.min.*",
|
|
152
152
|
"**/LICENSE*",
|
|
@@ -304,17 +304,12 @@ const jsdoc = () => [{
|
|
|
304
304
|
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/configs/jsonc.ts
|
|
307
|
-
const jsonc = () => [{
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
],
|
|
313
|
-
languageOptions: { parser: parserJsonc },
|
|
314
|
-
name: "sxzz/json",
|
|
315
|
-
plugins: { jsonc: pluginJsonc },
|
|
307
|
+
const jsonc = () => [...pluginJsonc.configs["recommended-with-jsonc"].map((config) => ({
|
|
308
|
+
...config,
|
|
309
|
+
name: `sxzz/jsonc/${config.name || "recommended"}`
|
|
310
|
+
})), {
|
|
311
|
+
name: "sxzz/jsonc",
|
|
316
312
|
rules: {
|
|
317
|
-
...pluginJsonc.configs["recommended-with-jsonc"].rules,
|
|
318
313
|
"jsonc/quote-props": "off",
|
|
319
314
|
"jsonc/quotes": "off"
|
|
320
315
|
}
|
|
@@ -687,7 +682,10 @@ const specialCases = () => [
|
|
|
687
682
|
{
|
|
688
683
|
files: ["**/scripts/*", "**/cli.*"],
|
|
689
684
|
name: "sxzz/special/cli",
|
|
690
|
-
rules: {
|
|
685
|
+
rules: {
|
|
686
|
+
"baseline-js/use-baseline": "off",
|
|
687
|
+
"no-console": "off"
|
|
688
|
+
}
|
|
691
689
|
},
|
|
692
690
|
{
|
|
693
691
|
files: [`**/*.{test,spec}.${GLOB_SRC_EXT}`],
|
|
@@ -1017,4 +1015,4 @@ function sxzz(options = {}, ...userConfigs) {
|
|
|
1017
1015
|
}
|
|
1018
1016
|
|
|
1019
1017
|
//#endregion
|
|
1020
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasAstro, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node,
|
|
1018
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasAstro, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserVue, pluginAntfu, pluginDeMorgan, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPnpm, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.8.
|
|
4
|
+
"version": "7.8.2",
|
|
5
5
|
"description": "ESLint config for @sxzz.",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -45,47 +45,47 @@
|
|
|
45
45
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
|
|
46
46
|
"@eslint/js": "^10.0.1",
|
|
47
47
|
"@eslint/markdown": "^7.5.1",
|
|
48
|
-
"eslint-config-flat-gitignore": "^2.1
|
|
48
|
+
"eslint-config-flat-gitignore": "^2.2.1",
|
|
49
49
|
"eslint-config-prettier": "^10.1.8",
|
|
50
50
|
"eslint-flat-config-utils": "^3.0.1",
|
|
51
51
|
"eslint-plugin-antfu": "^3.2.2",
|
|
52
52
|
"eslint-plugin-baseline-js": "^0.5.0",
|
|
53
|
-
"eslint-plugin-command": "^3.
|
|
53
|
+
"eslint-plugin-command": "^3.5.2",
|
|
54
54
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
55
55
|
"eslint-plugin-importer": "^0.3.0",
|
|
56
|
-
"eslint-plugin-jsdoc": "^62.
|
|
57
|
-
"eslint-plugin-jsonc": "^
|
|
56
|
+
"eslint-plugin-jsdoc": "^62.7.1",
|
|
57
|
+
"eslint-plugin-jsonc": "^3.1.1",
|
|
58
58
|
"eslint-plugin-n": "^17.24.0",
|
|
59
|
-
"eslint-plugin-perfectionist": "^5.
|
|
60
|
-
"eslint-plugin-pnpm": "^1.
|
|
59
|
+
"eslint-plugin-perfectionist": "^5.6.0",
|
|
60
|
+
"eslint-plugin-pnpm": "^1.6.0",
|
|
61
61
|
"eslint-plugin-prettier": "^5.5.5",
|
|
62
62
|
"eslint-plugin-regexp": "^3.0.0",
|
|
63
63
|
"eslint-plugin-sxzz": "^0.4.4",
|
|
64
64
|
"eslint-plugin-unicorn": "^63.0.0",
|
|
65
65
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
66
66
|
"eslint-plugin-vue": "^10.8.0",
|
|
67
|
-
"eslint-plugin-yml": "^3.
|
|
67
|
+
"eslint-plugin-yml": "^3.3.0",
|
|
68
68
|
"globals": "^17.3.0",
|
|
69
|
-
"jsonc-eslint-parser": "^
|
|
70
|
-
"typescript-eslint": "^8.56.
|
|
69
|
+
"jsonc-eslint-parser": "^3.1.0",
|
|
70
|
+
"typescript-eslint": "^8.56.1",
|
|
71
71
|
"vue-eslint-parser": "^10.4.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/config-inspector": "^1.4.2",
|
|
75
75
|
"@sxzz/prettier-config": "^2.3.1",
|
|
76
|
-
"@types/node": "^25.2
|
|
77
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
78
|
-
"@unocss/eslint-plugin": "^66.6.
|
|
76
|
+
"@types/node": "^25.3.2",
|
|
77
|
+
"@typescript/native-preview": "7.0.0-dev.20260227.1",
|
|
78
|
+
"@unocss/eslint-plugin": "^66.6.2",
|
|
79
79
|
"bumpp": "^10.4.1",
|
|
80
|
-
"eslint": "^10.0.
|
|
80
|
+
"eslint": "^10.0.2",
|
|
81
81
|
"eslint-plugin-astro": "^1.6.0",
|
|
82
|
-
"eslint-typegen": "^2.3.
|
|
82
|
+
"eslint-typegen": "^2.3.1",
|
|
83
83
|
"prettier": "^3.8.1",
|
|
84
84
|
"rolldown-plugin-require-cjs": "^0.3.3",
|
|
85
|
-
"tsdown": "^0.
|
|
86
|
-
"tsdown-preset-sxzz": "^0.
|
|
85
|
+
"tsdown": "^0.21.0-beta.2",
|
|
86
|
+
"tsdown-preset-sxzz": "^0.4.0",
|
|
87
87
|
"typescript": "^5.9.3",
|
|
88
|
-
"unrun": "^0.2.
|
|
88
|
+
"unrun": "^0.2.28"
|
|
89
89
|
},
|
|
90
90
|
"resolutions": {
|
|
91
91
|
"@types/eslint": "-"
|