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

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,
@@ -255,6 +256,15 @@ var typescriptCore = (options = {}) => {
255
256
  }
256
257
  },
257
258
  rules: {
259
+ // Disabled in favor of ts rules
260
+ "no-redeclare": "off",
261
+ "@typescript-eslint/no-redeclare": [
262
+ "error",
263
+ {
264
+ builtinGlobals: false,
265
+ ignoreDeclarationMerge: true
266
+ }
267
+ ],
258
268
  "@typescript-eslint/no-unused-vars": [
259
269
  "error",
260
270
  {
@@ -268,7 +278,14 @@ var typescriptCore = (options = {}) => {
268
278
  ignoreRestSiblings: true
269
279
  }
270
280
  ],
271
- "@typescript-eslint/no-redeclare": "error",
281
+ "@typescript-eslint/no-unused-expressions": [
282
+ "error",
283
+ {
284
+ allowShortCircuit: true,
285
+ allowTernary: true,
286
+ allowTaggedTemplates: true
287
+ }
288
+ ],
272
289
  "@typescript-eslint/consistent-type-imports": [
273
290
  "error",
274
291
  {
@@ -306,10 +323,10 @@ var typescriptCore = (options = {}) => {
306
323
  "@typescript-eslint/explicit-member-accessibility": "off",
307
324
  "@typescript-eslint/explicit-function-return-type": "off",
308
325
  "@typescript-eslint/explicit-module-boundary-types": "off",
309
- "@typescript-eslint/consistent-indexed-object-style": "off"
310
- },
311
- // Overrides built-in rules
312
- ...options.overrides
326
+ "@typescript-eslint/consistent-indexed-object-style": "off",
327
+ // Overrides built-in rules
328
+ ...options.overrides
329
+ }
313
330
  });
314
331
  return configs;
315
332
  };
@@ -332,11 +349,6 @@ var typescript = (options = {}) => [
332
349
  "no-unused-expressions": "off",
333
350
  "max-lines-per-function": "off"
334
351
  }
335
- },
336
- {
337
- name: "ntnyq/ts/cjs",
338
- files: [GLOB_JS],
339
- rules: {}
340
352
  }
341
353
  ];
342
354
 
@@ -1198,6 +1210,26 @@ var unicorn = (options = {}) => [
1198
1210
  }
1199
1211
  ];
1200
1212
 
1213
+ // src/configs/disables.ts
1214
+ var disables = () => [
1215
+ {
1216
+ name: "ntnyq/disables/scripts",
1217
+ files: [`**/scripts/${GLOB_SRC}`],
1218
+ rules: {
1219
+ "no-console": "off",
1220
+ "@typescript-eslint/explicit-function-return-type": "off"
1221
+ }
1222
+ },
1223
+ {
1224
+ name: "ntnyq/disables/cli",
1225
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1226
+ rules: {
1227
+ "no-console": "off",
1228
+ "@typescript-eslint/explicit-function-return-type": "off"
1229
+ }
1230
+ }
1231
+ ];
1232
+
1201
1233
  // src/configs/comments.ts
1202
1234
  var comments = (options = {}) => [
1203
1235
  {
@@ -1544,13 +1576,6 @@ var javascript = (options = {}) => {
1544
1576
  ...options.overrides
1545
1577
  }
1546
1578
  },
1547
- {
1548
- name: "ntnyq/js/scripts",
1549
- files: ["**/scripts/*", "**/cli.*"],
1550
- rules: {
1551
- "no-console": "off"
1552
- }
1553
- },
1554
1579
  {
1555
1580
  name: "ntnyq/js/test",
1556
1581
  files: ["**/*.{test,spec}.js?(x)"],
@@ -1867,6 +1892,7 @@ function ntnyq(options = {}, userConfigs = []) {
1867
1892
  })
1868
1893
  );
1869
1894
  }
