@sxzz/eslint-config 4.2.1 → 4.3.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.ts CHANGED
@@ -4,6 +4,7 @@ import * as eslint_plugin_n from 'eslint-plugin-n';
4
4
  import * as eslint_plugin_sxzz from 'eslint-plugin-sxzz';
5
5
  import * as eslint_plugin_antfu from 'eslint-plugin-antfu';
6
6
  import _configCommand from 'eslint-plugin-command/config';
7
+ export { default as configComments } from '@eslint-community/eslint-plugin-eslint-comments/configs';
7
8
  import * as eslintPluginImportX from 'eslint-plugin-import-x';
8
9
  export { eslintPluginImportX as pluginImport };
9
10
  import * as eslintPluginJsonc from 'eslint-plugin-jsonc';
@@ -27,6 +28,51 @@ declare const ignores: Linter.Config[];
27
28
  declare const imports: Linter.Config[];
28
29
 
29
30
  interface Rules {
31
+ /**
32
+ * require a `eslint-enable` comment for every `eslint-disable` comment
33
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
34
+ */
35
+ '@eslint-community/eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommunityEslintCommentsDisableEnablePair>;
36
+ /**
37
+ * disallow a `eslint-enable` comment for multiple `eslint-disable` comments
38
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
39
+ */
40
+ '@eslint-community/eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]>;
41
+ /**
42
+ * disallow duplicate `eslint-disable` comments
43
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
44
+ */
45
+ '@eslint-community/eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]>;
46
+ /**
47
+ * disallow `eslint-disable` comments about specific rules
48
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
49
+ */
50
+ '@eslint-community/eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommunityEslintCommentsNoRestrictedDisable>;
51
+ /**
52
+ * disallow `eslint-disable` comments without rule names
53
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
54
+ */
55
+ '@eslint-community/eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]>;
56
+ /**
57
+ * disallow unused `eslint-disable` comments
58
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
59
+ */
60
+ '@eslint-community/eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>;
61
+ /**
62
+ * disallow unused `eslint-enable` comments
63
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
64
+ */
65
+ '@eslint-community/eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]>;
66
+ /**
67
+ * disallow ESLint directive-comments
68
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-use.html
69
+ */
70
+ '@eslint-community/eslint-comments/no-use'?: Linter.RuleEntry<EslintCommunityEslintCommentsNoUse>;
71
+ /**
72
+ * require include descriptions in ESLint directive-comments
73
+ * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
74
+ */
75
+ '@eslint-community/eslint-comments/require-description'?: Linter.RuleEntry<EslintCommunityEslintCommentsRequireDescription>;
30
76
  /**
31
77
  * Require that function overload signatures be consecutive
32
78
  * @see https://typescript-eslint.io/rules/adjacent-overload-signatures
@@ -897,51 +943,6 @@ interface Rules {
897
943
  * @see https://eslint.org/docs/latest/rules/eqeqeq
898
944
  */
899
945
  'eqeqeq'?: Linter.RuleEntry<Eqeqeq>;
900
- /**
901
- * require a `eslint-enable` comment for every `eslint-disable` comment
902
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html
903
- */
904
- 'eslint-comments/disable-enable-pair'?: Linter.RuleEntry<EslintCommentsDisableEnablePair>;
905
- /**
906
- * disallow a `eslint-enable` comment for multiple `eslint-disable` comments
907
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html
908
- */
909
- 'eslint-comments/no-aggregating-enable'?: Linter.RuleEntry<[]>;
910
- /**
911
- * disallow duplicate `eslint-disable` comments
912
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html
913
- */
914
- 'eslint-comments/no-duplicate-disable'?: Linter.RuleEntry<[]>;
915
- /**
916
- * disallow `eslint-disable` comments about specific rules
917
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html
918
- */
919
- 'eslint-comments/no-restricted-disable'?: Linter.RuleEntry<EslintCommentsNoRestrictedDisable>;
920
- /**
921
- * disallow `eslint-disable` comments without rule names
922
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html
923
- */
924
- 'eslint-comments/no-unlimited-disable'?: Linter.RuleEntry<[]>;
925
- /**
926
- * disallow unused `eslint-disable` comments
927
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
928
- */
929
- 'eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>;
930
- /**
931
- * disallow unused `eslint-enable` comments
932
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html
933
- */
934
- 'eslint-comments/no-unused-enable'?: Linter.RuleEntry<[]>;
935
- /**
936
- * disallow ESLint directive-comments
937
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-use.html
938
- */
939
- 'eslint-comments/no-use'?: Linter.RuleEntry<EslintCommentsNoUse>;
940
- /**
941
- * require include descriptions in ESLint directive-comments
942
- * @see https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html
943
- */
944
- 'eslint-comments/require-description'?: Linter.RuleEntry<EslintCommentsRequireDescription>;
945
946
  /**
946
947
  * Enforce "for" loop update clause moving the counter in the right direction
947
948
  * @see https://eslint.org/docs/latest/rules/for-direction
@@ -5881,6 +5882,22 @@ interface Rules {
5881
5882
  */
5882
5883
  'yoda'?: Linter.RuleEntry<Yoda>;
5883
5884
  }
