@ntnyq/eslint-config 2.6.0 → 2.6.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.cjs CHANGED
@@ -87,6 +87,7 @@ __export(src_exports, {
87
87
  pluginToml: () => import_eslint_plugin_toml.default,
88
88
  pluginUnicorn: () => import_eslint_plugin_unicorn.default,
89
89
  pluginUnoCSS: () => import_eslint_plugin.default,
90
+ pluginUnusedImports: () => import_eslint_plugin_unused_imports.default,
90
91
  pluginVue: () => import_eslint_plugin_vue.default,
91
92
  pluginYaml: () => import_eslint_plugin_yml.default,
92
93
  presetAll: () => presetAll,
@@ -105,6 +106,7 @@ __export(src_exports, {
105
106
  typescriptCore: () => typescriptCore,
106
107
  unicorn: () => unicorn,
107
108
  unocss: () => unocss,
109
+ unusedImports: () => unusedImports,
108
110
  vue: () => vue,
109
111
  yml: () => yml
110
112
  });
@@ -244,6 +246,7 @@ var import_eslint_plugin_unicorn = __toESM(require("eslint-plugin-unicorn"), 1);
244
246
  var import_eslint_plugin_import_x = __toESM(require("eslint-plugin-import-x"), 1);
245
247
  var import_eslint_plugin_prettier = __toESM(require("eslint-plugin-prettier"), 1);
246
248
  var import_eslint_plugin_markdown = __toESM(require("eslint-plugin-markdown"), 1);
249
+ var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"), 1);
247
250
  var import_eslint_plugin_eslint_comments = __toESM(require("@eslint-community/eslint-plugin-eslint-comments"), 1);
248
251
  var parserToml = __toESM(require("toml-eslint-parser"), 1);
249
252
  var parserYaml = __toESM(require("yaml-eslint-parser"), 1);
@@ -763,7 +766,7 @@ var javascript = defineConfig([
763
766
  "max-lines-per-function": [
764
767
  "error",
765
768
  {
766
- max: 100,
769
+ max: 200,
767
770
  skipComments: true,
768
771
  skipBlankLines: true
769
772
  }
@@ -925,6 +928,29 @@ var typescript = defineConfig([
925
928
  }
926
929
  ]);
927
930
 
931
+ // src/configs/unusedImports.ts
932
+ var unusedImports = defineConfig([
933
+ {
934
+ name: "ntnyq/unused-imports",
935
+ plugins: {
936
+ "unused-imports": import_eslint_plugin_unused_imports.default
937
+ },
938
+ rules: {
939
+ "@typescript-eslint/no-unused-vars": "off",
940
+ "unused-imports/no-unused-imports": "error",
941
+ "unused-imports/no-unused-vars": [
942
+ "warn",
943
+ {
944
+ vars: "all",
945
+ varsIgnorePattern: "^_",
946
+ args: "after-used",
947
+ argsIgnorePattern: "^_"
948
+ }
949
+ ]
950
+ }
951
+ }
952
+ ]);
953
+
928
954
  // src/configs/regexp.ts
929
955
  var regexp = defineConfig([
930
956
  /**
@@ -1669,6 +1695,7 @@ function ntnyq(config = [], {
1669
1695
  pluginToml,
1670
1696
  pluginUnicorn,
1671
1697
  pluginUnoCSS,
1698
+ pluginUnusedImports,
1672
1699
  pluginVue,
1673
1700
  pluginYaml,
1674
1701
  presetAll,
@@ -1687,6 +1714,7 @@ function ntnyq(config = [], {
1687
1714
  typescriptCore,
1688
1715
  unicorn,
1689
1716
  unocss,
1717
+ unusedImports,
1690
1718
  vue,
1691
1719
  yml
1692
1720
  });
package/dist/index.d.cts CHANGED
@@ -13,6 +13,7 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
13
13
  export { default as pluginImport } from 'eslint-plugin-import-x';
14
14
  export { default as pluginPrettier } from 'eslint-plugin-prettier';
15
15
  export { default as pluginMarkdown } from 'eslint-plugin-markdown';
16
+ export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
16
17
  export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
17
18
  import * as tomlEslintParser from 'toml-eslint-parser';
18
19
  export { tomlEslintParser as parserToml };
@@ -509,7 +510,7 @@ interface RuleOptions {
509
510
  '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions>
510
511
  /**
511
512
  * Disallow unused variables
512
- * @see https://typescript-eslint.io/rules/no-unused-vars
513
+ * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
513
514
  */
514
515
  '@typescript-eslint/no-unused-vars'?: Linter.RuleEntry<TypescriptEslintNoUnusedVars>
515
516
  /**
@@ -6420,7 +6421,8 @@ type TypescriptEslintNoRestrictedImports = ((string | {
6420
6421
 
6421
6422
  allowImportNames?: [string, ...(string)[]]
6422
6423
 
6423
- group: [string, ...(string)[]]
6424
+ group?: [string, ...(string)[]]
6425
+ regex?: string
6424
6426
  importNamePattern?: string
6425
6427
  allowImportNamePattern?: string
6426
6428
  message?: string
@@ -8708,18 +8710,11 @@ type NoRestrictedImports = ((string | {
8708
8710
  importNames?: string[]
8709
8711
  allowImportNames?: string[]
8710
8712
  })[]
8711
- patterns?: (string[] | {
8712
-
8713
- importNames?: [string, ...(string)[]]
8714
-
8715
- allowImportNames?: [string, ...(string)[]]
8716
-
8717
- group: [string, ...(string)[]]
8718
- importNamePattern?: string
8719
- allowImportNamePattern?: string
8720
- message?: string
8721
- caseSensitive?: boolean
8722
- }[])
8713
+ patterns?: (string[] | ({
8714
+ [k: string]: unknown | undefined
8715
+ } | {
8716
+ [k: string]: unknown | undefined
8717
+ })[])
8723
8718
  }])
8724
8719
  // ----- no-restricted-modules -----
8725
8720
  type NoRestrictedModules = ((string | {
@@ -11320,6 +11315,8 @@ declare const jsx: TypedConfigItem[];
11320
11315
  declare const typescriptCore: TypedConfigItem[];
11321
11316
  declare const typescript: TypedConfigItem[];
11322
11317
 
11318
+ declare const unusedImports: TypedConfigItem[];
11319
+
11323
11320
  declare const regexp: TypedConfigItem[];
11324
11321
 
11325
11322
  declare const unocss: TypedConfigItem[];
@@ -11340,4 +11337,4 @@ declare const markdown: TypedConfigItem[];
11340
11337
  declare function getVueVersion(): number;
11341
11338
  declare const vue: TypedConfigItem[];
11342
11339
 
11343
- export { 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_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, vue, yml };
11340
+ export { 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_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
13
13
  export { default as pluginImport } from 'eslint-plugin-import-x';
14
14
  export { default as pluginPrettier } from 'eslint-plugin-prettier';
15
15
  export { default as pluginMarkdown } from 'eslint-plugin-markdown';
16
+ export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
16
17
  export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
17
18
  import * as tomlEslintParser from 'toml-eslint-parser';
18
19
  export { tomlEslintParser as parserToml };
@@ -509,7 +510,7 @@ interface RuleOptions {
509
510
  '@typescript-eslint/no-unused-expressions'?: Linter.RuleEntry<TypescriptEslintNoUnusedExpressions>
510
511
  /**
511
512
  * Disallow unused variables
512
- * @see https://typescript-eslint.io/rules/no-unused-vars
513
+ * @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-imports.md
513
514
  */
514
515
  '@typescript-eslint/no-unused-vars'?: Linter.RuleEntry<TypescriptEslintNoUnusedVars>
515
516
  /**
@@ -6420,7 +6421,8 @@ type TypescriptEslintNoRestrictedImports = ((string | {
6420
6421
 
6421
6422
  allowImportNames?: [string, ...(string)[]]
6422
6423
 
6423
- group: [string, ...(string)[]]
6424
+ group?: [string, ...(string)[]]
6425
+ regex?: string
6424
6426
  importNamePattern?: string
6425
6427
  allowImportNamePattern?: string
6426
6428
  message?: string
@@ -8708,18 +8710,11 @@ type NoRestrictedImports = ((string | {
8708
8710
  importNames?: string[]
8709
8711
  allowImportNames?: string[]
8710
8712
  })[]
8711
- patterns?: (string[] | {
8712
-
8713
- importNames?: [string, ...(string)[]]
8714
-
8715
- allowImportNames?: [string, ...(string)[]]
8716
-
8717
- group: [string, ...(string)[]]
8718
- importNamePattern?: string
8719
- allowImportNamePattern?: string
8720
- message?: string
8721
- caseSensitive?: boolean
8722
- }[])
8713
+ patterns?: (string[] | ({
8714
+ [k: string]: unknown | undefined
8715
+ } | {
8716
+ [k: string]: unknown | undefined
8717
+ })[])
8723
8718
  }])
8724
8719
  // ----- no-restricted-modules -----
8725
8720
  type NoRestrictedModules = ((string | {
@@ -11320,6 +11315,8 @@ declare const jsx: TypedConfigItem[];
11320
11315
  declare const typescriptCore: TypedConfigItem[];
11321
11316
  declare const typescript: TypedConfigItem[];
11322
11317
 
11318
+ declare const unusedImports: TypedConfigItem[];
11319
+
11323
11320
  declare const regexp: TypedConfigItem[];
11324
11321
 
11325
11322
  declare const unocss: TypedConfigItem[];
@@ -11340,4 +11337,4 @@ declare const markdown: TypedConfigItem[];
11340
11337
  declare function getVueVersion(): number;
11341
11338
  declare const vue: TypedConfigItem[];
11342
11339
 
11343
- export { 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_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, vue, yml };
11340
+ export { 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_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, command, comments, defineConfig, getVueVersion, hasTypeScript, hasUnoCSS, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, presetAll, presetBasic, presetCommon, presetJavaScript, presetJsonc, presetLanguageExtensions, prettier, regexp, sortPackageJson, sortTsConfig, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vue, yml };
package/dist/index.js CHANGED
@@ -132,7 +132,8 @@ import { default as default9 } from "eslint-plugin-unicorn";
132
132
  import { default as default10 } from "eslint-plugin-import-x";
133
133
  import { default as default11 } from "eslint-plugin-prettier";
134
134
  import { default as default12 } from "eslint-plugin-markdown";
135
- import { default as default13 } from "@eslint-community/eslint-plugin-eslint-comments";
135
+ import { default as default13 } from "eslint-plugin-unused-imports";
136
+ import { default as default14 } from "@eslint-community/eslint-plugin-eslint-comments";
136
137
  import * as parserToml from "toml-eslint-parser";
137
138
  import * as parserYaml from "yaml-eslint-parser";
138
139
  import * as parserVue from "vue-eslint-parser";
@@ -327,10 +328,10 @@ var comments = defineConfig([
327
328
  {
328
329
  name: "ntnyq/eslint-comments",
329
330
  plugins: {
330
- "@eslint-community/eslint-comments": default13
331
+ "@eslint-community/eslint-comments": default14
331
332
  },
332
333
  rules: {
333
- ...default13.configs.recommended.rules,
334
+ ...default14.configs.recommended.rules,
334
335
  "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }]
335
336
  }
336
337
  }
@@ -651,7 +652,7 @@ var javascript = defineConfig([
651
652
  "max-lines-per-function": [
652
653
  "error",
653
654
  {
654
- max: 100,
655
+ max: 200,
655
656
  skipComments: true,
656
657
  skipBlankLines: true
657
658
  }
@@ -813,6 +814,29 @@ var typescript = defineConfig([
813
814
  }
814
815
  ]);
815
816
 
817
+ // src/configs/unusedImports.ts
818
+ var unusedImports = defineConfig([
819
+ {
820
+ name: "ntnyq/unused-imports",
821
+ plugins: {
822
+ "unused-imports": default13
823
+ },
824
+ rules: {
825
+ "@typescript-eslint/no-unused-vars": "off",
826
+ "unused-imports/no-unused-imports": "error",
827
+ "unused-imports/no-unused-vars": [
828
+ "warn",
829
+ {
830
+ vars: "all",
831
+ varsIgnorePattern: "^_",
832
+ args: "after-used",
833
+ argsIgnorePattern: "^_"
834
+ }
835
+ ]
836
+ }
837
+ }
838
+ ]);
839
+
816
840
  // src/configs/regexp.ts
817
841
  var regexp = defineConfig([
818
842
  /**
@@ -1545,7 +1569,7 @@ export {
1545
1569
  parserToml,
1546
1570
  parserVue,
1547
1571
  parserYaml,
1548
- default13 as pluginComments,
1572
+ default14 as pluginComments,
1549
1573
  default10 as pluginImport,
1550
1574
  default7 as pluginJsdoc,
1551
1575
  default6 as pluginJsonc,
@@ -1556,6 +1580,7 @@ export {
1556
1580
  default5 as pluginToml,
1557
1581
  default9 as pluginUnicorn,
1558
1582
  default8 as pluginUnoCSS,
1583
+ default13 as pluginUnusedImports,
1559
1584
  default3 as pluginVue,
1560
1585
  default4 as pluginYaml,
1561
1586
  presetAll,
@@ -1574,6 +1599,7 @@ export {
1574
1599
  typescriptCore,
1575
1600
  unicorn,
1576
1601
  unocss,
1602
+ unusedImports,
1577
1603
  vue,
1578
1604
  yml
1579
1605
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "2.6.0",
4
+ "version": "2.6.1",
5
5
  "packageManager": "pnpm@9.5.0",
6
6
  "description": "ESLint flat config of ntnyq",
7
7
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
59
59
  "@eslint/js": "^9.7.0",
60
60
  "@types/eslint": "^8.56.10",
61
- "@unocss/eslint-plugin": "^0.61.3",
61
+ "@unocss/eslint-plugin": "^0.61.5",
62
62
  "eslint-config-prettier": "^9.1.0",
63
63
  "eslint-flat-config-utils": "^0.2.5",
64
64
  "eslint-plugin-command": "^0.2.3",
@@ -77,17 +77,17 @@
77
77
  "globals": "^15.8.0",
78
78
  "jsonc-eslint-parser": "^2.4.0",
79
79
  "local-pkg": "^0.5.0",
80
- "prettier": "^3.3.2",
80
+ "prettier": "^3.3.3",
81
81
  "toml-eslint-parser": "^0.10.0",
82
- "typescript-eslint": "^8.0.0-alpha.41",
82
+ "typescript-eslint": "^8.0.0-alpha.44",
83
83
  "vue-eslint-parser": "^9.4.3",
84
84
  "yaml-eslint-parser": "^1.2.3"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@ntnyq/prettier-config": "^1.21.2",
88
- "@types/node": "^20.14.10",
88
+ "@types/node": "^20.14.11",
89
89
  "bumpp": "^9.4.1",
90
- "eslint": "^9.6.0",
90
+ "eslint": "^9.7.0",
91
91
  "eslint-typegen": "^0.2.4",
92
92
  "husky": "^9.0.11",
93
93
  "nano-staged": "^0.8.0",