@sxzz/eslint-config 4.1.6 → 4.2.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
@@ -1,6 +1,7 @@
1
1
  import { Linter } from 'eslint';
2
2
  import * as _unocss_eslint_plugin from '@unocss/eslint-plugin';
3
3
  import * as eslint_plugin_n from 'eslint-plugin-n';
4
+ import * as eslint_plugin_sxzz from 'eslint-plugin-sxzz';
4
5
  import * as eslint_plugin_antfu from 'eslint-plugin-antfu';
5
6
  import _configCommand from 'eslint-plugin-command/config';
6
7
  import * as eslintPluginImportX from 'eslint-plugin-import-x';
@@ -3728,6 +3729,11 @@ interface Rules {
3728
3729
  * @deprecated
3729
3730
  */
3730
3731
  'switch-colon-spacing'?: Linter.RuleEntry<SwitchColonSpacing>;
3732
+ /**
3733
+ * Enforce using String() instead of single-member template expressions.
3734
+ * @see https://github.com/sxzz/eslint-plugin-sxzz/blob/main/src/rules/prefer-string-function.md
3735
+ */
3736
+ 'sxzz/prefer-string-function'?: Linter.RuleEntry<[]>;
3731
3737
  /**
3732
3738
  * Require symbol descriptions
3733
3739
  * @see https://eslint.org/docs/latest/rules/symbol-description
@@ -11989,6 +11995,7 @@ type InteropDefault<T> = T extends {
11989
11995
  } ? U : T;
11990
11996
  declare const configJs: any;
11991
11997
  declare const pluginAntfu: typeof eslint_plugin_antfu.default;
11998
+ declare const pluginSxzz: typeof eslint_plugin_sxzz.default;
11992
11999
  declare const pluginComments: any;
11993
12000
  declare const pluginMarkdown: any;
11994
12001
 
@@ -12037,4 +12044,4 @@ declare function sxzz(config?: Config | Config[], { command: enableCommand, mark
12037
12044
  command: boolean;
12038
12045
  }>): Config[];
12039
12046
 
12040
- 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, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, specialCases, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
12047
+ 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 };
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // src/plugins.ts
2
2
  import _configJs from "@eslint/js";
3
3
  import * as _pluginAntfu from "eslint-plugin-antfu";
4
+ import * as _pluginSxzz from "eslint-plugin-sxzz";
4
5
  import * as _pluginComments from "eslint-plugin-eslint-comments";
5
6
  import * as _pluginMarkdown from "@eslint/markdown";
6
7
  import tseslint from "typescript-eslint";
@@ -27,6 +28,7 @@ function interopDefault(m) {
27
28
  }
28
29
  var configJs = /* @__PURE__ */ interopDefault(_configJs);
29
30
  var pluginAntfu = /* @__PURE__ */ interopDefault(_pluginAntfu);
31
+ var pluginSxzz = /* @__PURE__ */ interopDefault(_pluginSxzz);
30
32
  var pluginComments = /* @__PURE__ */ interopDefault(_pluginComments);
31
33
  var pluginMarkdown = /* @__PURE__ */ interopDefault(_pluginMarkdown);
32
34
  var pluginUnicorn = /* @__PURE__ */ interopDefault(_pluginUnicorn);
@@ -195,6 +197,7 @@ var javascript = [
195
197
  },
196
198
  name: "sxzz/js",
197
199
  plugins: {
200
+ sxzz: pluginSxzz,
198
201
  "unused-imports": pluginUnusedImports
199
202
  },
200
203
  rules: {
@@ -244,6 +247,7 @@ var javascript = [
244
247
  "prefer-spread": "error",
245
248
  "prefer-template": "error",
246
249
  "require-await": "error",
250
+ "sxzz/prefer-string-function": "warn",
247
251
  "unicode-bom": ["error", "never"],
248
252
  "unused-imports/no-unused-imports": isInEditor ? "off" : "error",
249
253
  "unused-imports/no-unused-vars": [
@@ -1083,6 +1087,7 @@ export {
1083
1087
  pluginNode,
1084
1088
  pluginPerfectionist,
1085
1089
  pluginPrettier,
1090
+ pluginSxzz,
1086
1091
  pluginUnicorn,
1087
1092
  pluginUnocss,
1088
1093
  pluginUnusedImports,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "4.1.6",
3
+ "version": "4.2.0",
4
4
  "description": "ESLint config for @sxzz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -45,6 +45,7 @@
45
45
  "eslint-plugin-perfectionist": "^3.5.0",
46
46
  "eslint-plugin-prettier": "^5.2.1",
47
47
  "eslint-plugin-regexp": "^2.6.0",
48
+ "eslint-plugin-sxzz": "^0.1.0",
48
49
  "eslint-plugin-unicorn": "^55.0.0",
49
50
  "eslint-plugin-unused-imports": "^4.1.3",
50
51
  "eslint-plugin-vue": "^9.28.0",