5885
+ type EslintCommunityEslintCommentsDisableEnablePair = [] | [
5886
+ {
5887
+ allowWholeFile?: boolean;
5888
+ }
5889
+ ];
5890
+ type EslintCommunityEslintCommentsNoRestrictedDisable = string[];
5891
+ type EslintCommunityEslintCommentsNoUse = [] | [
5892
+ {
5893
+ allow?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[];
5894
+ }
5895
+ ];
5896
+ type EslintCommunityEslintCommentsRequireDescription = [] | [
5897
+ {
5898
+ ignore?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[];
5899
+ }
5900
+ ];
5884
5901
  type TypescriptEslintArrayType = [] | [
5885
5902
  {
5886
5903
  default?: ("array" | "generic" | "array-simple");
@@ -7027,22 +7044,6 @@ type Eqeqeq = ([] | ["always"] | [
7027
7044
  null?: ("always" | "never" | "ignore");
7028
7045
  }
7029
7046
  ] | [] | [("smart" | "allow-null")]);
7030
- type EslintCommentsDisableEnablePair = [] | [
7031
- {
7032
- allowWholeFile?: boolean;
7033
- }
7034
- ];
7035
- type EslintCommentsNoRestrictedDisable = string[];
7036
- type EslintCommentsNoUse = [] | [
7037
- {
7038
- allow?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[];
7039
- }
7040
- ];
7041
- type EslintCommentsRequireDescription = [] | [
7042
- {
7043
- ignore?: ("eslint" | "eslint-disable" | "eslint-disable-line" | "eslint-disable-next-line" | "eslint-enable" | "eslint-env" | "exported" | "global" | "globals")[];
7044
- }
7045
- ];
7046
7047
  type FuncCallSpacing = ([] | ["never"] | [] | ["always"] | [
7047
7048
  "always",
7048
7049
  {
@@ -12036,7 +12037,7 @@ type InteropDefault<T> = T extends {
12036
12037
  declare const configJs: any;
12037
12038
  declare const pluginAntfu: typeof eslint_plugin_antfu.default;
12038
12039
  declare const pluginSxzz: typeof eslint_plugin_sxzz.default;
12039
- declare const pluginComments: any;
12040
+
12040
12041
  declare const pluginMarkdown: any;
12041
12042
 
12042
12043
  declare const pluginUnicorn: any;
@@ -12084,4 +12085,4 @@ declare function sxzz(config?: Config | Config[], { command: enableCommand, mark
12084
12085
  command: boolean;
12085
12086
  }>): Config[];
12086
12087
 
12087
- 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 InteropDefault, type Rules, presetAll as all, presetBasic as basic, command, comments, configCommand, configJs, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsdoc, jsonc, markdown, node, pluginAntfu, pluginComments, pluginIgnore, pluginJsdoc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginSxzz, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
12088
+ 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 InteropDefault, type Rules, presetAll as all, presetBasic as basic, command, comments, configCommand, configJs, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsdoc, jsonc, markdown, node, pluginAntfu, pluginIgnore, pluginJsdoc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginSxzz, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, 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
@@ -2,7 +2,7 @@
2
2
  import _configJs from "@eslint/js";
3
3
  import * as _pluginAntfu from "eslint-plugin-antfu";
4
4
  import * as _pluginSxzz from "eslint-plugin-sxzz";
5
- import * as _pluginComments from "eslint-plugin-eslint-comments";
5
+ import { default as default2 } from "@eslint-community/eslint-plugin-eslint-comments/configs";
6
6
  import * as _pluginMarkdown from "@eslint/markdown";
7
7
  import tseslint from "typescript-eslint";
8
8
  import * as _pluginUnicorn from "eslint-plugin-unicorn";
@@ -29,7 +29,6 @@ function interopDefault(m) {
29
29
  var configJs = /* @__PURE__ */ interopDefault(_configJs);
30
30
  var pluginAntfu = /* @__PURE__ */ interopDefault(_pluginAntfu);
31
31
  var pluginSxzz = /* @__PURE__ */ interopDefault(_pluginSxzz);
32
- var pluginComments = /* @__PURE__ */ interopDefault(_pluginComments);
33
32
  var pluginMarkdown = /* @__PURE__ */ interopDefault(_pluginMarkdown);
34
33
  var pluginUnicorn = /* @__PURE__ */ interopDefault(_pluginUnicorn);
35
34
  var pluginVue = /* @__PURE__ */ interopDefault(_pluginVue);
@@ -53,14 +52,14 @@ var command = [
53
52
 
54
53
  // src/configs/comments.ts
55
54
  var comments = [
55
+ {
56
+ ...default2.recommended,
57
+ name: "sxzz/comments/recommended"
58
+ },
56
59
  {
57
60
  name: "sxzz/comments",
58
- plugins: {
59
- "eslint-comments": pluginComments
60
- },
61
61
  rules: {
62
- ...pluginComments.configs.recommended.rules,
63
- "eslint-comments/disable-enable-pair": [
62
+ "@eslint-community/eslint-comments/disable-enable-pair": [
64
63
  "error",
65
64
  { allowWholeFile: true }
66
65
  ]
@@ -1060,6 +1059,7 @@ export {
1060
1059
  command,
1061
1060
  comments,
1062
1061
  configCommand,
1062
+ default2 as configComments,
1063
1063
  configJs,
1064
1064
  configPrettier,
1065
1065
  getVueVersion,
@@ -1078,7 +1078,6 @@ export {
1078
1078
  parserVue,
1079
1079
  parserYml,
1080
1080
  pluginAntfu,
1081
- pluginComments,
1082
1081
  pluginIgnore,
1083
1082
  pluginImport,
1084
1083
  pluginJsdoc,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "ESLint config for @sxzz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,6 +30,7 @@
30
30
  "eslint": "^9.5.0"
31
31
  },
32
32
  "dependencies": {
33
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
33
34
  "@eslint/js": "^9.11.1",
34
35
  "@eslint/markdown": "^6.1.1",
35
36
  "@unocss/eslint-plugin": "^0.63.1",
@@ -37,7 +38,6 @@
37
38
  "eslint-config-prettier": "^9.1.0",
38
39
  "eslint-plugin-antfu": "^2.7.0",
39
40
  "eslint-plugin-command": "^0.2.6",
40
- "eslint-plugin-eslint-comments": "^3.2.0",
41
41
  "eslint-plugin-import-x": "^4.3.1",
42
42
  "eslint-plugin-jsdoc": "^50.3.0",
43
43
  "eslint-plugin-jsonc": "^2.16.0",