@sxzz/eslint-config 3.15.1 → 3.16.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 CHANGED
@@ -41,6 +41,8 @@ declare const sortKeys: Linter.Config[];
41
41
 
42
42
  declare const prettier: Linter.Config[];
43
43
 
44
+ declare const regexp: Linter.Config[];
45
+
44
46
  declare const sortPackageJson: Linter.Config[];
45
47
  declare const sortTsconfig: Linter.Config[];
46
48
 
@@ -134,4 +136,4 @@ declare function sxzz(config?: Linter.Config | Linter.Config[], { command: enabl
134
136
  command: boolean;
135
137
  }>): Linter.Config[];
136
138
 
137
- 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, type InteropDefault, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsdoc, jsonc, markdown, node, pluginAntfu, pluginComments, pluginJsdoc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
139
+ 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, type InteropDefault, presetAll as all, presetBasic as basic, command, comments, configPrettier, getVueVersion, hasTypeScript, hasUnocss, hasVue, ignores, imports, isInEditor, javascript, jsdoc, jsonc, markdown, node, pluginAntfu, pluginComments, pluginJsdoc, pluginMarkdown, pluginNode, pluginPerfectionist, pluginPrettier, pluginUnicorn, pluginUnocss, pluginUnusedImports, pluginVue, presetAll, presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, regexp, restrictedSyntaxJs, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, typescriptCore, unicorn, unocss, vue, yml };
package/dist/index.js CHANGED
@@ -470,6 +470,12 @@ var prettier = [
470
470
  }
471
471
  ];
472
472
 
473
+ // src/configs/regexp.ts
474
+ import { configs } from "eslint-plugin-regexp";
475
+ var regexp = [
476
+ configs["flat/recommended"]
477
+ ];
478
+
473
479
  // src/configs/sort.ts
474
480
  var sortPackageJson = [
475
481
  {
@@ -753,7 +759,6 @@ var unicorn = [
753
759
  unicorn: pluginUnicorn
754
760
  },
755
761
  rules: {
756
- "unicorn/better-regex": "error",
757
762
  "unicorn/catch-error-name": "error",
758
763
  "unicorn/consistent-empty-array-spread": "error",
759
764
  "unicorn/custom-error-definition": "error",
@@ -968,7 +973,8 @@ var presetJavaScript = [
968
973
  ...imports,
969
974
  ...unicorn,
970
975
  ...node,
971
- ...jsdoc
976
+ ...jsdoc,
977
+ ...regexp
972
978
  ];
973
979
  var presetJsonc = [...jsonc, ...sortPackageJson, ...sortTsconfig];
974
980
  var presetLangsExtensions = [...markdown, ...yml, ...presetJsonc];
@@ -987,26 +993,26 @@ function sxzz(config = [], {
987
993
  unocss: enableUnocss = hasUnocss,
988
994
  vue: enableVue = hasVue
989
995
  } = {}) {
990
- const configs = [...presetBasic, ...yml, ...presetJsonc];
996
+ const configs2 = [...presetBasic, ...yml, ...presetJsonc];
991
997
  if (enableVue) {
992
- configs.push(...vue);
998
+ configs2.push(...vue);
993
999
  }
994
1000
  if (enableMarkdown) {
995
- configs.push(...markdown);
1001
+ configs2.push(...markdown);
996
1002
  }
997
1003
  if (enableUnocss) {
998
- configs.push(...unocss);
1004
+ configs2.push(...unocss);
999
1005
  }
1000
1006
  if (enablePrettier) {
1001
- configs.push(...prettier);
1007
+ configs2.push(...prettier);
1002
1008
  }
1003
1009
  if (enableCommand) {
1004
- configs.push(...command);
1010
+ configs2.push(...command);
1005
1011
  }
1006
1012
  if (Object.keys(config).length > 0) {
1007
- configs.push(...Array.isArray(config) ? config : [config]);
1013
+ configs2.push(...Array.isArray(config) ? config : [config]);
1008
1014
  }
1009
- return configs;
1015
+ return configs2;
1010
1016
  }
1011
1017
  export {
1012
1018
  GLOB_ALL_SRC,
@@ -1073,6 +1079,7 @@ export {
1073
1079
  presetLangsExtensions,
1074
1080
  prettier,
1075
1081
  reactivityTransform,
1082
+ regexp,
1076
1083
  restrictedSyntaxJs,
1077
1084
  sortKeys,
1078
1085
  sortPackageJson,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "3.15.1",
3
+ "version": "3.16.1",
4
4
  "description": "ESLint config for @sxzz.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -27,19 +27,20 @@
27
27
  "eslint": "^8.56.0 || ^9.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@unocss/eslint-plugin": "^0.61.5",
30
+ "@unocss/eslint-plugin": "^0.61.6",
31
31
  "eslint-config-prettier": "^9.1.0",
32
32
  "eslint-plugin-antfu": "^2.3.4",
33
33
  "eslint-plugin-command": "^0.2.3",
34
34
  "eslint-plugin-eslint-comments": "^3.2.0",
35
- "eslint-plugin-import-x": "^3.0.1",
36
- "eslint-plugin-jsdoc": "^48.8.3",
35
+ "eslint-plugin-import-x": "^3.1.0",
36
+ "eslint-plugin-jsdoc": "^48.9.2",
37
37
  "eslint-plugin-jsonc": "^2.16.0",
38
38
  "eslint-plugin-markdown": "^5.1.0",
39
- "eslint-plugin-n": "^17.9.0",
39
+ "eslint-plugin-n": "^17.10.1",
40
40
  "eslint-plugin-perfectionist": "^3.0.0",
41
41
  "eslint-plugin-prettier": "^5.2.1",
42
- "eslint-plugin-unicorn": "^54.0.0",
42
+ "eslint-plugin-regexp": "^2.6.0",
43
+ "eslint-plugin-unicorn": "^55.0.0",
43
44
  "eslint-plugin-unused-imports": "^4.0.1",
44
45
  "eslint-plugin-vue": "^9.27.0",
45
46
  "eslint-plugin-yml": "^1.14.0",
@@ -54,13 +55,13 @@
54
55
  "devDependencies": {
55
56
  "@sxzz/prettier-config": "^2.0.2",
56
57
  "@types/eslint": "^9.6.0",
57
- "@types/node": "^20.14.11",
58
+ "@types/node": "^20.14.13",
58
59
  "bumpp": "^9.4.1",
59
60
  "eslint": "npm:eslint-ts-patch@9.5.0-0",
60
61
  "eslint-ts-patch": "9.5.0-0",
61
- "tsup": "^8.2.2",
62
+ "tsup": "^8.2.3",
62
63
  "tsx": "^4.16.2",
63
- "typescript": "^5.5.3"
64
+ "typescript": "^5.5.4"
64
65
  },
65
66
  "engines": {
66
67
  "node": "^18.18.0 || >=20.0.0"