eslint-config-un 0.0.6 → 0.0.7

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
@@ -40,9 +40,9 @@ var init_cjs_shims = __esm({
40
40
  }
41
41
  });
42
42
 
43
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js
43
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js
44
44
  var require_eslint_all = __commonJS({
45
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports2, module2) {
45
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports2, module2) {
46
46
  "use strict";
47
47
  init_cjs_shims();
48
48
  module2.exports = Object.freeze({
@@ -249,9 +249,9 @@ var require_eslint_all = __commonJS({
249
249
  }
250
250
  });
251
251
 
252
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
252
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
253
253
  var require_eslint_recommended = __commonJS({
254
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports2, module2) {
254
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports2, module2) {
255
255
  "use strict";
256
256
  init_cjs_shims();
257
257
  module2.exports = Object.freeze({
@@ -322,9 +322,9 @@ var require_eslint_recommended = __commonJS({
322
322
  }
323
323
  });
324
324
 
325
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js
325
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js
326
326
  var require_src = __commonJS({
327
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
327
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js"(exports2, module2) {
328
328
  "use strict";
329
329
  init_cjs_shims();
330
330
  module2.exports = {
@@ -896,6 +896,7 @@ var promiseEslintConfig = (options = {}, internalOptions = {}) => {
896
896
  // 'promise/param-names': ERROR,
897
897
  // 'promise/prefer-await-to-callbacks': OFF,
898
898
  // 'promise/prefer-await-to-then': OFF,
899
+ "promise/spec-only": ERROR,
899
900
  "promise/valid-params": ERROR
900
901
  // Default: warn
901
902
  };
@@ -1474,13 +1475,14 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1474
1475
  files: ["**/*.d.?([cm])ts"],
1475
1476
  rules: {
1476
1477
  "@typescript-eslint/consistent-indexed-object-style": OFF,
1478
+ "@typescript-eslint/method-signature-style": OFF,
1479
+ "@typescript-eslint/no-empty-object-type": OFF,
1477
1480
  "@typescript-eslint/no-explicit-any": OFF,
1478
- "@typescript-eslint/no-use-before-define": OFF,
1479
- "@typescript-eslint/no-unused-vars": OFF,
1480
1481
  "@typescript-eslint/no-shadow": OFF,
1481
- "@typescript-eslint/method-signature-style": OFF,
1482
- "import/no-default-export": OFF,
1483
- "import/newline-after-import": OFF
1482
+ "@typescript-eslint/no-unused-vars": OFF,
1483
+ "@typescript-eslint/no-use-before-define": OFF,
1484
+ "import/newline-after-import": OFF,
1485
+ "import/no-default-export": OFF
1484
1486
  },
1485
1487
  name: genFlatConfigEntryName("ts/dts")
1486
1488
  },
@@ -2144,6 +2146,7 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2144
2146
  name: genFlatConfigEntryName("vue/allow-default-export")
2145
2147
  },
2146
2148
  a11y && [
2149
+ // TODO don't have our name
2147
2150
  ...import_eslint_plugin_vuejs_accessibility.default.configs["flat/recommended"],
2148
2151
  {
2149
2152
  files,
@@ -2158,7 +2161,10 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2158
2161
  // 'vuejs-accessibility/heading-has-content': ERROR,
2159
2162
  // 'vuejs-accessibility/iframe-has-title': ERROR,
2160
2163
  // 'vuejs-accessibility/interactive-supports-focus': ERROR,
2161
- // 'vuejs-accessibility/label-has-for': ERROR,
2164
+ "vuejs-accessibility/label-has-for": [
2165
+ ERROR,
2166
+ { allowChildren: true }
2167
+ ],
2162
2168
  // 'vuejs-accessibility/media-has-caption': ERROR,
2163
2169
  // 'vuejs-accessibility/mouse-events-have-key-events': ERROR,
2164
2170
  // 'vuejs-accessibility/no-access-key': ERROR,
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
3
3
  import { ParserOptions } from '@typescript-eslint/parser';
4
4
  import { ESLintRules } from 'eslint/rules';
5
5
 
6
- interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/${string}`> {
6
+ interface TsEslintConfigOptions extends ConfigSharedOptions<'@typescript-eslint'> {
7
7
  /**
8
8
  * @deprecated Only needed for `eslint-plugin-import` now
9
9
  */
@@ -21,7 +21,7 @@ interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/
21
21
  * Pass `true` to ignore the same files as in `ignores`
22
22
  */
23
23
  ignoresTypeAware?: FlatConfigEntry['ignores'] | boolean;
24
- overridesTypeAware?: RuleOverrides<`@typescript-eslint/${string}`>;
24
+ overridesTypeAware?: RuleOverrides<'@typescript-eslint'>;
25
25
  /**
26
26
  * Do not put `.` (dot) before an extension
27
27
  * @example ['vue']
@@ -40,7 +40,7 @@ interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/
40
40
  disableNoUnsafeRules?: boolean;
41
41
  }
42
42
 
43
- interface ImportEslintConfigOptions extends ConfigSharedOptions<`import/${string}`>, Pick<TsEslintConfigOptions, 'tsconfigPath'> {
43
+ interface ImportEslintConfigOptions extends ConfigSharedOptions<'import'>, Pick<TsEslintConfigOptions, 'tsconfigPath'> {
44
44
  /**
45
45
  * @see https://github.com/import-js/eslint-plugin-import/blob/fc361a9998b14b9528d841d8349078a5af2da436/docs/rules/no-unresolved.md#ignore
46
46
  */
@@ -58,26 +58,26 @@ type BuiltinEslintRulesFixed = Pick<RulesRecord, keyof ESLintRules>;
58
58
  interface JsEslintConfigOptions extends ConfigSharedOptions<BuiltinEslintRulesFixed> {
59
59
  }
60
60
 
61
- interface NodeEslintConfigOptions extends ConfigSharedOptions<`node/${string}`> {
61
+ interface NodeEslintConfigOptions extends ConfigSharedOptions<'node'> {
62
62
  }
63
63
 
64
- interface PromiseEslintConfigOptions extends ConfigSharedOptions<`promise/${string}`> {
64
+ interface PromiseEslintConfigOptions extends ConfigSharedOptions<'promise'> {
65
65
  }
66
66
 
67
- interface RegexpEslintConfigOptions extends ConfigSharedOptions<`regexp/${string}`> {
67
+ interface RegexpEslintConfigOptions extends ConfigSharedOptions<'regexp'> {
68
68
  }
69
69
 
70
- interface SecurityEslintConfigOptions extends ConfigSharedOptions<`security/${string}`> {
70
+ interface SecurityEslintConfigOptions extends ConfigSharedOptions<'security'> {
71
71
  }
72
72
 
73
- interface TailwindEslintConfigOptions extends ConfigSharedOptions<`tailwindcss/${string}`> {
73
+ interface TailwindEslintConfigOptions extends ConfigSharedOptions<'tailwindcss'> {
74
74
  }
75
75
 
76
- interface UnicornEslintConfigOptions extends ConfigSharedOptions<`unicorn/${string}`> {
76
+ interface UnicornEslintConfigOptions extends ConfigSharedOptions<'unicorn'> {
77
77
  }
78
78
 
79
79
  type WellKnownSfcBlocks = 'template' | 'script' | 'script:not([setup])' | 'script[setup]' | 'style' | 'style:not([scoped])' | 'style[scoped]';
80
- interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
80
+ interface VueEslintConfigOptions extends ConfigSharedOptions<'vue'> {
81
81
  /**
82
82
  * @default auto-detected
83
83
  */
@@ -110,7 +110,7 @@ interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
110
110
  * @default true
111
111
  */
112
112
  a11y?: boolean;
113
- overridesA11y?: RuleOverrides<`vuejs-accessibility/${string}`>;
113
+ overridesA11y?: RuleOverrides<'vuejs-accessibility'>;
114
114
  /**
115
115
  * Enabled automatically by checking if `nuxt` package is installed (at any level). Pass a false value or a Nuxt version to explicitly disable or enable Nuxt-specific rules or tweaks.
116
116
  */
@@ -130,7 +130,7 @@ interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
130
130
  */
131
131
  storesNameSuffix?: string;
132
132
  };
133
- overridesPinia?: RuleOverrides<`pinia/${string}`>;
133
+ overridesPinia?: RuleOverrides<'pinia'>;
134
134
  }
135
135
 
136
136
  /* eslint-disable */
@@ -983,7 +983,7 @@ interface RuleOptions {
983
983
  */
984
984
  '@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
985
985
  /**
986
- * Disallow type parameters that only appear once
986
+ * Disallow type parameters that aren't used multiple times
987
987
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
988
988
  */
989
989
  '@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]>
@@ -2833,7 +2833,7 @@ interface RuleOptions {
2833
2833
  */
2834
2834
  'disable-autofix/@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
2835
2835
  /**
2836
- * Disallow type parameters that only appear once
2836
+ * Disallow type parameters that aren't used multiple times
2837
2837
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
2838
2838
  */
2839
2839
  'disable-autofix/@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]>
@@ -4897,6 +4897,11 @@ interface RuleOptions {
4897
4897
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
4898
4898
  */
4899
4899
  'disable-autofix/promise/prefer-await-to-then'?: Linter.RuleEntry<DisableAutofixPromisePreferAwaitToThen>
4900
+ /**
4901
+ * Disallow use of non-standard Promise static methods.
4902
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md
4903
+ */
4904
+ 'disable-autofix/promise/spec-only'?: Linter.RuleEntry<DisableAutofixPromiseSpecOnly>
4900
4905
  /**
4901
4906
  * Enforces the proper number of arguments are passed to Promise functions.
4902
4907
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
@@ -9316,6 +9321,11 @@ interface RuleOptions {
9316
9321
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
9317
9322
  */
9318
9323
  'promise/prefer-await-to-then'?: Linter.RuleEntry<PromisePreferAwaitToThen>
9324
+ /**
9325
+ * Disallow use of non-standard Promise static methods.
9326
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md
9327
+ */
9328
+ 'promise/spec-only'?: Linter.RuleEntry<PromiseSpecOnly>
9319
9329
  /**
9320
9330
  * Enforces the proper number of arguments are passed to Promise functions.
9321
9331
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
@@ -13066,7 +13076,7 @@ type StylisticPaddedBlocks = []|[(("always" | "never") | {
13066
13076
  }]
13067
13077
  // ----- @stylistic/padding-line-between-statements -----
13068
13078
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
13069
- type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
13079
+ type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
13070
13080
  type StylisticPaddingLineBetweenStatements = {
13071
13081
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType
13072
13082
  prev: _StylisticPaddingLineBetweenStatementsStatementType
@@ -13767,6 +13777,7 @@ type TypescriptEslintNoMisusedPromises = []|[{
13767
13777
  checksVoidReturn?: (boolean | {
13768
13778
  arguments?: boolean
13769
13779
  attributes?: boolean
13780
+ inheritedMethods?: boolean
13770
13781
  properties?: boolean
13771
13782
  returns?: boolean
13772
13783
  variables?: boolean
@@ -16098,7 +16109,7 @@ type DisableAutofixStylisticPaddedBlocks = []|[(("always" | "never") | {
16098
16109
  }]
16099
16110
  // ----- disable-autofix/@stylistic/padding-line-between-statements -----
16100
16111
  type _DisableAutofixStylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
16101
- type _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16112
+ type _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16102
16113
  type DisableAutofixStylisticPaddingLineBetweenStatements = {
16103
16114
  blankLine: _DisableAutofixStylisticPaddingLineBetweenStatementsPaddingType
16104
16115
  prev: _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType
@@ -16719,7 +16730,7 @@ type DisableAutofixStylisticTsObjectPropertyNewline = []|[{
16719
16730
  }]
16720
16731
  // ----- disable-autofix/@stylistic/ts/padding-line-between-statements -----
16721
16732
  type _DisableAutofixStylisticTsPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
16722
- type _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16733
+ type _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16723
16734
  type DisableAutofixStylisticTsPaddingLineBetweenStatements = {
16724
16735
  blankLine: _DisableAutofixStylisticTsPaddingLineBetweenStatementsPaddingType
16725
16736
  prev: _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType
@@ -17393,6 +17404,7 @@ type DisableAutofixTypescriptEslintNoMisusedPromises = []|[{
17393
17404
  checksVoidReturn?: (boolean | {
17394
17405
  arguments?: boolean
17395
17406
  attributes?: boolean
17407
+ inheritedMethods?: boolean
17396
17408
  properties?: boolean
17397
17409
  returns?: boolean
17398
17410
  variables?: boolean
@@ -18745,6 +18757,10 @@ type DisableAutofixPromisePreferAwaitToThen = []|[{
18745
18757
  strict?: boolean
18746
18758
  [k: string]: unknown | undefined
18747
18759
  }]
18760
+ // ----- disable-autofix/promise/spec-only -----
18761
+ type DisableAutofixPromiseSpecOnly = []|[{
18762
+ allowedMethods?: string[]
18763
+ }]
18748
18764
  // ----- disable-autofix/regexp/hexadecimal-escape -----
18749
18765
  type DisableAutofixRegexpHexadecimalEscape = []|[("always" | "never")]
18750
18766
  // ----- disable-autofix/regexp/letter-case -----
@@ -22114,6 +22130,10 @@ type PromisePreferAwaitToThen = []|[{
22114
22130
  strict?: boolean
22115
22131
  [k: string]: unknown | undefined
22116
22132
  }]
22133
+ // ----- promise/spec-only -----
22134
+ type PromiseSpecOnly = []|[{
22135
+ allowedMethods?: string[]
22136
+ }]
22117
22137
  // ----- quote-props -----
22118
22138
  type QuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
22119
22139
  keywords?: boolean
@@ -23919,11 +23939,14 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
23919
23939
  onlyEquality?: boolean
23920
23940
  }]
23921
23941
 
23942
+ type PickKeysStartingWith<O, T extends string> = {
23943
+ [K in keyof O as K extends `${T}${string}` ? K : never]: O[K];
23944
+ };
23922
23945
  type RulesRecord = Eslint.Linter.RulesRecord & RuleOptions;
23923
23946
  type FlatConfigEntry<T extends RulesRecord = RulesRecord> = Eslint.Linter.FlatConfig & Pick<Eslint.Linter.Config<T>, 'rules'>;
23924
23947
  type RuleOverrides<T extends string | RulesRecord> = FlatConfigEntry<T extends string ? Record<T, Eslint.Linter.RuleEntry> : T>['rules'];
23925
23948
  type ConfigSharedOptions<T extends string | RulesRecord = RulesRecord> = Partial<Pick<FlatConfigEntry, 'files' | 'ignores'> & {
23926
- overrides?: RuleOverrides<T>;
23949
+ overrides?: T extends string ? PickKeysStartingWith<FlatConfigEntry['rules'] & {}, T | `disable-autofix/${T}`> : RuleOverrides<T>;
23927
23950
  }>;
23928
23951
  interface EslintConfigOptions {
23929
23952
  /**
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
3
3
  import { ParserOptions } from '@typescript-eslint/parser';
4
4
  import { ESLintRules } from 'eslint/rules';
5
5
 
6
- interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/${string}`> {
6
+ interface TsEslintConfigOptions extends ConfigSharedOptions<'@typescript-eslint'> {
7
7
  /**
8
8
  * @deprecated Only needed for `eslint-plugin-import` now
9
9
  */
@@ -21,7 +21,7 @@ interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/
21
21
  * Pass `true` to ignore the same files as in `ignores`
22
22
  */
23
23
  ignoresTypeAware?: FlatConfigEntry['ignores'] | boolean;
24
- overridesTypeAware?: RuleOverrides<`@typescript-eslint/${string}`>;
24
+ overridesTypeAware?: RuleOverrides<'@typescript-eslint'>;
25
25
  /**
26
26
  * Do not put `.` (dot) before an extension
27
27
  * @example ['vue']
@@ -40,7 +40,7 @@ interface TsEslintConfigOptions extends ConfigSharedOptions<`@typescript-eslint/
40
40
  disableNoUnsafeRules?: boolean;
41
41
  }
42
42
 
43
- interface ImportEslintConfigOptions extends ConfigSharedOptions<`import/${string}`>, Pick<TsEslintConfigOptions, 'tsconfigPath'> {
43
+ interface ImportEslintConfigOptions extends ConfigSharedOptions<'import'>, Pick<TsEslintConfigOptions, 'tsconfigPath'> {
44
44
  /**
45
45
  * @see https://github.com/import-js/eslint-plugin-import/blob/fc361a9998b14b9528d841d8349078a5af2da436/docs/rules/no-unresolved.md#ignore
46
46
  */
@@ -58,26 +58,26 @@ type BuiltinEslintRulesFixed = Pick<RulesRecord, keyof ESLintRules>;
58
58
  interface JsEslintConfigOptions extends ConfigSharedOptions<BuiltinEslintRulesFixed> {
59
59
  }
60
60
 
61
- interface NodeEslintConfigOptions extends ConfigSharedOptions<`node/${string}`> {
61
+ interface NodeEslintConfigOptions extends ConfigSharedOptions<'node'> {
62
62
  }
63
63
 
64
- interface PromiseEslintConfigOptions extends ConfigSharedOptions<`promise/${string}`> {
64
+ interface PromiseEslintConfigOptions extends ConfigSharedOptions<'promise'> {
65
65
  }
66
66
 
67
- interface RegexpEslintConfigOptions extends ConfigSharedOptions<`regexp/${string}`> {
67
+ interface RegexpEslintConfigOptions extends ConfigSharedOptions<'regexp'> {
68
68
  }
69
69
 
70
- interface SecurityEslintConfigOptions extends ConfigSharedOptions<`security/${string}`> {
70
+ interface SecurityEslintConfigOptions extends ConfigSharedOptions<'security'> {
71
71
  }
72
72
 
73
- interface TailwindEslintConfigOptions extends ConfigSharedOptions<`tailwindcss/${string}`> {
73
+ interface TailwindEslintConfigOptions extends ConfigSharedOptions<'tailwindcss'> {
74
74
  }
75
75
 
76
- interface UnicornEslintConfigOptions extends ConfigSharedOptions<`unicorn/${string}`> {
76
+ interface UnicornEslintConfigOptions extends ConfigSharedOptions<'unicorn'> {
77
77
  }
78
78
 
79
79
  type WellKnownSfcBlocks = 'template' | 'script' | 'script:not([setup])' | 'script[setup]' | 'style' | 'style:not([scoped])' | 'style[scoped]';
80
- interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
80
+ interface VueEslintConfigOptions extends ConfigSharedOptions<'vue'> {
81
81
  /**
82
82
  * @default auto-detected
83
83
  */
@@ -110,7 +110,7 @@ interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
110
110
  * @default true
111
111
  */
112
112
  a11y?: boolean;
113
- overridesA11y?: RuleOverrides<`vuejs-accessibility/${string}`>;
113
+ overridesA11y?: RuleOverrides<'vuejs-accessibility'>;
114
114
  /**
115
115
  * Enabled automatically by checking if `nuxt` package is installed (at any level). Pass a false value or a Nuxt version to explicitly disable or enable Nuxt-specific rules or tweaks.
116
116
  */
@@ -130,7 +130,7 @@ interface VueEslintConfigOptions extends ConfigSharedOptions<`vue/${string}`> {
130
130
  */
131
131
  storesNameSuffix?: string;
132
132
  };
133
- overridesPinia?: RuleOverrides<`pinia/${string}`>;
133
+ overridesPinia?: RuleOverrides<'pinia'>;
134
134
  }
135
135
 
136
136
  /* eslint-disable */
@@ -983,7 +983,7 @@ interface RuleOptions {
983
983
  */
984
984
  '@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
985
985
  /**
986
- * Disallow type parameters that only appear once
986
+ * Disallow type parameters that aren't used multiple times
987
987
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
988
988
  */
989
989
  '@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]>
@@ -2833,7 +2833,7 @@ interface RuleOptions {
2833
2833
  */
2834
2834
  'disable-autofix/@typescript-eslint/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
2835
2835
  /**
2836
- * Disallow type parameters that only appear once
2836
+ * Disallow type parameters that aren't used multiple times
2837
2837
  * @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
2838
2838
  */
2839
2839
  'disable-autofix/@typescript-eslint/no-unnecessary-type-parameters'?: Linter.RuleEntry<[]>
@@ -4897,6 +4897,11 @@ interface RuleOptions {
4897
4897
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
4898
4898
  */
4899
4899
  'disable-autofix/promise/prefer-await-to-then'?: Linter.RuleEntry<DisableAutofixPromisePreferAwaitToThen>
4900
+ /**
4901
+ * Disallow use of non-standard Promise static methods.
4902
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md
4903
+ */
4904
+ 'disable-autofix/promise/spec-only'?: Linter.RuleEntry<DisableAutofixPromiseSpecOnly>
4900
4905
  /**
4901
4906
  * Enforces the proper number of arguments are passed to Promise functions.
4902
4907
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
@@ -9316,6 +9321,11 @@ interface RuleOptions {
9316
9321
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
9317
9322
  */
9318
9323
  'promise/prefer-await-to-then'?: Linter.RuleEntry<PromisePreferAwaitToThen>
9324
+ /**
9325
+ * Disallow use of non-standard Promise static methods.
9326
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/spec-only.md
9327
+ */
9328
+ 'promise/spec-only'?: Linter.RuleEntry<PromiseSpecOnly>
9319
9329
  /**
9320
9330
  * Enforces the proper number of arguments are passed to Promise functions.
9321
9331
  * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
@@ -13066,7 +13076,7 @@ type StylisticPaddedBlocks = []|[(("always" | "never") | {
13066
13076
  }]
13067
13077
  // ----- @stylistic/padding-line-between-statements -----
13068
13078
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
13069
- type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
13079
+ type _StylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
13070
13080
  type StylisticPaddingLineBetweenStatements = {
13071
13081
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType
13072
13082
  prev: _StylisticPaddingLineBetweenStatementsStatementType
@@ -13767,6 +13777,7 @@ type TypescriptEslintNoMisusedPromises = []|[{
13767
13777
  checksVoidReturn?: (boolean | {
13768
13778
  arguments?: boolean
13769
13779
  attributes?: boolean
13780
+ inheritedMethods?: boolean
13770
13781
  properties?: boolean
13771
13782
  returns?: boolean
13772
13783
  variables?: boolean
@@ -16098,7 +16109,7 @@ type DisableAutofixStylisticPaddedBlocks = []|[(("always" | "never") | {
16098
16109
  }]
16099
16110
  // ----- disable-autofix/@stylistic/padding-line-between-statements -----
16100
16111
  type _DisableAutofixStylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
16101
- type _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16112
+ type _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16102
16113
  type DisableAutofixStylisticPaddingLineBetweenStatements = {
16103
16114
  blankLine: _DisableAutofixStylisticPaddingLineBetweenStatementsPaddingType
16104
16115
  prev: _DisableAutofixStylisticPaddingLineBetweenStatementsStatementType
@@ -16719,7 +16730,7 @@ type DisableAutofixStylisticTsObjectPropertyNewline = []|[{
16719
16730
  }]
16720
16731
  // ----- disable-autofix/@stylistic/ts/padding-line-between-statements -----
16721
16732
  type _DisableAutofixStylisticTsPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
16722
- type _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16733
+ type _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
16723
16734
  type DisableAutofixStylisticTsPaddingLineBetweenStatements = {
16724
16735
  blankLine: _DisableAutofixStylisticTsPaddingLineBetweenStatementsPaddingType
16725
16736
  prev: _DisableAutofixStylisticTsPaddingLineBetweenStatementsStatementType
@@ -17393,6 +17404,7 @@ type DisableAutofixTypescriptEslintNoMisusedPromises = []|[{
17393
17404
  checksVoidReturn?: (boolean | {
17394
17405
  arguments?: boolean
17395
17406
  attributes?: boolean
17407
+ inheritedMethods?: boolean
17396
17408
  properties?: boolean
17397
17409
  returns?: boolean
17398
17410
  variables?: boolean
@@ -18745,6 +18757,10 @@ type DisableAutofixPromisePreferAwaitToThen = []|[{
18745
18757
  strict?: boolean
18746
18758
  [k: string]: unknown | undefined
18747
18759
  }]
18760
+ // ----- disable-autofix/promise/spec-only -----
18761
+ type DisableAutofixPromiseSpecOnly = []|[{
18762
+ allowedMethods?: string[]
18763
+ }]
18748
18764
  // ----- disable-autofix/regexp/hexadecimal-escape -----
18749
18765
  type DisableAutofixRegexpHexadecimalEscape = []|[("always" | "never")]
18750
18766
  // ----- disable-autofix/regexp/letter-case -----
@@ -22114,6 +22130,10 @@ type PromisePreferAwaitToThen = []|[{
22114
22130
  strict?: boolean
22115
22131
  [k: string]: unknown | undefined
22116
22132
  }]
22133
+ // ----- promise/spec-only -----
22134
+ type PromiseSpecOnly = []|[{
22135
+ allowedMethods?: string[]
22136
+ }]
22117
22137
  // ----- quote-props -----
22118
22138
  type QuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
22119
22139
  keywords?: boolean
@@ -23919,11 +23939,14 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
23919
23939
  onlyEquality?: boolean
23920
23940
  }]
23921
23941
 
23942
+ type PickKeysStartingWith<O, T extends string> = {
23943
+ [K in keyof O as K extends `${T}${string}` ? K : never]: O[K];
23944
+ };
23922
23945
  type RulesRecord = Eslint.Linter.RulesRecord & RuleOptions;
23923
23946
  type FlatConfigEntry<T extends RulesRecord = RulesRecord> = Eslint.Linter.FlatConfig & Pick<Eslint.Linter.Config<T>, 'rules'>;
23924
23947
  type RuleOverrides<T extends string | RulesRecord> = FlatConfigEntry<T extends string ? Record<T, Eslint.Linter.RuleEntry> : T>['rules'];
23925
23948
  type ConfigSharedOptions<T extends string | RulesRecord = RulesRecord> = Partial<Pick<FlatConfigEntry, 'files' | 'ignores'> & {
23926
- overrides?: RuleOverrides<T>;
23949
+ overrides?: T extends string ? PickKeysStartingWith<FlatConfigEntry['rules'] & {}, T | `disable-autofix/${T}`> : RuleOverrides<T>;
23927
23950
  }>;
23928
23951
  interface EslintConfigOptions {
23929
23952
  /**
package/dist/index.js CHANGED
@@ -34,9 +34,9 @@ var init_esm_shims = __esm({
34
34
  }
35
35
  });
36
36
 
37
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js
37
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js
38
38
  var require_eslint_all = __commonJS({
39
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
39
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-all.js"(exports, module) {
40
40
  "use strict";
41
41
  init_esm_shims();
42
42
  module.exports = Object.freeze({
@@ -243,9 +243,9 @@ var require_eslint_all = __commonJS({
243
243
  }
244
244
  });
245
245
 
246
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
246
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js
247
247
  var require_eslint_recommended = __commonJS({
248
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
248
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/configs/eslint-recommended.js"(exports, module) {
249
249
  "use strict";
250
250
  init_esm_shims();
251
251
  module.exports = Object.freeze({
@@ -316,9 +316,9 @@ var require_eslint_recommended = __commonJS({
316
316
  }
317
317
  });
318
318
 
319
- // node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js
319
+ // node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js
320
320
  var require_src = __commonJS({
321
- "node_modules/.pnpm/@eslint+js@9.8.0/node_modules/@eslint/js/src/index.js"(exports, module) {
321
+ "node_modules/.pnpm/@eslint+js@9.9.0/node_modules/@eslint/js/src/index.js"(exports, module) {
322
322
  "use strict";
323
323
  init_esm_shims();
324
324
  module.exports = {
@@ -885,6 +885,7 @@ var promiseEslintConfig = (options = {}, internalOptions = {}) => {
885
885
  // 'promise/param-names': ERROR,
886
886
  // 'promise/prefer-await-to-callbacks': OFF,
887
887
  // 'promise/prefer-await-to-then': OFF,
888
+ "promise/spec-only": ERROR,
888
889
  "promise/valid-params": ERROR
889
890
  // Default: warn
890
891
  };
@@ -1463,13 +1464,14 @@ var tsEslintConfig = (options = {}, internalOptions = {}) => {
1463
1464
  files: ["**/*.d.?([cm])ts"],
1464
1465
  rules: {
1465
1466
  "@typescript-eslint/consistent-indexed-object-style": OFF,
1467
+ "@typescript-eslint/method-signature-style": OFF,
1468
+ "@typescript-eslint/no-empty-object-type": OFF,
1466
1469
  "@typescript-eslint/no-explicit-any": OFF,
1467
- "@typescript-eslint/no-use-before-define": OFF,
1468
- "@typescript-eslint/no-unused-vars": OFF,
1469
1470
  "@typescript-eslint/no-shadow": OFF,
1470
- "@typescript-eslint/method-signature-style": OFF,
1471
- "import/no-default-export": OFF,
1472
- "import/newline-after-import": OFF
1471
+ "@typescript-eslint/no-unused-vars": OFF,
1472
+ "@typescript-eslint/no-use-before-define": OFF,
1473
+ "import/newline-after-import": OFF,
1474
+ "import/no-default-export": OFF
1473
1475
  },
1474
1476
  name: genFlatConfigEntryName("ts/dts")
1475
1477
  },
@@ -2133,6 +2135,7 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2133
2135
  name: genFlatConfigEntryName("vue/allow-default-export")
2134
2136
  },
2135
2137
  a11y && [
2138
+ // TODO don't have our name
2136
2139
  ...eslintPluginVueA11y.configs["flat/recommended"],
2137
2140
  {
2138
2141
  files,
@@ -2147,7 +2150,10 @@ var vueEslintConfig = (options, internalOptions = {}) => {
2147
2150
  // 'vuejs-accessibility/heading-has-content': ERROR,
2148
2151
  // 'vuejs-accessibility/iframe-has-title': ERROR,
2149
2152
  // 'vuejs-accessibility/interactive-supports-focus': ERROR,
2150
- // 'vuejs-accessibility/label-has-for': ERROR,
2153
+ "vuejs-accessibility/label-has-for": [
2154
+ ERROR,
2155
+ { allowChildren: true }
2156
+ ],
2151
2157
  // 'vuejs-accessibility/media-has-caption': ERROR,
2152
2158
  // 'vuejs-accessibility/mouse-events-have-key-events': ERROR,
2153
2159
  // 'vuejs-accessibility/no-access-key': ERROR,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.6",
2
+ "version": "0.0.7",
3
3
  "name": "eslint-config-un",
4
4
  "description": "A universal-ish ESLint config aiming to be reasonably strict and easily configurable.",
5
5
  "scripts": {
@@ -7,8 +7,8 @@
7
7
  "build": "pnpm typegen && tsup --format esm,cjs --clean --dts",
8
8
  "format:check": "prettier --check '**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts,vue}'",
9
9
  "format:fix": "prettier --write '**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts,vue}'",
10
- "lint:eslint": "eslint .",
11
- "lint:eslint:fix": "eslint . --fix",
10
+ "lint:eslint": "eslint --flag unstable_ts_config",
11
+ "lint:eslint:fix": "npm run lint:eslint -- --fix",
12
12
  "lint:types": "tsc --noEmit",
13
13
  "lint": "npm run lint:types && npm run format:check && npm run lint:eslint",
14
14
  "lint:fix": "npm run format:fix && npm run lint:eslint:fix",
@@ -53,11 +53,11 @@
53
53
  "@types/eslint-plugin-security": "^3.0.0",
54
54
  "@types/eslint__js": "^8.42.3",
55
55
  "@types/lodash-es": "^4.17.12",
56
- "@types/node": "^18.19.41",
56
+ "@types/node": "^18.19.44",
57
57
  "cross-env": "^7.0.3",
58
- "eslint": "npm:eslint-ts-patch@9.8.0-1",
59
- "eslint-ts-patch": "9.8.0-1",
60
- "eslint-typegen": "0.3.0",
58
+ "eslint": "^9.9.0",
59
+ "eslint-typegen": "0.3.1",
60
+ "jiti": "1.21.6",
61
61
  "prettier": "^3.3.3",
62
62
  "release-it": "^17.6.0",
63
63
  "shx": "^0.3.4",
@@ -65,18 +65,18 @@
65
65
  "typescript": "^5.5.4"
66
66
  },
67
67
  "dependencies": {
68
- "@stylistic/eslint-plugin": "^2.6.1",
69
- "@typescript-eslint/parser": "^8.0.0",
68
+ "@stylistic/eslint-plugin": "^2.6.4",
69
+ "@typescript-eslint/parser": "^8.1.0",
70
70
  "eslint-config-flat-gitignore": "^0.1.8",
71
71
  "eslint-config-prettier": "^9.1.0",
72
72
  "eslint-import-resolver-typescript": "^3.6.1",
73
73
  "eslint-plugin-disable-autofix": "^5.0.1",
74
74
  "eslint-plugin-import": "^2.29.1",
75
75
  "eslint-plugin-import-x": "^3.1.0",
76
- "eslint-plugin-n": "^17.10.1",
76
+ "eslint-plugin-n": "^17.10.2",
77
77
  "eslint-plugin-no-type-assertion": "^1.3.0",
78
78
  "eslint-plugin-pinia": "^0.2.0",
79
- "eslint-plugin-promise": "^7.0.0",
79
+ "eslint-plugin-promise": "^7.1.0",
80
80
  "eslint-plugin-regexp": "^2.6.0",
81
81
  "eslint-plugin-security": "^3.0.1",
82
82
  "eslint-plugin-sonarjs": "^1.0.4",
@@ -86,7 +86,7 @@
86
86
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
87
87
  "globals": "^15.9.0",
88
88
  "local-pkg": "^0.5.0",
89
- "typescript-eslint": "^8.0.0",
89
+ "typescript-eslint": "^8.1.0",
90
90
  "vue-eslint-parser": "^9.4.3"
91
91
  },
92
92
  "pnpm": {