@sxzz/eslint-config 5.0.2 → 5.1.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/dist/index.d.ts +14 -1
- package/dist/index.js +12 -3
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as pluginPrettierRecommended } from 'eslint-plugin-prettier/rec
|
|
|
12
12
|
export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
|
|
13
13
|
export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
|
|
14
14
|
export { default as pluginIgnore } from 'eslint-config-flat-gitignore';
|
|
15
|
+
export { default as pluginDeMorgan } from 'eslint-plugin-de-morgan';
|
|
15
16
|
import * as eslintPluginImportX from 'eslint-plugin-import-x';
|
|
16
17
|
export { eslintPluginImportX as pluginImport };
|
|
17
18
|
import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
|
|
@@ -923,6 +924,16 @@ interface Rules {
|
|
|
923
924
|
* @see https://eslint.org/docs/latest/rules/curly
|
|
924
925
|
*/
|
|
925
926
|
'curly'?: Linter.RuleEntry<Curly>;
|
|
927
|
+
/**
|
|
928
|
+
* Transforms the negation of a conjunction !(A && B) into the equivalent !A || !B according to De Morgan’s law
|
|
929
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
930
|
+
*/
|
|
931
|
+
'de-morgan/no-negated-conjunction'?: Linter.RuleEntry<[]>;
|
|
932
|
+
/**
|
|
933
|
+
* Transforms the negation of a disjunction !(A || B) into the equivalent !A && !B according to De Morgan’s law
|
|
934
|
+
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-disjunction.md
|
|
935
|
+
*/
|
|
936
|
+
'de-morgan/no-negated-disjunction'?: Linter.RuleEntry<[]>;
|
|
926
937
|
/**
|
|
927
938
|
* Require `default` cases in `switch` statements
|
|
928
939
|
* @see https://eslint.org/docs/latest/rules/default-case
|
|
@@ -12490,6 +12501,8 @@ declare const command: () => Config[];
|
|
|
12490
12501
|
|
|
12491
12502
|
declare const comments: () => Config[];
|
|
12492
12503
|
|
|
12504
|
+
declare const deMorgan: () => Config[];
|
|
12505
|
+
|
|
12493
12506
|
declare const ignores: () => Config[];
|
|
12494
12507
|
|
|
12495
12508
|
declare const imports: () => Config[];
|
|
@@ -12588,4 +12601,4 @@ declare function sxzz(config?: Config | Config[], { command: enableCommand, mark
|
|
|
12588
12601
|
command: boolean;
|
|
12589
12602
|
}>): Promise<Config[]>;
|
|
12590
12603
|
|
|
12591
|
-
export { type Config, 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 Rules, command, comments, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
12604
|
+
export { type Config, 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 Rules, command, comments, deMorgan, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import pluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
|
11
11
|
import pluginUnusedImports from "eslint-plugin-unused-imports";
|
|
12
12
|
import pluginJsdoc from "eslint-plugin-jsdoc";
|
|
13
13
|
import pluginIgnore from "eslint-config-flat-gitignore";
|
|
14
|
+
import pluginDeMorgan from "eslint-plugin-de-morgan";
|
|
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";
|
|
@@ -42,6 +43,13 @@ const comments = () => [{
|
|
|
42
43
|
rules: { "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }] }
|
|
43
44
|
}];
|
|
44
45
|
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/configs/de-morgan.ts
|
|
48
|
+
const deMorgan = () => [{
|
|
49
|
+
...pluginDeMorgan.configs.recommended,
|
|
50
|
+
name: "sxzz/de-morgan"
|
|
51
|
+
}];
|
|
52
|
+
|
|
45
53
|
//#endregion
|
|
46
54
|
//#region src/globs.ts
|
|
47
55
|
const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -83,7 +91,7 @@ const GLOB_EXCLUDE = [
|
|
|
83
91
|
GLOB_NODE_MODULES,
|
|
84
92
|
GLOB_DIST,
|
|
85
93
|
...GLOB_LOCKFILE,
|
|
86
|
-
"
|
|
94
|
+
"output",
|
|
87
95
|
"**/coverage",
|
|
88
96
|
"**/temp",
|
|
89
97
|
"**/fixtures",
|
|
@@ -876,7 +884,8 @@ const presetJavaScript = () => [
|
|
|
876
884
|
...unicorn(),
|
|
877
885
|
...node(),
|
|
878
886
|
...jsdoc(),
|
|
879
|
-
...regexp()
|
|
887
|
+
...regexp(),
|
|
888
|
+
...deMorgan()
|
|
880
889
|
];
|
|
881
890
|
const presetJsonc = () => [
|
|
882
891
|
...jsonc(),
|
|
@@ -917,4 +926,4 @@ async function sxzz(config = [], { command: enableCommand = true, markdown: enab
|
|
|
917
926
|
}
|
|
918
927
|
|
|
919
928
|
//#endregion
|
|
920
|
-
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, command, comments, configCommand, configComments, configJs, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserJsonc, parserVue, parserYml, pluginAntfu, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
|
929
|
+
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, command, comments, configCommand, configComments, configJs, configPrettier, deMorgan, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditorEnv, isInGitHooksOrLintStaged, javascript, jsdoc, jsonc, markdown, node, parserJsonc, parserVue, parserYml, pluginAntfu, pluginDeMorgan, pluginIgnore, pluginImport, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginPrettierRecommended, pluginSxzz, pluginUnicorn, pluginUnusedImports, pluginVue, pluginYml, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, tseslint, typescript, typescriptCore, unicorn, unocss, vue, yml };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sxzz/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "ESLint config for @sxzz.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"eslint-config-prettier": "^10.0.1",
|
|
45
45
|
"eslint-plugin-antfu": "^3.0.0",
|
|
46
46
|
"eslint-plugin-command": "^3.0.0",
|
|
47
|
+
"eslint-plugin-de-morgan": "^1.0.0",
|
|
47
48
|
"eslint-plugin-import-x": "^4.6.1",
|
|
48
49
|
"eslint-plugin-jsdoc": "^50.6.3",
|
|
49
50
|
"eslint-plugin-jsonc": "^2.19.1",
|
|
@@ -56,21 +57,21 @@
|
|
|
56
57
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
57
58
|
"eslint-plugin-vue": "^9.32.0",
|
|
58
59
|
"eslint-plugin-yml": "^1.16.0",
|
|
59
|
-
"globals": "^15.
|
|
60
|
+
"globals": "^15.15.0",
|
|
60
61
|
"jsonc-eslint-parser": "^2.4.0",
|
|
61
62
|
"local-pkg": "^1.0.0",
|
|
62
|
-
"prettier": "^3.5.
|
|
63
|
+
"prettier": "^3.5.1",
|
|
63
64
|
"typescript-eslint": "^8.24.0",
|
|
64
65
|
"vue-eslint-parser": "^9.4.3",
|
|
65
66
|
"yaml-eslint-parser": "^1.2.3"
|
|
66
67
|
},
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@eslint/config-inspector": "^1.0.0",
|
|
69
|
-
"@sxzz/prettier-config": "^2.
|
|
70
|
-
"@types/node": "^22.13.
|
|
70
|
+
"@sxzz/prettier-config": "^2.2.0",
|
|
71
|
+
"@types/node": "^22.13.2",
|
|
71
72
|
"@unocss/eslint-plugin": "^65.4.3",
|
|
72
73
|
"bumpp": "^10.0.3",
|
|
73
|
-
"eslint": "^9.20.
|
|
74
|
+
"eslint": "^9.20.1",
|
|
74
75
|
"eslint-typegen": "^1.0.0",
|
|
75
76
|
"importx": "^0.5.1",
|
|
76
77
|
"picocolors": "^1.1.1",
|