@ntnyq/eslint-config 2.5.0 → 2.5.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
@@ -33,6 +33,7 @@ __export(src_exports, {
33
33
  GLOB_ALL_SRC: () => GLOB_ALL_SRC,
34
34
  GLOB_CSS: () => GLOB_CSS,
35
35
  GLOB_DIST: () => GLOB_DIST,
36
+ GLOB_DTS: () => GLOB_DTS,
36
37
  GLOB_EXCLUDE: () => GLOB_EXCLUDE,
37
38
  GLOB_HTML: () => GLOB_HTML,
38
39
  GLOB_JS: () => GLOB_JS,
@@ -112,9 +113,7 @@ var hasTypeScript = (0, import_local_pkg.isPackageExists)("typescript");
112
113
  var hasVue = (0, import_local_pkg.isPackageExists)("vue") || (0, import_local_pkg.isPackageExists)("nuxt") || (0, import_local_pkg.isPackageExists)("vitepress") || (0, import_local_pkg.isPackageExists)("@slidev/cli") || (0, import_local_pkg.isPackageExists)("vue", {
113
114
  paths: [(0, import_node_path.resolve)(import_node_process.default.cwd(), "playground")]
114
115
  });
115
- var hasUnoCSS = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_local_pkg.isPackageExists)("unocss", {
116
- paths: [(0, import_node_path.resolve)(import_node_process.default.cwd(), "playground")]
117
- }) || (0, import_local_pkg.isPackageExists)("@unocss/postcss") || (0, import_local_pkg.isPackageExists)("@unocss/webpack") || (0, import_local_pkg.isPackageExists)("@unocss/nuxt");
116
+ var hasUnoCSS = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_local_pkg.isPackageExists)("@unocss/postcss") || (0, import_local_pkg.isPackageExists)("@unocss/webpack") || (0, import_local_pkg.isPackageExists)("@unocss/nuxt");
118
117
 
119
118
  // src/types.ts
