@sxzz/eslint-config 7.3.2 → 7.4.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/dist/index.d.mts +8 -3
- package/dist/index.mjs +5 -3
- package/package.json +12 -12
package/dist/index.d.mts
CHANGED
|
@@ -12953,7 +12953,12 @@ type Config = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {
|
|
|
12953
12953
|
};
|
|
12954
12954
|
//#endregion
|
|
12955
12955
|
//#region src/configs/baseline.d.ts
|
|
12956
|
-
|
|
12956
|
+
interface BaselineOptions {
|
|
12957
|
+
baseline?: "widely" | "newly" | number;
|
|
12958
|
+
available?: "widely" | "newly" | number;
|
|
12959
|
+
ignoreFeatures?: string[];
|
|
12960
|
+
}
|
|
12961
|
+
declare const baseline: (options?: BaselineOptions) => Config[];
|
|
12957
12962
|
//#endregion
|
|
12958
12963
|
//#region src/configs/command.d.ts
|
|
12959
12964
|
declare const command: () => Config[];
|
|
@@ -13072,7 +13077,7 @@ declare const presetBasic: () => Config[];
|
|
|
13072
13077
|
declare const presetAll: () => Promise<Config[]>;
|
|
13073
13078
|
interface Options {
|
|
13074
13079
|
/** @default true */
|
|
13075
|
-
baseline?: boolean;
|
|
13080
|
+
baseline?: boolean | BaselineOptions;
|
|
13076
13081
|
/** @default true */
|
|
13077
13082
|
command?: boolean;
|
|
13078
13083
|
/** markdown support. @default true */
|
|
@@ -13089,4 +13094,4 @@ interface Options {
|
|
|
13089
13094
|
/** `@sxzz`'s preset. */
|
|
13090
13095
|
declare function sxzz(options?: Options, ...userConfigs: Awaitable<Arrayable<Config> | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<Config, ConfigNames>;
|
|
13091
13096
|
//#endregion
|
|
13092
|
-
export { Config, ConfigNames, 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, Options, Rules, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserJsonc, parserVue, parserYml, pluginAntfu, pluginDeMorgan, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPnpm, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
13097
|
+
export { BaselineOptions, Config, ConfigNames, 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, Options, Rules, baseline, command, comments, configCommand, configComments, configJs, deMorgan, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserJsonc, parserVue, parserYml, pluginAntfu, pluginDeMorgan, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPnpm, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, pnpm, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortPnpmWorkspace, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.mjs
CHANGED
|
@@ -37,12 +37,14 @@ import { isPackageExists } from "local-pkg";
|
|
|
37
37
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
38
38
|
|
|
39
39
|
//#region src/configs/baseline.ts
|
|
40
|
-
const baseline = () => [{
|
|
40
|
+
const baseline = (options = {}) => [{
|
|
41
41
|
name: "sxzz/baseline",
|
|
42
42
|
plugins: { "baseline-js": baselineJs },
|
|
43
43
|
rules: { "baseline-js/use-baseline": ["warn", {
|
|
44
|
+
ignoreFeatures: ["functions-caller-arguments"],
|
|
44
45
|
includeJsBuiltins: { preset: "auto" },
|
|
45
|
-
includeWebApis: { preset: "auto" }
|
|
46
|
+
includeWebApis: { preset: "auto" },
|
|
47
|
+
...options
|
|
46
48
|
}] }
|
|
47
49
|
}];
|
|
48
50
|
|
|
@@ -980,7 +982,7 @@ function sxzz(options = {}, ...userConfigs) {
|
|
|
980
982
|
yml(),
|
|
981
983
|
presetJsonc()
|
|
982
984
|
];
|
|
983
|
-
if (enableBaseline) configs$1.push(baseline());
|
|
985
|
+
if (enableBaseline) configs$1.push(baseline(typeof enableBaseline === "object" ? enableBaseline : {}));
|
|
984
986
|
if (enableVue) configs$1.push(vue());
|
|
985
987
|
if (enableMarkdown) configs$1.push(markdown());
|
|
986
988
|
if (enableUnocss) configs$1.push(unocss());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "ESLint config for @sxzz.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"eslint-config-prettier": "^10.1.8",
|
|
45
45
|
"eslint-flat-config-utils": "^2.1.4",
|
|
46
46
|
"eslint-plugin-antfu": "^3.1.1",
|
|
47
|
-
"eslint-plugin-baseline-js": "^0.4.
|
|
47
|
+
"eslint-plugin-baseline-js": "^0.4.2",
|
|
48
48
|
"eslint-plugin-command": "^3.3.1",
|
|
49
49
|
"eslint-plugin-de-morgan": "^2.0.0",
|
|
50
50
|
"eslint-plugin-import-x": "^4.16.1",
|
|
51
|
-
"eslint-plugin-jsdoc": "^61.4.
|
|
51
|
+
"eslint-plugin-jsdoc": "^61.4.1",
|
|
52
52
|
"eslint-plugin-jsonc": "^2.21.0",
|
|
53
53
|
"eslint-plugin-n": "^17.23.1",
|
|
54
54
|
"eslint-plugin-perfectionist": "^4.15.1",
|
|
@@ -58,28 +58,28 @@
|
|
|
58
58
|
"eslint-plugin-sxzz": "^0.4.1",
|
|
59
59
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
60
60
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
61
|
-
"eslint-plugin-vue": "^10.6.
|
|
61
|
+
"eslint-plugin-vue": "^10.6.2",
|
|
62
62
|
"eslint-plugin-yml": "^1.19.0",
|
|
63
63
|
"globals": "^16.5.0",
|
|
64
64
|
"jsonc-eslint-parser": "^2.4.1",
|
|
65
65
|
"local-pkg": "^1.1.2",
|
|
66
|
-
"
|
|
67
|
-
"typescript-eslint": "^8.47.0",
|
|
66
|
+
"typescript-eslint": "^8.48.0",
|
|
68
67
|
"vue-eslint-parser": "^10.2.0",
|
|
69
|
-
"yaml-eslint-parser": "^1.3.
|
|
68
|
+
"yaml-eslint-parser": "^1.3.1"
|
|
70
69
|
},
|
|
71
70
|
"devDependencies": {
|
|
72
|
-
"@eslint/config-inspector": "^1.4.
|
|
73
|
-
"@sxzz/prettier-config": "^2.2.
|
|
71
|
+
"@eslint/config-inspector": "^1.4.2",
|
|
72
|
+
"@sxzz/prettier-config": "^2.2.6",
|
|
74
73
|
"@types/node": "^24.10.1",
|
|
75
74
|
"@unocss/eslint-plugin": "^66.5.9",
|
|
76
|
-
"bumpp": "^10.3.
|
|
75
|
+
"bumpp": "^10.3.2",
|
|
77
76
|
"eslint": "^9.39.1",
|
|
78
77
|
"eslint-typegen": "^2.3.0",
|
|
78
|
+
"prettier": "^3.7.1",
|
|
79
79
|
"rolldown-plugin-require-cjs": "^0.3.1",
|
|
80
|
-
"tsdown": "^0.16.
|
|
80
|
+
"tsdown": "^0.16.8",
|
|
81
81
|
"typescript": "^5.9.3",
|
|
82
|
-
"unrun": "^0.2.
|
|
82
|
+
"unrun": "^0.2.13"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=20.0.0"
|