1895
+ const configDisables = disables();
1870
1896
  const configPrettier = options.prettier ?? true ? prettier({
1871
1897
  ...resolveSubOptions(options, "prettier"),
1872
1898
  overrides: getOverrides(options, "prettier")
@@ -1875,6 +1901,7 @@ function ntnyq(options = {}, userConfigs = []) {
1875
1901
  composer.append(
1876
1902
  ...configs,
1877
1903
  ...toArray(userConfigs),
1904
+ ...configDisables,
1878
1905
  ...configPrettier
1879
1906
  );
1880
1907
  return composer;
@@ -1911,6 +1938,7 @@ function ntnyq(options = {}, userConfigs = []) {
1911
1938
  antfu,
1912
1939
  command,
1913
1940
  comments,
1941
+ disables,
1914
1942
  getOverrides,
1915
1943
  gitignore,
1916
1944
  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
@@ -134,6 +134,15 @@ var typescriptCore = (options = {}) => {
134
134
  }
135
135
  },
136
136
  rules: {
137
+ // Disabled in favor of ts rules
138
+ "no-redeclare": "off",
139
+ "@typescript-eslint/no-redeclare": [
140
+ "error",
141
+ {
142
+ builtinGlobals: false,
143
+ ignoreDeclarationMerge: true
144
+ }
145
+ ],
137
146
  "@typescript-eslint/no-unused-vars": [
138
147
  "error",
139
148
  {
@@ -147,7 +156,14 @@ var typescriptCore = (options = {}) => {
147
156
  ignoreRestSiblings: true
148
157
  }
149
158
  ],
150
- "@typescript-eslint/no-redeclare": "error",
159
+ "@typescript-eslint/no-unused-expressions": [
160
+ "error",
161
+ {
162
+ allowShortCircuit: true,
163
+ allowTernary: true,
164
+ allowTaggedTemplates: true
165
+ }
166
+ ],
151
167
  "@typescript-eslint/consistent-type-imports": [
152
168
  "error",
153
169
  {
@@ -185,10 +201,10 @@ var typescriptCore = (options = {}) => {
185
201
  "@typescript-eslint/explicit-member-accessibility": "off",
186
202
  "@typescript-eslint/explicit-function-return-type": "off",
187
203
  "@typescript-eslint/explicit-module-boundary-types": "off",
188
- "@typescript-eslint/consistent-indexed-object-style": "off"
189
- },
190
- // Overrides built-in rules
191
- ...options.overrides
204
+ "@typescript-eslint/consistent-indexed-object-style": "off",
205
+ // Overrides built-in rules
206
+ ...options.overrides
207
+ }
192
208
  });
193
209
  return configs;
194
210
  };
@@ -211,11 +227,6 @@ var typescript = (options = {}) => [
211
227
  "no-unused-expressions": "off",
212
228
  "max-lines-per-function": "off"
213
229
  }
214
- },
215
- {
216
- name: "ntnyq/ts/cjs",
217
- files: [GLOB_JS],
218
- rules: {}
219
230
  }
220
231
  ];
221
232
 
@@ -1077,6 +1088,26 @@ var unicorn = (options = {}) => [
1077
1088
  }
1078
1089
  ];
1079
1090
 
1091
+ // src/configs/disables.ts
1092
+ var disables = () => [
1093
+ {
1094
+ name: "ntnyq/disables/scripts",
1095
+ files: [`**/scripts/${GLOB_SRC}`],
1096
+ rules: {
1097
+ "no-console": "off",
1098
+ "@typescript-eslint/explicit-function-return-type": "off"
1099
+ }
1100
+ },
1101
+ {
1102
+ name: "ntnyq/disables/cli",
1103
+ files: [`**/cli/${GLOB_SRC}`, `**/cli.${GLOB_SRC_EXT}`],
1104
+ rules: {
1105
+ "no-console": "off",
1106
+ "@typescript-eslint/explicit-function-return-type": "off"
1107
+ }
1108
+ }
1109
+ ];
1110
+
1080
1111
  // src/configs/comments.ts
1081
1112
  var comments = (options = {}) => [
1082
1113
  {
@@ -1423,13 +1454,6 @@ var javascript = (options = {}) => {
1423
1454
  ...options.overrides
1424
1455
  }
1425
1456
  },
1426
- {
1427
- name: "ntnyq/js/scripts",
1428
- files: ["**/scripts/*", "**/cli.*"],
1429
- rules: {
1430
- "no-console": "off"
1431
- }
1432
- },
1433
1457
  {
1434
1458
  name: "ntnyq/js/test",
1435
1459
  files: ["**/*.{test,spec}.js?(x)"],
@@ -1746,6 +1770,7 @@ function ntnyq(options = {}, userConfigs = []) {
1746
1770
  })
1747
1771
  );
1748
1772
  }
1773
+ const configDisables = disables();
1749
1774
  const configPrettier = options.prettier ?? true ? prettier({
1750
1775
  ...resolveSubOptions(options, "prettier"),
1751
1776
  overrides: getOverrides(options, "prettier")
@@ -1754,6 +1779,7 @@ function ntnyq(options = {}, userConfigs = []) {
1754
1779
  composer.append(
1755
1780
  ...configs,
1756
1781
  ...toArray(userConfigs),
1782
+ ...configDisables,
1757
1783
  ...configPrettier
1758
1784
  );
1759
1785
  return composer;
@@ -1789,6 +1815,7 @@ export {
1789
1815
  antfu,
1790
1816
  command,
1791
1817
  comments,
1818
+ disables,
1792
1819
  getOverrides,
1793
1820
  gitignore,
1794
1821
  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.14",
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.4",
71
71
  "eslint-plugin-jsonc": "^2.16.0",
72
- "eslint-plugin-n": "^17.10.2",
73
- "eslint-plugin-perfectionist": "^3.5.0",
72
+ "eslint-plugin-n": "^17.10.3",
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.7"
105
105
  },
106
106
  "engines": {
107
107
  "node": ">=18.18.0"