@ntnyq/eslint-config 3.0.0-beta.12 → 3.0.0-beta.13

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/README.md CHANGED
@@ -6,6 +6,10 @@
6
6
  [![NPM DOWNLOADS](https://img.shields.io/npm/dy/@ntnyq/eslint-config)](https://www.npmjs.com/package/@ntnyq/eslint-config)
7
7
  [![NPM VERSION](https://img.shields.io/npm/v/@ntnyq/eslint-config/latest.svg)](https://www.npmjs.com/package/@ntnyq/eslint-config/v/latest)
8
8
 
9
+ ## Features
10
+
11
+ - 🚦 Designed to work alongside with Prettier
12
+
9
13
  ## Install
10
14
 
11
15
  ```bash
@@ -14,7 +18,7 @@ pnpm add eslint prettier typescript @ntnyq/eslint-config @ntnyq/prettier-config
14
18
 
15
19
  ## Usage
16
20
 
17
- Highly recommended for using `eslint.config.mjs` as the config file :
21
+ Highly recommended using **`eslint.config.mjs`** as the config file :
18
22
 
19
23
  ```js
20
24
  import { ntnyq } from '@ntnyq/eslint-config'
package/dist/index.cjs CHANGED
@@ -60,6 +60,7 @@ __export(src_exports, {
60
60
  antfu: () => antfu,
61
61
  command: () => command,
62
62
  comments: () => comments,
63
+ disables: () => disables,
63
64
  getOverrides: () => getOverrides,
64
65
  gitignore: () => gitignore,
65
66
  hasTypeScript: () => hasTypeScript,
@@ -268,7 +269,20 @@ var typescriptCore = (options = {}) => {
268
269
  ignoreRestSiblings: true
269
270
  }
270
271
  ],
271
- "@typescript-eslint/no-redeclare": "error",
272
+ "@typescript-eslint/no-redeclare": [
273
+ "error",
274
+ {
275
+ builtinGlobals: false
276
+ }
277
+ ],
278
+ "@typescript-eslint/no-unused-expressions": [
279
+ "error",
280
+ {
281
+ allowShortCircuit: true,
282
+ allowTernary: true,
283
+ allowTaggedTemplates: true
284
+ }
285
+ ],
272
286
  "@typescript-eslint/consistent-type-imports": [
273
287
  "error",
274
288
  {
@@ -332,11 +346,6 @@ var typescript = (options = {}) => [
332
346
  "no-unused-expressions": "off",
333
347
  "max-lines-per-function": "off"
334
348
  }
335
- },
336
- {
337
- name: "ntnyq/ts/cjs",
338
- files: [GLOB_JS],
339
- rules: {}
340
349
  }
341
350
  ];
342
351
 
@@ -1198,6 +1207,26 @@ var unicorn = (options = {}) => [
1198
1207
  }
1199
1208
  ];
1200
1209
 
1210
+ // src/configs/disables.ts
1211
+ var disables = () => [
1212
+ {
1213
+ name: "ntnyq/disables/scripts",
1214
+ files: [`**/scripts/${GLOB_SRC}`],
1215
+ rules: {
1216
+ "no-console": "off",
1217
+ "@typescript-eslint/explicit-function-return-type": "off"
1218
+ }
1219
+ },
1220
+ {
1221
+ name: "ntnyq/disables/cli",
1222
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1223
+ rules: {
1224
+ "no-console": "off",
1225
+ "@typescript-eslint/explicit-function-return-type": "off"
1226
+ }
1227
+ }
1228
+ ];
1229
+
1201
1230
  // src/configs/comments.ts
1202
1231
  var comments = (options = {}) => [
1203
1232
  {
@@ -1544,13 +1573,6 @@ var javascript = (options = {}) => {
1544
1573
  ...options.overrides
1545
1574
  }
1546
1575
  },
1547
- {
1548
- name: "ntnyq/js/scripts",
1549
- files: ["**/scripts/*", "**/cli.*"],
1550
- rules: {
1551
- "no-console": "off"
1552
- }
1553
- },
1554
1576
  {
1555
1577
  name: "ntnyq/js/test",
1556
1578
  files: ["**/*.{test,spec}.js?(x)"],
@@ -1867,6 +1889,7 @@ function ntnyq(options = {}, userConfigs = []) {
1867
1889
  })
1868
1890
  );
1869
1891
  }
1892
+ const configDisables = disables();
1870
1893
  const configPrettier = options.prettier ?? true ? prettier({
1871
1894
  ...resolveSubOptions(options, "prettier"),
1872
1895
  overrides: getOverrides(options, "prettier")
@@ -1875,6 +1898,7 @@ function ntnyq(options = {}, userConfigs = []) {
1875
1898
  composer.append(
1876
1899
  ...configs,
1877
1900
  ...toArray(userConfigs),
1901
+ ...configDisables,
1878
1902
  ...configPrettier
1879
1903
  );
1880
1904
  return composer;
@@ -1911,6 +1935,7 @@ function ntnyq(options = {}, userConfigs = []) {
1911
1935
  antfu,
1912
1936
  command,
1913
1937
  comments,
1938
+ disables,
1914
1939
  getOverrides,
1915
1940
  gitignore,
1916
1941
  hasTypeScript,
package/dist/index.d.cts CHANGED
@@ -6899,6 +6899,18 @@ type TypescriptEslintRestrictTemplateExpressions = [] | [
6899
6899
  allowNumber?: boolean;
6900
6900
  allowRegExp?: boolean;
6901
6901
  allowNever?: boolean;
6902
+ allow?: (string | {
6903
+ from: "file";
6904
+ name: (string | [string, ...(string)[]]);
6905
+ path?: string;
6906
+ } | {
6907
+ from: "lib";
6908
+ name: (string | [string, ...(string)[]]);
6909
+ } | {
6910
+ from: "package";
6911
+ name: (string | [string, ...(string)[]]);
6912
+ package: string;
6913
+ })[];
6902
6914
  }
6903
6915
  ];
6904
6916
  type TypescriptEslintReturnAwait = [] | [(("always" | "error-handling-correctness-only" | "in-try-catch" | "never") & string)];
@@ -12194,7 +12206,7 @@ type Yoda = [] | [("always" | "never")] | [
12194
12206
  onlyEquality?: boolean;
12195
12207
  }
12196
12208
  ];
12197
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/scripts' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12209
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12198
12210
 
12199
12211
  /**
12200
12212
  * Typed flat config item
@@ -12448,6 +12460,8 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
12448
12460
 
12449
12461
  declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
12450
12462
 
12463
+ declare const disables: () => TypedConfigItem[];
12464
+
12451
12465
  declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
12452
12466
 
12453
12467
  declare const markdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
@@ -12466,4 +12480,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12466
12480
 
12467
12481
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12468
12482
 
12469
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, 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_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
12483
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, 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_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, disables, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.d.ts CHANGED
@@ -6899,6 +6899,18 @@ type TypescriptEslintRestrictTemplateExpressions = [] | [
6899
6899
  allowNumber?: boolean;
6900
6900
  allowRegExp?: boolean;
6901
6901
  allowNever?: boolean;
6902
+ allow?: (string | {
6903
+ from: "file";
6904
+ name: (string | [string, ...(string)[]]);
6905
+ path?: string;
6906
+ } | {
6907
+ from: "lib";
6908
+ name: (string | [string, ...(string)[]]);
6909
+ } | {
6910
+ from: "package";
6911
+ name: (string | [string, ...(string)[]]);
6912
+ package: string;
6913
+ })[];
6902
6914
  }
6903
6915
  ];
6904
6916
  type TypescriptEslintReturnAwait = [] | [(("always" | "error-handling-correctness-only" | "in-try-catch" | "never") & string)];
@@ -12194,7 +12206,7 @@ type Yoda = [] | [("always" | "never")] | [
12194
12206
  onlyEquality?: boolean;
12195
12207
  }
12196
12208
  ];
12197
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/scripts' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/ts/cjs' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12209
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/ignores' | 'ntnyq/imports' | 'ntnyq/gitignore' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/js/test' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/disabled/code-blocks' | 'ntnyq/node' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/regexp' | 'ntnyq/perfectionist' | 'ntnyq/sort/package-json' | 'ntnyq/sort/tsconfig' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/ts/dts' | 'ntnyq/ts/test' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'typescript-eslint/base' | 'typescript-eslint/eslint-recommended' | 'typescript-eslint/recommended' | 'ntnyq/ts/core' | 'ntnyq/vue/ts' | 'ntnyq/vue/core' | 'ntnyq/yaml' | 'ntnyq/toml';
12198
12210
 
12199
12211
  /**
12200
12212
  * Typed flat config item
@@ -12448,6 +12460,8 @@ declare const imports: (options?: ConfigImportsOptions) => TypedConfigItem[];
12448
12460
 
12449
12461
  declare const unicorn: (options?: ConfigUnicornOptions) => TypedConfigItem[];
12450
12462
 
12463
+ declare const disables: () => TypedConfigItem[];
12464
+
12451
12465
  declare const comments: (options?: ConfigCommentsOptions) => TypedConfigItem[];
12452
12466
 
12453
12467
  declare const markdown: (options?: ConfigMarkdownOptions) => TypedConfigItem[];
@@ -12466,4 +12480,4 @@ declare const perfectionist: (options?: ConfigPerfectionistOptions) => TypedConf
12466
12480
 
12467
12481
  declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConfigItem[];
12468
12482
 
12469
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, 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_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
12483
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportsOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigOptions, type ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVitestOptions, type ConfigVueOptions, type ConfigYmlOptions, 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_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type LiteralUnion, type OptionsFiles, type OptionsOverrides, type ParserOptions, type PerfectionistSortOrder, type PerfectionistSortType, type ResolvedOptions, type RuleOptions, type TypedConfigItem, antfu, command, comments, disables, getOverrides, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, imports, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, node, ntnyq, perfectionist, prettier, regexp, resolveSubOptions, sortI18nLocale, sortPackageJson, sortTsConfig, toArray, toml, typescript, typescriptCore, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.js CHANGED
@@ -147,7 +147,20 @@ var typescriptCore = (options = {}) => {
147
147
  ignoreRestSiblings: true
148
148
  }
149
149
  ],
150
- "@typescript-eslint/no-redeclare": "error",
150
+ "@typescript-eslint/no-redeclare": [
151
+ "error",
152
+ {
153
+ builtinGlobals: false
154
+ }
155
+ ],
156
+ "@typescript-eslint/no-unused-expressions": [
157
+ "error",
158
+ {
159
+ allowShortCircuit: true,
160
+ allowTernary: true,
161
+ allowTaggedTemplates: true
162
+ }
163
+ ],
151
164
  "@typescript-eslint/consistent-type-imports": [
152
165
  "error",
153
166
  {
@@ -211,11 +224,6 @@ var typescript = (options = {}) => [
211
224
  "no-unused-expressions": "off",
212
225
  "max-lines-per-function": "off"
213
226
  }
214
- },
215
- {
216
- name: "ntnyq/ts/cjs",
217
- files: [GLOB_JS],
218
- rules: {}
219
227
  }
220
228
  ];
221
229
 
@@ -1077,6 +1085,26 @@ var unicorn = (options = {}) => [
1077
1085
  }
1078
1086
  ];
1079
1087
 
1088
+ // src/configs/disables.ts
1089
+ var disables = () => [
1090
+ {
1091
+ name: "ntnyq/disables/scripts",
1092
+ files: [`**/scripts/${GLOB_SRC}`],
1093
+ rules: {
1094
+ "no-console": "off",
1095
+ "@typescript-eslint/explicit-function-return-type": "off"
1096
+ }
1097
+ },
1098
+ {
1099
+ name: "ntnyq/disables/cli",
1100
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1101
+ rules: {
1102
+ "no-console": "off",
1103
+ "@typescript-eslint/explicit-function-return-type": "off"
1104
+ }
1105
+ }
1106
+ ];
1107
+
1080
1108
  // src/configs/comments.ts
1081
1109
  var comments = (options = {}) => [
1082
1110
  {
@@ -1423,13 +1451,6 @@ var javascript = (options = {}) => {
1423
1451
  ...options.overrides
1424
1452
  }
1425
1453
  },
1426
- {
1427
- name: "ntnyq/js/scripts",
1428
- files: ["**/scripts/*", "**/cli.*"],
1429
- rules: {
1430
- "no-console": "off"
1431
- }
1432
- },
1433
1454
  {
1434
1455
  name: "ntnyq/js/test",
1435
1456
  files: ["**/*.{test,spec}.js?(x)"],
@@ -1746,6 +1767,7 @@ function ntnyq(options = {}, userConfigs = []) {
1746
1767
  })
1747
1768
  );
1748
1769
  }
1770
+ const configDisables = disables();
1749
1771
  const configPrettier = options.prettier ?? true ? prettier({
1750
1772
  ...resolveSubOptions(options, "prettier"),
1751
1773
  overrides: getOverrides(options, "prettier")
@@ -1754,6 +1776,7 @@ function ntnyq(options = {}, userConfigs = []) {
1754
1776
  composer.append(
1755
1777
  ...configs,
1756
1778
  ...toArray(userConfigs),
1779
+ ...configDisables,
1757
1780
  ...configPrettier
1758
1781
  );
1759
1782
  return composer;
@@ -1789,6 +1812,7 @@ export {
1789
1812
  antfu,
1790
1813
  command,
1791
1814
  comments,
1815
+ disables,
1792
1816
  getOverrides,
1793
1817
  gitignore,
1794
1818
  hasTypeScript,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.0-beta.12",
4
+ "version": "3.0.0-beta.13",
5
5
  "packageManager": "pnpm@9.10.0",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
@@ -59,23 +59,23 @@
59
59
  "@eslint/js": "^9.10.0",
60
60
  "@eslint/markdown": "^6.1.0",
61
61
  "@types/eslint__js": "^8.42.3",
62
- "@unocss/eslint-plugin": "^0.62.3",
63
- "@vitest/eslint-plugin": "^1.1.0",
62
+ "@unocss/eslint-plugin": "^0.62.4",
63
+ "@vitest/eslint-plugin": "^1.1.4",
64
64
  "eslint-config-flat-gitignore": "^0.3.0",
65
65
  "eslint-flat-config-utils": "^0.4.0",
66
66
  "eslint-merge-processors": "^0.1.0",
67
67
  "eslint-plugin-antfu": "^2.6.0",
68
- "eslint-plugin-command": "^0.2.4",
68
+ "eslint-plugin-command": "^0.2.5",
69
69
  "eslint-plugin-import-x": "^4.2.1",
70
- "eslint-plugin-jsdoc": "^50.2.2",
70
+ "eslint-plugin-jsdoc": "^50.2.3",
71
71
  "eslint-plugin-jsonc": "^2.16.0",
72
72
  "eslint-plugin-n": "^17.10.2",
73
- "eslint-plugin-perfectionist": "^3.5.0",
73
+ "eslint-plugin-perfectionist": "^3.6.0",
74
74
  "eslint-plugin-prettier": "^5.2.1",
75
75
  "eslint-plugin-regexp": "^2.6.0",
76
76
  "eslint-plugin-toml": "^0.11.1",
77
77
  "eslint-plugin-unicorn": "^55.0.0",
78
- "eslint-plugin-unused-imports": "^4.1.3",
78
+ "eslint-plugin-unused-imports": "^4.1.4",
79
79
  "eslint-plugin-vue": "^9.28.0",
80
80
  "eslint-plugin-yml": "^1.14.0",
81
81
  "globals": "^15.9.0",
@@ -83,25 +83,25 @@
83
83
  "local-pkg": "^0.5.0",
84
84
  "prettier": "^3.3.3",
85
85
  "toml-eslint-parser": "^0.10.0",
86
- "typescript-eslint": "^8.5.0",
86
+ "typescript-eslint": "^8.6.0",
87
87
  "vue-eslint-parser": "^9.4.3",
88
88
  "yaml-eslint-parser": "^1.2.3"
89
89
  },
90
90
  "devDependencies": {
91
- "@ntnyq/prettier-config": "^1.21.2",
92
- "@types/node": "^22.5.4",
91
+ "@ntnyq/prettier-config": "^1.21.3",
92
+ "@types/node": "^22.5.5",
93
93
  "bumpp": "^9.5.2",
94
94
  "eslint": "^9.10.0",
95
95
  "eslint-typegen": "^0.3.2",
96
- "husky": "^9.1.5",
96
+ "husky": "^9.1.6",
97
97
  "jiti": "^1.21.6",
98
98
  "nano-staged": "^0.8.0",
99
- "npm-run-all2": "^6.2.2",
99
+ "npm-run-all2": "^6.2.3",
100
100
  "rimraf": "^6.0.1",
101
- "tsup": "^8.2.4",
102
- "tsx": "^4.19.0",
101
+ "tsup": "^8.3.0",
102
+ "tsx": "^4.19.1",
103
103
  "typescript": "^5.6.2",
104
- "zx": "^8.1.5"
104
+ "zx": "^8.1.6"
105
105
  },
106
106
  "engines": {
107
107
  "node": ">=18.18.0"