@sxzz/eslint-config 3.7.0 → 3.7.2

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.cjs CHANGED
@@ -84,6 +84,7 @@ __export(src_exports, {
84
84
  pluginYml: () => pluginYml,
85
85
  presetBasic: () => basic,
86
86
  presetJavaScript: () => presetJavaScript,
87
+ presetJsonc: () => presetJsonc,
87
88
  presetLangsExtensions: () => presetLangsExtensions,
88
89
  prettier: () => prettier,
89
90
  reactivityTransform: () => reactivityTransform,
@@ -937,6 +938,7 @@ var vueCustomRules = {
937
938
  ignoreConstructors: false
938
939
  }
939
940
  ],
941
+ "vue/one-component-per-file": "off",
940
942
  "vue/padding-line-between-blocks": ["error", "always"],
941
943
  "vue/prefer-template": "error",
942
944
  "vue/require-default-prop": "off",
@@ -1015,19 +1017,17 @@ var presetJavaScript = [
1015
1017
  ...imports,
1016
1018
  ...unicorn
1017
1019
  ];
1018
- var presetLangsExtensions = [
1019
- ...markdown,
1020
- ...yml,
1021
- ...jsonc,
1022
- ...sortPackageJson,
1023
- ...sortTsconfig
1020
+ var presetJsonc = [...jsonc, ...sortPackageJson, ...sortTsconfig];
1021
+ var presetLangsExtensions = [...markdown, ...yml, ...presetJsonc];
1022
+ var basic = [...presetJavaScript, ...typescript];
1023
+ var all = [
1024
+ ...basic,
1025
+ ...presetLangsExtensions,
1026
+ ...sortKeys,
1027
+ ...vue,
1028
+ ...unocss,
1029
+ ...prettier
1024
1030
  ];
1025
- var basic = [
1026
- ...presetJavaScript,
1027
- ...typescript,
1028
- ...presetLangsExtensions
1029
- ];
1030
- var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
1031
1031
  function sxzz(config = [], {
1032
1032
  vue: enableVue = true,
1033
1033
  prettier: enablePrettier = true,
@@ -1035,8 +1035,7 @@ function sxzz(config = [], {
1035
1035
  sortKeys: enableSortKeys = true,
1036
1036
  unocss: enableUnocss = false
1037
1037
  } = {}) {
1038
- const configs = [];
1039
- configs.push(...basic);
1038
+ const configs = [...basic, ...yml, ...presetJsonc];
1040
1039
  if (enableSortKeys) {
1041
1040
  configs.push(...sortKeys);
1042
1041
  }
@@ -1113,6 +1112,7 @@ function sxzz(config = [], {
1113
1112
  pluginYml,
1114
1113
  presetBasic,
1115
1114
  presetJavaScript,
1115
+ presetJsonc,
1116
1116
  presetLangsExtensions,
1117
1117
  prettier,
1118
1118
  reactivityTransform,
package/dist/index.d.cts CHANGED
@@ -87,6 +87,7 @@ declare const pluginPrettier: any;
87
87
  declare const configPrettier: any;
88
88
 
89
89
  declare const presetJavaScript: FlatESLintConfigItem[];
90
+ declare const presetJsonc: FlatESLintConfigItem[];
90
91
  declare const presetLangsExtensions: FlatESLintConfigItem[];
91
92
  declare const basic: FlatESLintConfigItem[];
92
93
 
@@ -99,4 +100,4 @@ declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], {
99
100
  sortKeys: boolean;
100
101
  }>): FlatESLintConfigItem[];
101
102
 
102
- 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, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
103
+ 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, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
package/dist/index.d.ts CHANGED
@@ -87,6 +87,7 @@ declare const pluginPrettier: any;
87
87
  declare const configPrettier: any;
88
88
 
89
89
  declare const presetJavaScript: FlatESLintConfigItem[];
90
+ declare const presetJsonc: FlatESLintConfigItem[];
90
91
  declare const presetLangsExtensions: FlatESLintConfigItem[];
91
92
  declare const basic: FlatESLintConfigItem[];
92
93
 
@@ -99,4 +100,4 @@ declare function sxzz(config?: FlatESLintConfigItem | FlatESLintConfigItem[], {
99
100
  sortKeys: boolean;
100
101
  }>): FlatESLintConfigItem[];
101
102
 
102
- 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, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
103
+ 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, all, basic, comments, configPrettier, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetJsonc, presetLangsExtensions, prettier, reactivityTransform, sortKeys, sortPackageJson, sortTsconfig, sxzz, typescript, unicorn, unocss, vue, yml };
package/dist/index.js CHANGED
@@ -836,6 +836,7 @@ var vueCustomRules = {
836
836
  ignoreConstructors: false
837
837
  }
838
838
  ],
839
+ "vue/one-component-per-file": "off",
839
840
  "vue/padding-line-between-blocks": ["error", "always"],
840
841
  "vue/prefer-template": "error",
841
842
  "vue/require-default-prop": "off",
@@ -914,19 +915,17 @@ var presetJavaScript = [
914
915
  ...imports,
915
916
  ...unicorn
916
917
  ];
917
- var presetLangsExtensions = [
918
- ...markdown,
919
- ...yml,
920
- ...jsonc,
921
- ...sortPackageJson,
922
- ...sortTsconfig
918
+ var presetJsonc = [...jsonc, ...sortPackageJson, ...sortTsconfig];
919
+ var presetLangsExtensions = [...markdown, ...yml, ...presetJsonc];
920
+ var basic = [...presetJavaScript, ...typescript];
921
+ var all = [
922
+ ...basic,
923
+ ...presetLangsExtensions,
924
+ ...sortKeys,
925
+ ...vue,
926
+ ...unocss,
927
+ ...prettier
923
928
  ];
924
- var basic = [
925
- ...presetJavaScript,
926
- ...typescript,
927
- ...presetLangsExtensions
928
- ];
929
- var all = [...basic, ...sortKeys, ...vue, ...unocss, ...prettier];
930
929
  function sxzz(config = [], {
931
930
  vue: enableVue = true,
932
931
  prettier: enablePrettier = true,
@@ -934,8 +933,7 @@ function sxzz(config = [], {
934
933
  sortKeys: enableSortKeys = true,
935
934
  unocss: enableUnocss = false
936
935
  } = {}) {
937
- const configs = [];
938
- configs.push(...basic);
936
+ const configs = [...basic, ...yml, ...presetJsonc];
939
937
  if (enableSortKeys) {
940
938
  configs.push(...sortKeys);
941
939
  }
@@ -1011,6 +1009,7 @@ export {
1011
1009
  pluginYml,
1012
1010
  basic as presetBasic,
1013
1011
  presetJavaScript,
1012
+ presetJsonc,
1014
1013
  presetLangsExtensions,
1015
1014
  prettier,
1016
1015
  reactivityTransform,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sxzz/eslint-config",
3
- "version": "3.7.0",
4
- "packageManager": "pnpm@8.8.0",
3
+ "version": "3.7.2",
4
+ "packageManager": "pnpm@8.10.0",
5
5
  "description": "ESLint config for @sxzz.",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -31,24 +31,24 @@
31
31
  "eslint": "^8.0.0"
32
32
  },
33
33
  "dependencies": {
34
- "@typescript-eslint/eslint-plugin": "^6.7.5",
35
- "@typescript-eslint/parser": "^6.7.5",
36
- "@unocss/eslint-plugin": "^0.56.5",
34
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
35
+ "@typescript-eslint/parser": "^6.9.0",
36
+ "@unocss/eslint-plugin": "^0.57.1",
37
37
  "eslint-config-prettier": "^9.0.0",
38
38
  "eslint-define-config": "^1.24.1",
39
- "eslint-plugin-antfu": "^1.0.0-beta.12",
39
+ "eslint-plugin-antfu": "^1.0.1",
40
40
  "eslint-plugin-eslint-comments": "^3.2.0",
41
- "eslint-plugin-i": "^2.28.1",
41
+ "eslint-plugin-i": "^2.29.0",
42
42
  "eslint-plugin-jsonc": "^2.10.0",
43
43
  "eslint-plugin-markdown": "^3.0.1",
44
- "eslint-plugin-prettier": "^5.0.0",
44
+ "eslint-plugin-prettier": "^5.0.1",
45
45
  "eslint-plugin-sort-keys": "^2.3.5",
46
- "eslint-plugin-unicorn": "^48.0.1",
46
+ "eslint-plugin-unicorn": "^49.0.0",
47
47
  "eslint-plugin-unused-imports": "^3.0.0",
48
- "eslint-plugin-vue": "^9.17.0",
48
+ "eslint-plugin-vue": "^9.18.1",
49
49
  "eslint-plugin-yml": "^1.10.0",
50
50
  "globals": "^13.23.0",
51
- "jsonc-eslint-parser": "^2.3.0",
51
+ "jsonc-eslint-parser": "^2.4.0",
52
52
  "local-pkg": "^0.5.0",
53
53
  "prettier": "^3.0.3",
54
54
  "vue-eslint-parser": "^9.3.2",
@@ -56,9 +56,9 @@
56
56
  },
57
57
  "devDependencies": {
58
58
  "@sxzz/prettier-config": "^1.0.4",
59
- "@types/node": "^20.8.4",
59
+ "@types/node": "^20.8.9",
60
60
  "bumpp": "^9.2.0",
61
- "eslint": "^8.51.0",
61
+ "eslint": "^8.52.0",
62
62
  "sucrase": "^3.34.0",
63
63
  "tsup": "^7.2.0",
64
64
  "typescript": "^5.2.2"