120
119
  function defineConfig(configs = []) {
@@ -128,6 +127,7 @@ var GLOB_JS = "**/*.?([cm])js";
128
127
  var GLOB_JSX = "**/*.?([cm])jsx";
129
128
  var GLOB_TS = "**/*.?([cm])ts";
130
129
  var GLOB_TSX = "**/*.?([cm])tsx";
130
+ var GLOB_DTS = "**/*.d.?([cm])ts";
131
131
  var GLOB_STYLE = "**/*.{c,le,sc}ss";
132
132
  var GLOB_CSS = "**/*.css";
133
133
  var GLOB_LESS = "**/*.less";
@@ -842,6 +842,12 @@ var typescriptCore = import_typescript_eslint.default.config({
842
842
  disallowTypeAnnotations: false
843
843
  }
844
844
  ],
845
+ "@typescript-eslint/no-empty-object-type": [
846
+ "error",
847
+ {
848
+ allowInterfaces: "always"
849
+ }
850
+ ],
845
851
  "@typescript-eslint/consistent-type-assertions": [
846
852
  "error",
847
853
  {
@@ -858,7 +864,6 @@ var typescriptCore = import_typescript_eslint.default.config({
858
864
  "@typescript-eslint/no-explicit-any": "off",
859
865
  "@typescript-eslint/no-empty-function": "off",
860
866
  "@typescript-eslint/naming-convention": "off",
861
- "@typescript-eslint/no-empty-object-type": "off",
862
867
  "@typescript-eslint/no-non-null-assertion": "off",
863
868
  "@typescript-eslint/triple-slash-reference": "off",
864
869
  "@typescript-eslint/no-parameter-properties": "off",
@@ -872,8 +877,10 @@ var typescript = defineConfig([
872
877
  ...typescriptCore,
873
878
  {
874
879
  name: "ntnyq/ts/dts",
875
- files: ["**/*.d.ts"],
880
+ files: [GLOB_DTS],
876
881
  rules: {
882
+ "no-use-before-define": "off",
883
+ "no-restricted-syntax": "off",
877
884
  "import/no-duplicates": "off",
878
885
  "import/newline-after-import": "off"
879
886
  }
@@ -888,7 +895,7 @@ var typescript = defineConfig([
888
895
  },
889
896
  {
890
897
  name: "ntnyq/ts/cjs",
891
- files: [GLOB_JS, "**/*.cjs"],
898
+ files: [GLOB_JS],
892
899
  rules: {
893
900
  "@typescript-eslint/no-var-requires": "off"
894
901
  }
@@ -1552,6 +1559,7 @@ function ntnyq(config = [], {
1552
1559
  GLOB_ALL_SRC,
1553
1560
  GLOB_CSS,
1554
1561
  GLOB_DIST,
1562
+ GLOB_DTS,
1555
1563
  GLOB_EXCLUDE,
1556
1564
  GLOB_HTML,
1557
1565
  GLOB_JS,
package/dist/index.d.cts CHANGED
@@ -58,6 +58,7 @@ declare const GLOB_JS = "**/*.?([cm])js";
58
58
  declare const GLOB_JSX = "**/*.?([cm])jsx";
59
59
  declare const GLOB_TS = "**/*.?([cm])ts";
60
60
  declare const GLOB_TSX = "**/*.?([cm])tsx";
61
+ declare const GLOB_DTS = "**/*.d.?([cm])ts";
61
62
  declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
62
63
  declare const GLOB_CSS = "**/*.css";
63
64
  declare const GLOB_LESS = "**/*.less";
@@ -160,4 +161,4 @@ type InteropDefault<T> = T extends {
160
161
  } ? U : T;
161
162
  declare function interopDefault<T>(m: T): InteropDefault<T>;
162
163
 
163
- export { type ESLintPlugin, type FlatConfig, 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 RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
164
+ export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, 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 RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
package/dist/index.d.ts CHANGED
@@ -58,6 +58,7 @@ declare const GLOB_JS = "**/*.?([cm])js";
58
58
  declare const GLOB_JSX = "**/*.?([cm])jsx";
59
59
  declare const GLOB_TS = "**/*.?([cm])ts";
60
60
  declare const GLOB_TSX = "**/*.?([cm])tsx";
61
+ declare const GLOB_DTS = "**/*.d.?([cm])ts";
61
62
  declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
62
63
  declare const GLOB_CSS = "**/*.css";
63
64
  declare const GLOB_LESS = "**/*.less";
@@ -160,4 +161,4 @@ type InteropDefault<T> = T extends {
160
161
  } ? U : T;
161
162
  declare function interopDefault<T>(m: T): InteropDefault<T>;
162
163
 
163
- export { type ESLintPlugin, type FlatConfig, 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 RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
164
+ export { type ESLintPlugin, type FlatConfig, GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_DTS, 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 RuleRecord, type RuleRecordEntry, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, typescript, typescriptCore, unicorn, unocss, vue, yml };
package/dist/index.js CHANGED
@@ -6,9 +6,7 @@ var hasTypeScript = isPackageExists("typescript");
6
6
  var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
7
7
  paths: [resolve(process.cwd(), "playground")]
8
8
  });
9
- var hasUnoCSS = isPackageExists("unocss") || isPackageExists("unocss", {
10
- paths: [resolve(process.cwd(), "playground")]
11
- }) || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
9
+ var hasUnoCSS = isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
12
10
 
13
11
  // src/types.ts
14
12
  function defineConfig(configs = []) {
@@ -22,6 +20,7 @@ var GLOB_JS = "**/*.?([cm])js";
22
20
  var GLOB_JSX = "**/*.?([cm])jsx";
23
21
  var GLOB_TS = "**/*.?([cm])ts";
24
22
  var GLOB_TSX = "**/*.?([cm])tsx";
23
+ var GLOB_DTS = "**/*.d.?([cm])ts";
25
24
  var GLOB_STYLE = "**/*.{c,le,sc}ss";
26
25
  var GLOB_CSS = "**/*.css";
27
26
  var GLOB_LESS = "**/*.less";
@@ -736,6 +735,12 @@ var typescriptCore = tseslint.config({
736
735
  disallowTypeAnnotations: false
737
736
  }
738
737
  ],
738
+ "@typescript-eslint/no-empty-object-type": [
739
+ "error",
740
+ {
741
+ allowInterfaces: "always"
742
+ }
743
+ ],
739
744
  "@typescript-eslint/consistent-type-assertions": [
740
745
  "error",
741
746
  {
@@ -752,7 +757,6 @@ var typescriptCore = tseslint.config({
752
757
  "@typescript-eslint/no-explicit-any": "off",
753
758
  "@typescript-eslint/no-empty-function": "off",
754
759
  "@typescript-eslint/naming-convention": "off",
755
- "@typescript-eslint/no-empty-object-type": "off",
756
760
  "@typescript-eslint/no-non-null-assertion": "off",
757
761
  "@typescript-eslint/triple-slash-reference": "off",
758
762
  "@typescript-eslint/no-parameter-properties": "off",
@@ -766,8 +770,10 @@ var typescript = defineConfig([
766
770
  ...typescriptCore,
767
771
  {
768
772
  name: "ntnyq/ts/dts",
769
- files: ["**/*.d.ts"],
773
+ files: [GLOB_DTS],
770
774
  rules: {
775
+ "no-use-before-define": "off",
776
+ "no-restricted-syntax": "off",
771
777
  "import/no-duplicates": "off",
772
778
  "import/newline-after-import": "off"
773
779
  }
@@ -782,7 +788,7 @@ var typescript = defineConfig([
782
788
  },
783
789
  {
784
790
  name: "ntnyq/ts/cjs",
785
- files: [GLOB_JS, "**/*.cjs"],
791
+ files: [GLOB_JS],
786
792
  rules: {
787
793
  "@typescript-eslint/no-var-requires": "off"
788
794
  }
@@ -1445,6 +1451,7 @@ export {
1445
1451
  GLOB_ALL_SRC,
1446
1452
  GLOB_CSS,
1447
1453
  GLOB_DIST,
1454
+ GLOB_DTS,
1448
1455
  GLOB_EXCLUDE,
1449
1456
  GLOB_HTML,
1450
1457
  GLOB_JS,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "2.5.0",
5
- "packageManager": "pnpm@9.4.0",
4
+ "version": "2.5.2",
5
+ "packageManager": "pnpm@9.5.0",
6
6
  "description": "ESLint flat config of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -56,12 +56,12 @@
56
56
  "dependencies": {
57
57
  "@eslint/js": "^9.6.0",
58
58
  "@types/eslint": "^8.56.10",
59
- "@unocss/eslint-plugin": "^0.61.0",
59
+ "@unocss/eslint-plugin": "^0.61.3",
60
60
  "eslint-config-prettier": "^9.1.0",
61
61
  "eslint-plugin-command": "^0.2.3",
62
62
  "eslint-plugin-eslint-comments": "^3.2.0",
63
- "eslint-plugin-import-x": "^0.5.3",
64
- "eslint-plugin-jsdoc": "^48.5.0",
63
+ "eslint-plugin-import-x": "^3.0.0",
64
+ "eslint-plugin-jsdoc": "^48.7.0",
65
65
  "eslint-plugin-jsonc": "^2.16.0",
66
66
  "eslint-plugin-markdown": "^5.0.0",
67
67
  "eslint-plugin-n": "^17.9.0",
@@ -81,13 +81,13 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@ntnyq/prettier-config": "^1.21.2",
84
- "@types/node": "^20.14.9",
84
+ "@types/node": "^20.14.10",
85
85
  "bumpp": "^9.4.1",
86
86
  "eslint": "^9.6.0",
87
87
  "husky": "^9.0.11",
88
88
  "nano-staged": "^0.8.0",
89
89
  "npm-run-all2": "^6.2.2",
90
- "rimraf": "^5.0.7",
90
+ "rimraf": "^6.0.1",
91
91
  "tsup": "^8.1.0",
92
92
  "typescript": "^5.5.3",
93
93
  "zx": "^8.1.4"