@ntnyq/eslint-config 2.0.0-beta.17 → 2.0.0-beta.18

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
@@ -56,15 +56,16 @@ __export(src_exports, {
56
56
  all: () => all,
57
57
  astro: () => astro,
58
58
  basic: () => basic,
59
+ common: () => common,
59
60
  eslintComments: () => eslintComments,
60
61
  getVueVersion: () => getVueVersion,
61
62
  imports: () => imports,
62
63
  js: () => js,
64
+ jsonOrder: () => jsonOrder,
63
65
  jsonc: () => jsonc,
64
66
  jsx: () => jsx,
65
67
  markdown: () => markdown,
66
68
  ntnyq: () => ntnyq,
67
- pkgOrder: () => pkgOrder,
68
69
  prettier: () => prettier,
69
70
  react: () => react,
70
71
  reactHooksPlugin: () => import_eslint_plugin_react_hooks.default,
@@ -338,7 +339,7 @@ var js = [
338
339
  semi: ["error", "never"],
339
340
  "semi-spacing": ["error", { before: false, after: true }],
340
341
  "space-before-blocks": ["error", "always"],
341
- "space-before-function-paren": ["error", "always"],
342
+ "space-before-function-paren": ["error", "never"],
342
343
  "space-in-parens": ["error", "never"],
343
344
  "space-infix-ops": "error",
344
345
  "space-unary-ops": ["error", { words: true, nonwords: false }],
@@ -803,7 +804,7 @@ var react = [
803
804
 
804
805
  // src/configs/astro.ts
805
806
  var import_eslint_plugin_astro = __toESM(require("eslint-plugin-astro"), 1);
806
- var import_astro_eslint_parser = __toESM(require("astro-eslint-parser"), 1);
807
+ var astroParser = __toESM(require("astro-eslint-parser"), 1);
807
808
  var astro = [
808
809
  {
809
810
  files: [GLOB_ASTRO],
@@ -811,7 +812,7 @@ var astro = [
811
812
  astro: import_eslint_plugin_astro.default
812
813
  },
813
814
  languageOptions: {
814
- parser: import_astro_eslint_parser.default,
815
+ parser: astroParser,
815
816
  parserOptions: {
816
817
  parser: "@typescript-eslint/parser",
817
818
  extraFileExtensions: [".astro"]
@@ -826,7 +827,7 @@ var astro = [
826
827
 
827
828
  // src/configs/jsonc.ts
828
829
  var import_eslint_plugin_jsonc = __toESM(require("eslint-plugin-jsonc"), 1);
829
- var import_jsonc_eslint_parser = __toESM(require("jsonc-eslint-parser"), 1);
830
+ var jsoncParser = __toESM(require("jsonc-eslint-parser"), 1);
830
831
  var jsonc = [
831
832
  {
832
833
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC, "**/*rc"],
@@ -834,7 +835,7 @@ var jsonc = [
834
835
  jsonc: import_eslint_plugin_jsonc.default
835
836
  },
836
837
  languageOptions: {
837
- parser: import_jsonc_eslint_parser.default
838
+ parser: jsoncParser
838
839
  },
839
840
  // @ts-expect-error 2322
840
841
  rules: {
@@ -868,7 +869,7 @@ var jsonc = [
868
869
  }
869
870
  }
870
871
  ];
871
- var pkgOrder = [
872
+ var jsonOrder = [
872
873
  {
873
874
  files: ["**/package.json"],
874
875
  rules: {
@@ -1041,31 +1042,26 @@ var basic = [
1041
1042
  ...js,
1042
1043
  ...jsx,
1043
1044
  ...ts,
1044
- ...yml,
1045
1045
  ...imports,
1046
1046
  ...unicorn,
1047
- ...jsonc,
1048
- ...pkgOrder,
1049
1047
  ...eslintComments
1050
1048
  ];
1051
- var all = [
1049
+ var common = [
1052
1050
  ...basic,
1053
- ...vue,
1054
- ...react,
1055
- ...astro,
1056
- ...unocss,
1051
+ ...yml,
1052
+ ...jsonc,
1053
+ ...jsonOrder,
1057
1054
  ...prettier,
1058
1055
  ...markdown
1059
1056
  ];
1057
+ var all = [...common, ...vue, ...react, ...astro, ...unocss];
1060
1058
  function ntnyq(config = [], {
1061
1059
  vue: enableVue = false,
1062
1060
  react: enableReact = false,
1063
1061
  astro: enableAstro = false,
1064
- prettier: enablePrettier = false,
1065
- markdown: enableMarkdown = false,
1066
1062
  unocss: enableUnoCSS = false
1067
1063
  } = {}) {
1068
- const configs4 = [...basic];
1064
+ const configs4 = [...common];
1069
1065
  if (enableVue) {
1070
1066
  configs4.push(...vue);
1071
1067
  }
@@ -1078,12 +1074,6 @@ function ntnyq(config = [], {
1078
1074
  if (enableUnoCSS) {
1079
1075
  configs4.push(...unocss);
1080
1076
  }
1081
- if (enableMarkdown) {
1082
- configs4.push(...markdown);
1083
- }
1084
- if (enablePrettier) {
1085
- configs4.push(...prettier);
1086
- }
1087
1077
  if (Object.keys(config).length > 0) {
1088
1078
  configs4.push(...Array.isArray(config) ? config : [config]);
1089
1079
  }
@@ -1117,15 +1107,16 @@ function ntnyq(config = [], {
1117
1107
  all,
1118
1108
  astro,
1119
1109
  basic,
1110
+ common,
1120
1111
  eslintComments,
1121
1112
  getVueVersion,
1122
1113
  imports,
1123
1114
  js,
1115
+ jsonOrder,
1124
1116
  jsonc,
1125
1117
  jsx,
1126
1118
  markdown,
1127
1119
  ntnyq,
1128
- pkgOrder,
1129
1120
  prettier,
1130
1121
  react,
1131
1122
  reactHooksPlugin,
package/dist/index.d.cts CHANGED
@@ -35,9 +35,10 @@ declare const GLOB_LOCKFILE: string[];
35
35
  declare const GLOB_EXCLUDE: string[];
36
36
 
37
37
  /**
38
- * no framework
38
+ * only js and ts
39
39
  */
40
40
  declare const basic: FlatESLintConfig[];
41
+ declare const common: FlatESLintConfig[];
41
42
  /**
42
43
  * all supported framework
43
44
  */
@@ -45,12 +46,10 @@ declare const all: FlatESLintConfig[];
45
46
  /**
46
47
  * custom framework support
47
48
  */
48
- declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, react: enableReact, astro: enableAstro, prettier: enablePrettier, markdown: enableMarkdown, unocss: enableUnoCSS, }?: {
49
+ declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
49
50
  vue?: boolean | undefined;
50
51
  react?: boolean | undefined;
51
52
  astro?: boolean | undefined;
52
- prettier?: boolean | undefined;
53
- markdown?: boolean | undefined;
54
53
  unocss?: boolean | undefined;
55
54
  }): FlatESLintConfig[];
56
55
 
@@ -71,7 +70,7 @@ declare const react: FlatESLintConfig[];
71
70
  declare const astro: FlatESLintConfig[];
72
71
 
73
72
  declare const jsonc: FlatESLintConfig[];
74
- declare const pkgOrder: FlatESLintConfig[];
73
+ declare const jsonOrder: FlatESLintConfig[];
75
74
 
76
75
  declare const unocss: FlatESLintConfig[];
77
76
 
@@ -81,4 +80,4 @@ declare const markdown: FlatESLintConfig[];
81
80
 
82
81
  declare const eslintComments: FlatESLintConfig[];
83
82
 
84
- export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, basic, eslintComments, getVueVersion, imports, js, jsonc, jsx, markdown, ntnyq, pkgOrder, prettier, react, ts, unicorn, unocss, vue, yml };
83
+ export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, basic, common, eslintComments, getVueVersion, imports, js, jsonOrder, jsonc, jsx, markdown, ntnyq, prettier, react, ts, unicorn, unocss, vue, yml };
package/dist/index.d.ts CHANGED
@@ -35,9 +35,10 @@ declare const GLOB_LOCKFILE: string[];
35
35
  declare const GLOB_EXCLUDE: string[];
36
36
 
37
37
  /**
38
- * no framework
38
+ * only js and ts
39
39
  */
40
40
  declare const basic: FlatESLintConfig[];
41
+ declare const common: FlatESLintConfig[];
41
42
  /**
42
43
  * all supported framework
43
44
  */
@@ -45,12 +46,10 @@ declare const all: FlatESLintConfig[];
45
46
  /**
46
47
  * custom framework support
47
48
  */
48
- declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, react: enableReact, astro: enableAstro, prettier: enablePrettier, markdown: enableMarkdown, unocss: enableUnoCSS, }?: {
49
+ declare function ntnyq(config?: FlatESLintConfig | FlatESLintConfig[], { vue: enableVue, react: enableReact, astro: enableAstro, unocss: enableUnoCSS, }?: {
49
50
  vue?: boolean | undefined;
50
51
  react?: boolean | undefined;
51
52
  astro?: boolean | undefined;
52
- prettier?: boolean | undefined;
53
- markdown?: boolean | undefined;
54
53
  unocss?: boolean | undefined;
55
54
  }): FlatESLintConfig[];
56
55
 
@@ -71,7 +70,7 @@ declare const react: FlatESLintConfig[];
71
70
  declare const astro: FlatESLintConfig[];
72
71
 
73
72
  declare const jsonc: FlatESLintConfig[];
74
- declare const pkgOrder: FlatESLintConfig[];
73
+ declare const jsonOrder: FlatESLintConfig[];
75
74
 
76
75
  declare const unocss: FlatESLintConfig[];
77
76
 
@@ -81,4 +80,4 @@ declare const markdown: FlatESLintConfig[];
81
80
 
82
81
  declare const eslintComments: FlatESLintConfig[];
83
82
 
84
- export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, basic, eslintComments, getVueVersion, imports, js, jsonc, jsx, markdown, ntnyq, pkgOrder, prettier, react, ts, unicorn, unocss, vue, yml };
83
+ export { GLOB_ALL_SRC, GLOB_ASTRO, 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, astro, basic, common, eslintComments, getVueVersion, imports, js, jsonOrder, jsonc, jsx, markdown, ntnyq, prettier, react, ts, unicorn, unocss, vue, yml };
package/dist/index.js CHANGED
@@ -255,7 +255,7 @@ var js = [
255
255
  semi: ["error", "never"],
256
256
  "semi-spacing": ["error", { before: false, after: true }],
257
257
  "space-before-blocks": ["error", "always"],
258
- "space-before-function-paren": ["error", "always"],
258
+ "space-before-function-paren": ["error", "never"],
259
259
  "space-in-parens": ["error", "never"],
260
260
  "space-infix-ops": "error",
261
261
  "space-unary-ops": ["error", { words: true, nonwords: false }],
@@ -720,7 +720,7 @@ var react = [
720
720
 
721
721
  // src/configs/astro.ts
722
722
  import astroPlugin, { configs as configs2 } from "eslint-plugin-astro";
723
- import astroParser from "astro-eslint-parser";
723
+ import * as astroParser from "astro-eslint-parser";
724
724
  var astro = [
725
725
  {
726
726
  files: [GLOB_ASTRO],
@@ -743,7 +743,7 @@ var astro = [
743
743
 
744
744
  // src/configs/jsonc.ts
745
745
  import jsoncPlugin, { configs as configs3 } from "eslint-plugin-jsonc";
746
- import jsoncParser from "jsonc-eslint-parser";
746
+ import * as jsoncParser from "jsonc-eslint-parser";
747
747
  var jsonc = [
748
748
  {
749
749
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC, "**/*rc"],
@@ -785,7 +785,7 @@ var jsonc = [
785
785
  }
786
786
  }
787
787
  ];
788
- var pkgOrder = [
788
+ var jsonOrder = [
789
789
  {
790
790
  files: ["**/package.json"],
791
791
  rules: {
@@ -958,31 +958,26 @@ var basic = [
958
958
  ...js,
959
959
  ...jsx,
960
960
  ...ts,
961
- ...yml,
962
961
  ...imports,
963
962
  ...unicorn,
964
- ...jsonc,
965
- ...pkgOrder,
966
963
  ...eslintComments
967
964
  ];
968
- var all = [
965
+ var common = [
969
966
  ...basic,
970
- ...vue,
971
- ...react,
972
- ...astro,
973
- ...unocss,
967
+ ...yml,
968
+ ...jsonc,
969
+ ...jsonOrder,
974
970
  ...prettier,
975
971
  ...markdown
976
972
  ];
973
+ var all = [...common, ...vue, ...react, ...astro, ...unocss];
977
974
  function ntnyq(config = [], {
978
975
  vue: enableVue = false,
979
976
  react: enableReact = false,
980
977
  astro: enableAstro = false,
981
- prettier: enablePrettier = false,
982
- markdown: enableMarkdown = false,
983
978
  unocss: enableUnoCSS = false
984
979
  } = {}) {
985
- const configs4 = [...basic];
980
+ const configs4 = [...common];
986
981
  if (enableVue) {
987
982
  configs4.push(...vue);
988
983
  }
@@ -995,12 +990,6 @@ function ntnyq(config = [], {
995
990
  if (enableUnoCSS) {
996
991
  configs4.push(...unocss);
997
992
  }
998
- if (enableMarkdown) {
999
- configs4.push(...markdown);
1000
- }
1001
- if (enablePrettier) {
1002
- configs4.push(...prettier);
1003
- }
1004
993
  if (Object.keys(config).length > 0) {
1005
994
  configs4.push(...Array.isArray(config) ? config : [config]);
1006
995
  }
@@ -1033,15 +1022,16 @@ export {
1033
1022
  all,
1034
1023
  astro,
1035
1024
  basic,
1025
+ common,
1036
1026
  eslintComments,
1037
1027
  getVueVersion,
1038
1028
  imports,
1039
1029
  js,
1030
+ jsonOrder,
1040
1031
  jsonc,
1041
1032
  jsx,
1042
1033
  markdown,
1043
1034
  ntnyq,
1044
- pkgOrder,
1045
1035
  prettier,
1046
1036
  react,
1047
1037
  reactHooksPlugin,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.17",
5
- "packageManager": "pnpm@8.7.5",
4
+ "version": "2.0.0-beta.18",
5
+ "packageManager": "pnpm@8.7.6",
6
6
  "description": "ESLint flat config of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -43,9 +43,9 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@eslint/js": "^8.49.0",
46
- "@typescript-eslint/eslint-plugin": "^6.7.0",
47
- "@typescript-eslint/parser": "^6.7.0",
48
- "@unocss/eslint-plugin": "^0.55.7",
46
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
47
+ "@typescript-eslint/parser": "^6.7.2",
48
+ "@unocss/eslint-plugin": "^0.56.0",
49
49
  "astro-eslint-parser": "^0.15.0",
50
50
  "eslint-config-prettier": "^9.0.0",
51
51
  "eslint-define-config": "^1.23.0",
@@ -68,14 +68,14 @@
68
68
  "yaml-eslint-parser": "^1.2.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@ntnyq/prettier-config": "^1.13.0",
72
- "@types/node": "^20.6.0",
71
+ "@ntnyq/prettier-config": "^1.14.0",
72
+ "@types/node": "^20.6.3",
73
73
  "bumpp": "^9.2.0",
74
74
  "eslint": "^8.49.0",
75
75
  "husky": "^8.0.3",
76
76
  "nano-staged": "^0.8.0",
77
77
  "npm-run-all": "^4.1.5",
78
- "pnpm": "^8.7.5",
78
+ "pnpm": "^8.7.6",
79
79
  "rimraf": "^5.0.1",
80
80
  "tsup": "^7.2.0",
81
81
  "typescript": "5.2.2"