diff --git a/scripts/generate-rule-files/diffs/rules/typescript-eslint/array-type.d.ts.diff b/scripts/generate-rule-files/diffs/rules/typescript-eslint/array-type.d.ts.diff deleted file mode 100644 index 631852e9..00000000 --- a/scripts/generate-rule-files/diffs/rules/typescript-eslint/array-type.d.ts.diff +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/rules/typescript-eslint/array-type.d.ts b/src/rules/typescript-eslint/array-type.d.ts -index 98cd312..e40ebb3 100644 ---- a/src/rules/typescript-eslint/array-type.d.ts -+++ b/src/rules/typescript-eslint/array-type.d.ts -@@ -3,12 +3,16 @@ import type { RuleConfig } from '../rule-config'; - /** - * Option. - */ --export type ArrayTypeOption = any[]; -+export interface ArrayTypeOption { -+ default?: 'array' | 'generic' | 'array-simple'; -+ readonly?: 'array' | 'generic' | 'array-simple'; -+ [k: string]: any; -+} - - /** - * Options. - */ --export type ArrayTypeOptions = ArrayTypeOption; -+export type ArrayTypeOptions = [ArrayTypeOption]; - - /** - * Require consistently using either `T[]` or `Array` for arrays. diff --git a/scripts/generate-rule-files/diffs/rules/typescript-eslint/ban-ts-comment.d.ts.diff b/scripts/generate-rule-files/diffs/rules/typescript-eslint/ban-ts-comment.d.ts.diff deleted file mode 100644 index 57522479..00000000 --- a/scripts/generate-rule-files/diffs/rules/typescript-eslint/ban-ts-comment.d.ts.diff +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/src/rules/typescript-eslint/ban-ts-comment.d.ts b/src/rules/typescript-eslint/ban-ts-comment.d.ts -index 111f9c9..6015012 100644 ---- a/src/rules/typescript-eslint/ban-ts-comment.d.ts -+++ b/src/rules/typescript-eslint/ban-ts-comment.d.ts -@@ -3,12 +3,42 @@ import type { RuleConfig } from '../rule-config'; - /** - * Option. - */ --export type BanTsCommentOption = any[]; -+export interface BanTsCommentOption { -+ 'ts-expect-error'?: -+ | boolean -+ | 'allow-with-description' -+ | { -+ descriptionFormat?: string; -+ [k: string]: any; -+ }; -+ 'ts-ignore'?: -+ | boolean -+ | 'allow-with-description' -+ | { -+ descriptionFormat?: string; -+ [k: string]: any; -+ }; -+ 'ts-nocheck'?: -+ | boolean -+ | 'allow-with-description' -+ | { -+ descriptionFormat?: string; -+ [k: string]: any; -+ }; -+ 'ts-check'?: -+ | boolean -+ | 'allow-with-description' -+ | { -+ descriptionFormat?: string; -+ [k: string]: any; -+ }; -+ minimumDescriptionLength?: number; -+} - - /** - * Options. - */ --export type BanTsCommentOptions = BanTsCommentOption; -+export type BanTsCommentOptions = [BanTsCommentOption]; - - /** - * Disallow `@ts-` comments or require descriptions after directives. diff --git a/scripts/generate-rule-files/diffs/rules/typescript-eslint/explicit-member-accessibility.d.ts.diff b/scripts/generate-rule-files/diffs/rules/typescript-eslint/explicit-member-accessibility.d.ts.diff deleted file mode 100644 index f9ae83f2..00000000 --- a/scripts/generate-rule-files/diffs/rules/typescript-eslint/explicit-member-accessibility.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/src/rules/typescript-eslint/explicit-member-accessibility.d.ts b/src/rules/typescript-eslint/explicit-member-accessibility.d.ts -index b585e26..1711d51 100644 ---- a/src/rules/typescript-eslint/explicit-member-accessibility.d.ts -+++ b/src/rules/typescript-eslint/explicit-member-accessibility.d.ts -@@ -3,13 +3,24 @@ import type { RuleConfig } from '../rule-config'; - /** - * Option. - */ --export type ExplicitMemberAccessibilityOption = any[]; -+export interface ExplicitMemberAccessibilityOption { -+ accessibility?: 'explicit' | 'no-public' | 'off'; -+ overrides?: { -+ accessors?: 'explicit' | 'no-public' | 'off'; -+ constructors?: 'explicit' | 'no-public' | 'off'; -+ methods?: 'explicit' | 'no-public' | 'off'; -+ properties?: 'explicit' | 'no-public' | 'off'; -+ parameterProperties?: 'explicit' | 'no-public' | 'off'; -+ }; -+ ignoredMethodNames?: string[]; -+} - - /** - * Options. - */ --export type ExplicitMemberAccessibilityOptions = -- ExplicitMemberAccessibilityOption; -+export type ExplicitMemberAccessibilityOptions = [ -+ ExplicitMemberAccessibilityOption?, -+]; - - /** - * Require explicit accessibility modifiers on class properties and methods. diff --git a/scripts/generate-rule-files/diffs/rules/typescript-eslint/lines-between-class-members.d.ts.diff b/scripts/generate-rule-files/diffs/rules/typescript-eslint/lines-between-class-members.d.ts.diff deleted file mode 100644 index fe04ef1a..00000000 --- a/scripts/generate-rule-files/diffs/rules/typescript-eslint/lines-between-class-members.d.ts.diff +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/src/rules/typescript-eslint/lines-between-class-members.d.ts b/src/rules/typescript-eslint/lines-between-class-members.d.ts -index 46caad7..afdd87e 100644 ---- a/src/rules/typescript-eslint/lines-between-class-members.d.ts -+++ b/src/rules/typescript-eslint/lines-between-class-members.d.ts -@@ -1,16 +1,23 @@ -+import type { -+ LinesBetweenClassMembersConfig as BaseConfig, -+ LinesBetweenClassMembersOption, -+} from '../eslint/lines-between-class-members'; - import type { RuleConfig } from '../rule-config'; - - /** -- * Option. -+ * Config. - */ --export interface LinesBetweenClassMembersOption { -- [k: string]: any; -+export interface LinesBetweenClassMembersConfig extends BaseConfig { -+ exceptAfterOverload?: boolean; - } - - /** - * Options. - */ --export type LinesBetweenClassMembersOptions = LinesBetweenClassMembersOption; -+export type LinesBetweenClassMembersOptions = [ -+ LinesBetweenClassMembersOption?, -+ LinesBetweenClassMembersConfig?, -+]; - - /** - * Require or disallow an empty line between class members. diff --git a/scripts/generate-rule-files/diffs/rules/typescript-eslint/parameter-properties.d.ts.diff b/scripts/generate-rule-files/diffs/rules/typescript-eslint/parameter-properties.d.ts.diff deleted file mode 100644 index c2c5c553..00000000 --- a/scripts/generate-rule-files/diffs/rules/typescript-eslint/parameter-properties.d.ts.diff +++ /dev/null @@ -1,44 +0,0 @@ -diff --git a/src/rules/typescript-eslint/parameter-properties.d.ts b/src/rules/typescript-eslint/parameter-properties.d.ts -index 6b0f176..591a9a4 100644 ---- a/src/rules/typescript-eslint/parameter-properties.d.ts -+++ b/src/rules/typescript-eslint/parameter-properties.d.ts -@@ -3,12 +3,37 @@ import type { RuleConfig } from '../rule-config'; - /** - * Option. - */ --export type ParameterPropertiesOption = any[]; -+export interface ParameterPropertiesOption { -+ /** -+ * @minItems 1 -+ */ -+ allow?: [ -+ ( -+ | 'readonly' -+ | 'private' -+ | 'protected' -+ | 'public' -+ | 'private readonly' -+ | 'protected readonly' -+ | 'public readonly' -+ ), -+ ...( -+ | 'readonly' -+ | 'private' -+ | 'protected' -+ | 'public' -+ | 'private readonly' -+ | 'protected readonly' -+ | 'public readonly' -+ )[], -+ ]; -+ prefer?: 'class-property' | 'parameter-property'; -+} - - /** - * Options. - */ --export type ParameterPropertiesOptions = ParameterPropertiesOption; -+export type ParameterPropertiesOptions = [ParameterPropertiesOption?]; - - /** - * Require or disallow parameter properties in class constructors. diff --git a/scripts/generate-rule-files/diffs/rules/vitest/valid-title.d.ts.diff b/scripts/generate-rule-files/diffs/rules/vitest/valid-title.d.ts.diff index d3a344e8..390dda7b 100644 --- a/scripts/generate-rule-files/diffs/rules/vitest/valid-title.d.ts.diff +++ b/scripts/generate-rule-files/diffs/rules/vitest/valid-title.d.ts.diff @@ -1,11 +1,13 @@ diff --git a/src/rules/vitest/valid-title.d.ts b/src/rules/vitest/valid-title.d.ts -index 8bdfe9a..83c707b 100644 +index 160be76..834ac9b 100644 --- a/src/rules/vitest/valid-title.d.ts +++ b/src/rules/vitest/valid-title.d.ts -@@ -8,13 +8,7 @@ export interface ValidTitleOption { +@@ -7,15 +7,7 @@ export interface ValidTitleOption { + ignoreTypeOfDescribeName?: boolean; + allowArguments?: boolean; disallowedWords?: string[]; - /** - */ +- /** +- */ - [k: string]: - | string - | [string] diff --git a/scripts/generate-rule-files/src/json-schema-to-ts.ts b/scripts/generate-rule-files/src/json-schema-to-ts.ts index f54a13b5..04c5c46c 100644 --- a/scripts/generate-rule-files/src/json-schema-to-ts.ts +++ b/scripts/generate-rule-files/src/json-schema-to-ts.ts @@ -45,6 +45,9 @@ export async function generateTypeFromSchema( schema: JSONSchema4, typeName: string, ): Promise { + schema = JSON.parse( + JSON.stringify(schema).replace(/#\/items\/0\/\$defs\//g, '#/$defs/'), + ); let result: string = await compile(schema, typeName, { format: false, bannerComment: '', diff --git a/scripts/generate-rule-files/src/rule-file.ts b/scripts/generate-rule-files/src/rule-file.ts index 642915a1..a7a73ccb 100644 --- a/scripts/generate-rule-files/src/rule-file.ts +++ b/scripts/generate-rule-files/src/rule-file.ts @@ -199,7 +199,7 @@ export class RuleFile { * Create the directory of the rule file if it doesn't exist. */ private createRuleDirectory(): void { - const subPath: string = dirname(this.rulePath.toLowerCase()); + const subPath: string = dirname(this.rulePath); if (!existsSync(subPath)) { mkdirSync(subPath, { recursive: true }); } diff --git a/src/rules/testing-library/await-async-query.d.ts b/src/rules/testing-library/await-async-query.d.ts deleted file mode 100644 index 517896d6..00000000 --- a/src/rules/testing-library/await-async-query.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Enforce promises from async queries to be handled. - * - * @see [await-async-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-query.md) - */ -export type AwaitAsyncQueryRuleConfig = RuleConfig<[]>; - -/** - * Enforce promises from async queries to be handled. - * - * @see [await-async-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-query.md) - */ -export interface AwaitAsyncQueryRule { - /** - * Enforce promises from async queries to be handled. - * - * @see [await-async-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-query.md) - */ - 'testing-library/await-async-query': AwaitAsyncQueryRuleConfig; -} diff --git a/src/rules/testing-library/await-fire-event.d.ts b/src/rules/testing-library/await-fire-event.d.ts deleted file mode 100644 index dde9b6cc..00000000 --- a/src/rules/testing-library/await-fire-event.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Enforce promises from `fireEvent` methods to be handled. - * - * @see [await-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-fire-event.md) - */ -export type AwaitFireEventRuleConfig = RuleConfig<[]>; - -/** - * Enforce promises from `fireEvent` methods to be handled. - * - * @see [await-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-fire-event.md) - */ -export interface AwaitFireEventRule { - /** - * Enforce promises from `fireEvent` methods to be handled. - * - * @see [await-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-fire-event.md) - */ - 'testing-library/await-fire-event': AwaitFireEventRuleConfig; -} diff --git a/src/rules/testing-library/index.d.ts b/src/rules/testing-library/index.d.ts index d61f60d1..d186507a 100644 --- a/src/rules/testing-library/index.d.ts +++ b/src/rules/testing-library/index.d.ts @@ -1,12 +1,9 @@ import type { AwaitAsyncEventsRule } from './await-async-events'; import type { AwaitAsyncQueriesRule } from './await-async-queries'; -import type { AwaitAsyncQueryRule } from './await-async-query'; import type { AwaitAsyncUtilsRule } from './await-async-utils'; -import type { AwaitFireEventRule } from './await-fire-event'; import type { ConsistentDataTestidRule } from './consistent-data-testid'; import type { NoAwaitSyncEventsRule } from './no-await-sync-events'; import type { NoAwaitSyncQueriesRule } from './no-await-sync-queries'; -import type { NoAwaitSyncQueryRule } from './no-await-sync-query'; import type { NoContainerRule } from './no-container'; import type { NoDebuggingUtilsRule } from './no-debugging-utils'; import type { NoDomImportRule } from './no-dom-import'; @@ -15,9 +12,7 @@ import type { NoManualCleanupRule } from './no-manual-cleanup'; import type { NoNodeAccessRule } from './no-node-access'; import type { NoPromiseInFireEventRule } from './no-promise-in-fire-event'; import type { NoRenderInLifecycleRule } from './no-render-in-lifecycle'; -import type { NoRenderInSetupRule } from './no-render-in-setup'; import type { NoUnnecessaryActRule } from './no-unnecessary-act'; -import type { NoWaitForEmptyCallbackRule } from './no-wait-for-empty-callback'; import type { NoWaitForMultipleAssertionsRule } from './no-wait-for-multiple-assertions'; import type { NoWaitForSideEffectsRule } from './no-wait-for-side-effects'; import type { NoWaitForSnapshotRule } from './no-wait-for-snapshot'; @@ -28,7 +23,6 @@ import type { PreferQueryByDisappearanceRule } from './prefer-query-by-disappear import type { PreferQueryMatchersRule } from './prefer-query-matchers'; import type { PreferScreenQueriesRule } from './prefer-screen-queries'; import type { PreferUserEventRule } from './prefer-user-event'; -import type { PreferWaitForRule } from './prefer-wait-for'; import type { RenderResultNamingConventionRule } from './render-result-naming-convention'; /** @@ -36,13 +30,10 @@ import type { RenderResultNamingConventionRule } from './render-result-naming-co */ export type TestingLibraryRules = AwaitAsyncEventsRule & AwaitAsyncQueriesRule & - AwaitAsyncQueryRule & AwaitAsyncUtilsRule & - AwaitFireEventRule & ConsistentDataTestidRule & NoAwaitSyncEventsRule & NoAwaitSyncQueriesRule & - NoAwaitSyncQueryRule & NoContainerRule & NoDebuggingUtilsRule & NoDomImportRule & @@ -51,9 +42,7 @@ export type TestingLibraryRules = AwaitAsyncEventsRule & NoNodeAccessRule & NoPromiseInFireEventRule & NoRenderInLifecycleRule & - NoRenderInSetupRule & NoUnnecessaryActRule & - NoWaitForEmptyCallbackRule & NoWaitForMultipleAssertionsRule & NoWaitForSideEffectsRule & NoWaitForSnapshotRule & @@ -64,5 +53,4 @@ export type TestingLibraryRules = AwaitAsyncEventsRule & PreferQueryMatchersRule & PreferScreenQueriesRule & PreferUserEventRule & - PreferWaitForRule & RenderResultNamingConventionRule; diff --git a/src/rules/testing-library/no-await-sync-query.d.ts b/src/rules/testing-library/no-await-sync-query.d.ts deleted file mode 100644 index 3c5c54c7..00000000 --- a/src/rules/testing-library/no-await-sync-query.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Disallow unnecessary `await` for sync queries. - * - * @see [no-await-sync-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-query.md) - */ -export type NoAwaitSyncQueryRuleConfig = RuleConfig<[]>; - -/** - * Disallow unnecessary `await` for sync queries. - * - * @see [no-await-sync-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-query.md) - */ -export interface NoAwaitSyncQueryRule { - /** - * Disallow unnecessary `await` for sync queries. - * - * @see [no-await-sync-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-query.md) - */ - 'testing-library/no-await-sync-query': NoAwaitSyncQueryRuleConfig; -} diff --git a/src/rules/testing-library/no-render-in-setup.d.ts b/src/rules/testing-library/no-render-in-setup.d.ts deleted file mode 100644 index 4ecaa384..00000000 --- a/src/rules/testing-library/no-render-in-setup.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Option. - */ -export interface NoRenderInSetupOption { - allowTestingFrameworkSetupHook?: 'beforeEach' | 'beforeAll'; - [k: string]: any; -} - -/** - * Options. - */ -export type NoRenderInSetupOptions = [NoRenderInSetupOption?]; - -/** - * Disallow the use of `render` in testing frameworks setup functions. - * - * @see [no-render-in-setup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-setup.md) - */ -export type NoRenderInSetupRuleConfig = RuleConfig; - -/** - * Disallow the use of `render` in testing frameworks setup functions. - * - * @see [no-render-in-setup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-setup.md) - */ -export interface NoRenderInSetupRule { - /** - * Disallow the use of `render` in testing frameworks setup functions. - * - * @see [no-render-in-setup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-setup.md) - */ - 'testing-library/no-render-in-setup': NoRenderInSetupRuleConfig; -} diff --git a/src/rules/testing-library/no-wait-for-empty-callback.d.ts b/src/rules/testing-library/no-wait-for-empty-callback.d.ts deleted file mode 100644 index 615eddd0..00000000 --- a/src/rules/testing-library/no-wait-for-empty-callback.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Disallow empty callbacks for `waitFor` and `waitForElementToBeRemoved`. - * - * @see [no-wait-for-empty-callback](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-empty-callback.md) - */ -export type NoWaitForEmptyCallbackRuleConfig = RuleConfig<[]>; - -/** - * Disallow empty callbacks for `waitFor` and `waitForElementToBeRemoved`. - * - * @see [no-wait-for-empty-callback](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-empty-callback.md) - */ -export interface NoWaitForEmptyCallbackRule { - /** - * Disallow empty callbacks for `waitFor` and `waitForElementToBeRemoved`. - * - * @see [no-wait-for-empty-callback](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-empty-callback.md) - */ - 'testing-library/no-wait-for-empty-callback': NoWaitForEmptyCallbackRuleConfig; -} diff --git a/src/rules/testing-library/prefer-wait-for.d.ts b/src/rules/testing-library/prefer-wait-for.d.ts deleted file mode 100644 index faf8b42d..00000000 --- a/src/rules/testing-library/prefer-wait-for.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Use `waitFor` instead of deprecated wait methods. - * - * @see [prefer-wait-for](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-wait-for.md) - */ -export type PreferWaitForRuleConfig = RuleConfig<[]>; - -/** - * Use `waitFor` instead of deprecated wait methods. - * - * @see [prefer-wait-for](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-wait-for.md) - */ -export interface PreferWaitForRule { - /** - * Use `waitFor` instead of deprecated wait methods. - * - * @see [prefer-wait-for](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-wait-for.md) - */ - 'testing-library/prefer-wait-for': PreferWaitForRuleConfig; -} diff --git a/src/rules/typescript-eslint/array-type.d.ts b/src/rules/typescript-eslint/array-type.d.ts index e40ebb3e..553a1913 100644 --- a/src/rules/typescript-eslint/array-type.d.ts +++ b/src/rules/typescript-eslint/array-type.d.ts @@ -4,15 +4,20 @@ import type { RuleConfig } from '../rule-config'; * Option. */ export interface ArrayTypeOption { + /** + * The array type expected for mutable cases. + */ default?: 'array' | 'generic' | 'array-simple'; + /** + * The array type expected for readonly cases. If omitted, the value for `default` will be used. + */ readonly?: 'array' | 'generic' | 'array-simple'; - [k: string]: any; } /** * Options. */ -export type ArrayTypeOptions = [ArrayTypeOption]; +export type ArrayTypeOptions = [ArrayTypeOption?]; /** * Require consistently using either `T[]` or `Array` for arrays. diff --git a/src/rules/typescript-eslint/ban-ts-comment.d.ts b/src/rules/typescript-eslint/ban-ts-comment.d.ts index 60150126..62b0b4d9 100644 --- a/src/rules/typescript-eslint/ban-ts-comment.d.ts +++ b/src/rules/typescript-eslint/ban-ts-comment.d.ts @@ -3,42 +3,25 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type DirectiveConfigSchema = + | boolean + | 'allow-with-description' + | { + descriptionFormat?: string; + }; + export interface BanTsCommentOption { - 'ts-expect-error'?: - | boolean - | 'allow-with-description' - | { - descriptionFormat?: string; - [k: string]: any; - }; - 'ts-ignore'?: - | boolean - | 'allow-with-description' - | { - descriptionFormat?: string; - [k: string]: any; - }; - 'ts-nocheck'?: - | boolean - | 'allow-with-description' - | { - descriptionFormat?: string; - [k: string]: any; - }; - 'ts-check'?: - | boolean - | 'allow-with-description' - | { - descriptionFormat?: string; - [k: string]: any; - }; + 'ts-expect-error'?: DirectiveConfigSchema; + 'ts-ignore'?: DirectiveConfigSchema; + 'ts-nocheck'?: DirectiveConfigSchema; + 'ts-check'?: DirectiveConfigSchema; minimumDescriptionLength?: number; } /** * Options. */ -export type BanTsCommentOptions = [BanTsCommentOption]; +export type BanTsCommentOptions = [BanTsCommentOption?]; /** * Disallow `@ts-` comments or require descriptions after directives. diff --git a/src/rules/typescript-eslint/ban-types.d.ts b/src/rules/typescript-eslint/ban-types.d.ts index b458be60..2efb9495 100644 --- a/src/rules/typescript-eslint/ban-types.d.ts +++ b/src/rules/typescript-eslint/ban-types.d.ts @@ -3,17 +3,29 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type BanConfig = + | null + | false + | true + | string + | { + /** + * Custom error message + */ + message?: string; + /** + * Type to autofix replace with. Note that autofixers can be applied automatically - so you need to be careful with this option. + */ + fixWith?: string; + /** + * Types to suggest replacing with. + */ + suggest?: string[]; + }; + export interface BanTypesOption { types?: { - [k: string]: - | null - | boolean - | string - | { - message?: string; - fixWith?: string; - suggest?: string[]; - }; + [k: string]: BanConfig; }; extendDefaults?: boolean; } diff --git a/src/rules/typescript-eslint/explicit-member-accessibility.d.ts b/src/rules/typescript-eslint/explicit-member-accessibility.d.ts index 1711d514..fa720331 100644 --- a/src/rules/typescript-eslint/explicit-member-accessibility.d.ts +++ b/src/rules/typescript-eslint/explicit-member-accessibility.d.ts @@ -3,14 +3,16 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type AccessibilityLevel = 'explicit' | 'no-public' | 'off'; + export interface ExplicitMemberAccessibilityOption { - accessibility?: 'explicit' | 'no-public' | 'off'; + accessibility?: AccessibilityLevel; overrides?: { - accessors?: 'explicit' | 'no-public' | 'off'; - constructors?: 'explicit' | 'no-public' | 'off'; - methods?: 'explicit' | 'no-public' | 'off'; - properties?: 'explicit' | 'no-public' | 'off'; - parameterProperties?: 'explicit' | 'no-public' | 'off'; + accessors?: AccessibilityLevel; + constructors?: AccessibilityLevel; + methods?: AccessibilityLevel; + properties?: AccessibilityLevel; + parameterProperties?: AccessibilityLevel; }; ignoredMethodNames?: string[]; } diff --git a/src/rules/typescript-eslint/explicit-module-boundary-types.d.ts b/src/rules/typescript-eslint/explicit-module-boundary-types.d.ts index d7b10fce..4f49a05d 100644 --- a/src/rules/typescript-eslint/explicit-module-boundary-types.d.ts +++ b/src/rules/typescript-eslint/explicit-module-boundary-types.d.ts @@ -26,7 +26,6 @@ export interface ExplicitModuleBoundaryTypesOption { * Whether to ignore type annotations on the variable of a function expresion. */ allowTypedFunctionExpressions?: boolean; - shouldTrackReferences?: boolean; } /** diff --git a/src/rules/typescript-eslint/index.d.ts b/src/rules/typescript-eslint/index.d.ts index 597d50cc..13087db0 100644 --- a/src/rules/typescript-eslint/index.d.ts +++ b/src/rules/typescript-eslint/index.d.ts @@ -38,7 +38,6 @@ import type { NoConfusingNonNullAssertionRule } from './no-confusing-non-null-as import type { NoConfusingVoidExpressionRule } from './no-confusing-void-expression'; import type { NoDupeClassMembersRule } from './no-dupe-class-members'; import type { NoDuplicateEnumValuesRule } from './no-duplicate-enum-values'; -import type { NoDuplicateImportsRule } from './no-duplicate-imports'; import type { NoDuplicateTypeConstituentsRule } from './no-duplicate-type-constituents'; import type { NoDynamicDeleteRule } from './no-dynamic-delete'; import type { NoEmptyFunctionRule } from './no-empty-function'; @@ -50,7 +49,6 @@ import type { NoExtraSemiRule } from './no-extra-semi'; import type { NoExtraneousClassRule } from './no-extraneous-class'; import type { NoFloatingPromisesRule } from './no-floating-promises'; import type { NoForInArrayRule } from './no-for-in-array'; -import type { NoImplicitAnyCatchRule } from './no-implicit-any-catch'; import type { NoImpliedEvalRule } from './no-implied-eval'; import type { NoImportTypeSideEffectsRule } from './no-import-type-side-effects'; import type { NoInferrableTypesRule } from './no-inferrable-types'; @@ -67,7 +65,6 @@ import type { NoNamespaceRule } from './no-namespace'; import type { NoNonNullAssertedNullishCoalescingRule } from './no-non-null-asserted-nullish-coalescing'; import type { NoNonNullAssertedOptionalChainRule } from './no-non-null-asserted-optional-chain'; import type { NoNonNullAssertionRule } from './no-non-null-assertion'; -import type { NoParameterPropertiesRule } from './no-parameter-properties'; import type { NoRedeclareRule } from './no-redeclare'; import type { NoRedundantTypeConstituentsRule } from './no-redundant-type-constituents'; import type { NoRequireImportsRule } from './no-require-imports'; @@ -124,7 +121,6 @@ import type { RestrictTemplateExpressionsRule } from './restrict-template-expres import type { ReturnAwaitRule } from './return-await'; import type { SemiRule } from './semi'; import type { SortTypeConstituentsRule } from './sort-type-constituents'; -import type { SortTypeUnionIntersectionMembersRule } from './sort-type-union-intersection-members'; import type { SpaceBeforeBlocksRule } from './space-before-blocks'; import type { SpaceBeforeFunctionParenRule } from './space-before-function-paren'; import type { SpaceInfixOpsRule } from './space-infix-ops'; @@ -179,7 +175,6 @@ export type TypeScriptRules = AdjacentOverloadSignaturesRule & NoConfusingVoidExpressionRule & NoDupeClassMembersRule & NoDuplicateEnumValuesRule & - NoDuplicateImportsRule & NoDuplicateTypeConstituentsRule & NoDynamicDeleteRule & NoEmptyFunctionRule & @@ -191,7 +186,6 @@ export type TypeScriptRules = AdjacentOverloadSignaturesRule & NoExtraneousClassRule & NoFloatingPromisesRule & NoForInArrayRule & - NoImplicitAnyCatchRule & NoImpliedEvalRule & NoImportTypeSideEffectsRule & NoInferrableTypesRule & @@ -208,7 +202,6 @@ export type TypeScriptRules = AdjacentOverloadSignaturesRule & NoNonNullAssertedNullishCoalescingRule & NoNonNullAssertedOptionalChainRule & NoNonNullAssertionRule & - NoParameterPropertiesRule & NoRedeclareRule & NoRedundantTypeConstituentsRule & NoRequireImportsRule & @@ -265,7 +258,6 @@ export type TypeScriptRules = AdjacentOverloadSignaturesRule & ReturnAwaitRule & SemiRule & SortTypeConstituentsRule & - SortTypeUnionIntersectionMembersRule & SpaceBeforeBlocksRule & SpaceBeforeFunctionParenRule & SpaceInfixOpsRule & diff --git a/src/rules/typescript-eslint/member-delimiter-style.d.ts b/src/rules/typescript-eslint/member-delimiter-style.d.ts index c144099a..237ea7fb 100644 --- a/src/rules/typescript-eslint/member-delimiter-style.d.ts +++ b/src/rules/typescript-eslint/member-delimiter-style.d.ts @@ -3,39 +3,34 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type MultiLineOption = 'none' | 'semi' | 'comma'; +export type SingleLineOption = 'semi' | 'comma'; + export interface MemberDelimiterStyleOption { multiline?: { - delimiter?: 'none' | 'semi' | 'comma'; + delimiter?: MultiLineOption; requireLast?: boolean; }; singleline?: { - delimiter?: 'semi' | 'comma'; + delimiter?: SingleLineOption; requireLast?: boolean; }; overrides?: { - interface?: { - multiline?: { - delimiter?: 'none' | 'semi' | 'comma'; - requireLast?: boolean; - }; - singleline?: { - delimiter?: 'semi' | 'comma'; - requireLast?: boolean; - }; - }; - typeLiteral?: { - multiline?: { - delimiter?: 'none' | 'semi' | 'comma'; - requireLast?: boolean; - }; - singleline?: { - delimiter?: 'semi' | 'comma'; - requireLast?: boolean; - }; - }; + interface?: DelimiterConfig; + typeLiteral?: DelimiterConfig; }; multilineDetection?: 'brackets' | 'last-member'; } +export interface DelimiterConfig { + multiline?: { + delimiter?: MultiLineOption; + requireLast?: boolean; + }; + singleline?: { + delimiter?: SingleLineOption; + requireLast?: boolean; + }; +} /** * Options. diff --git a/src/rules/typescript-eslint/member-ordering.d.ts b/src/rules/typescript-eslint/member-ordering.d.ts index cc9f41c7..8cc80906 100644 --- a/src/rules/typescript-eslint/member-ordering.d.ts +++ b/src/rules/typescript-eslint/member-ordering.d.ts @@ -3,1752 +3,175 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type BaseConfig = + | 'never' + | (AllItems | AllItems[])[] + | { + memberTypes?: (AllItems | AllItems[])[] | 'never'; + order?: OrderOptions; + optionalityOrder?: OptionalityOrderOptions; + }; +export type AllItems = + | 'readonly-signature' + | 'signature' + | 'readonly-field' + | 'public-readonly-field' + | 'public-decorated-readonly-field' + | 'decorated-readonly-field' + | 'static-readonly-field' + | 'public-static-readonly-field' + | 'instance-readonly-field' + | 'public-instance-readonly-field' + | 'abstract-readonly-field' + | 'public-abstract-readonly-field' + | 'protected-readonly-field' + | 'protected-decorated-readonly-field' + | 'protected-static-readonly-field' + | 'protected-instance-readonly-field' + | 'protected-abstract-readonly-field' + | 'private-readonly-field' + | 'private-decorated-readonly-field' + | 'private-static-readonly-field' + | 'private-instance-readonly-field' + | '#private-readonly-field' + | '#private-static-readonly-field' + | '#private-instance-readonly-field' + | 'field' + | 'public-field' + | 'public-decorated-field' + | 'decorated-field' + | 'static-field' + | 'public-static-field' + | 'instance-field' + | 'public-instance-field' + | 'abstract-field' + | 'public-abstract-field' + | 'protected-field' + | 'protected-decorated-field' + | 'protected-static-field' + | 'protected-instance-field' + | 'protected-abstract-field' + | 'private-field' + | 'private-decorated-field' + | 'private-static-field' + | 'private-instance-field' + | '#private-field' + | '#private-static-field' + | '#private-instance-field' + | 'method' + | 'public-method' + | 'public-decorated-method' + | 'decorated-method' + | 'static-method' + | 'public-static-method' + | 'instance-method' + | 'public-instance-method' + | 'abstract-method' + | 'public-abstract-method' + | 'protected-method' + | 'protected-decorated-method' + | 'protected-static-method' + | 'protected-instance-method' + | 'protected-abstract-method' + | 'private-method' + | 'private-decorated-method' + | 'private-static-method' + | 'private-instance-method' + | '#private-method' + | '#private-static-method' + | '#private-instance-method' + | 'call-signature' + | 'constructor' + | 'public-constructor' + | 'protected-constructor' + | 'private-constructor' + | 'get' + | 'public-get' + | 'public-decorated-get' + | 'decorated-get' + | 'static-get' + | 'public-static-get' + | 'instance-get' + | 'public-instance-get' + | 'abstract-get' + | 'public-abstract-get' + | 'protected-get' + | 'protected-decorated-get' + | 'protected-static-get' + | 'protected-instance-get' + | 'protected-abstract-get' + | 'private-get' + | 'private-decorated-get' + | 'private-static-get' + | 'private-instance-get' + | '#private-get' + | '#private-static-get' + | '#private-instance-get' + | 'set' + | 'public-set' + | 'public-decorated-set' + | 'decorated-set' + | 'static-set' + | 'public-static-set' + | 'instance-set' + | 'public-instance-set' + | 'abstract-set' + | 'public-abstract-set' + | 'protected-set' + | 'protected-decorated-set' + | 'protected-static-set' + | 'protected-instance-set' + | 'protected-abstract-set' + | 'private-set' + | 'private-decorated-set' + | 'private-static-set' + | 'private-instance-set' + | '#private-set' + | '#private-static-set' + | '#private-instance-set' + | 'static-initialization' + | 'static-static-initialization' + | 'public-static-static-initialization' + | 'instance-static-initialization' + | 'public-instance-static-initialization' + | 'abstract-static-initialization' + | 'public-abstract-static-initialization' + | 'protected-static-static-initialization' + | 'protected-instance-static-initialization' + | 'protected-abstract-static-initialization' + | 'private-static-static-initialization' + | 'private-instance-static-initialization' + | '#private-static-static-initialization' + | '#private-instance-static-initialization'; +export type OrderOptions = + | 'alphabetically' + | 'alphabetically-case-insensitive' + | 'as-written' + | 'natural' + | 'natural-case-insensitive'; +export type OptionalityOrderOptions = 'optional-first' | 'required-first'; +export type TypesConfig = + | 'never' + | (TypeItems | TypeItems[])[] + | { + memberTypes?: (TypeItems | TypeItems[])[] | 'never'; + order?: OrderOptions; + optionalityOrder?: OptionalityOrderOptions; + }; +export type TypeItems = + | 'readonly-signature' + | 'signature' + | 'readonly-field' + | 'field' + | 'method' + | 'constructor'; + export interface MemberOrderingOption { - default?: - | 'never' - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | { - memberTypes?: - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | 'never'; - order?: - | 'alphabetically' - | 'alphabetically-case-insensitive' - | 'as-written' - | 'natural' - | 'natural-case-insensitive'; - optionalityOrder?: 'optional-first' | 'required-first'; - }; - classes?: - | 'never' - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | { - memberTypes?: - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | 'never'; - order?: - | 'alphabetically' - | 'alphabetically-case-insensitive' - | 'as-written' - | 'natural' - | 'natural-case-insensitive'; - optionalityOrder?: 'optional-first' | 'required-first'; - }; - classExpressions?: - | 'never' - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | { - memberTypes?: - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'public-readonly-field' - | 'public-decorated-readonly-field' - | 'decorated-readonly-field' - | 'static-readonly-field' - | 'public-static-readonly-field' - | 'instance-readonly-field' - | 'public-instance-readonly-field' - | 'abstract-readonly-field' - | 'public-abstract-readonly-field' - | 'protected-readonly-field' - | 'protected-decorated-readonly-field' - | 'protected-static-readonly-field' - | 'protected-instance-readonly-field' - | 'protected-abstract-readonly-field' - | 'private-readonly-field' - | 'private-decorated-readonly-field' - | 'private-static-readonly-field' - | 'private-instance-readonly-field' - | '#private-readonly-field' - | '#private-static-readonly-field' - | '#private-instance-readonly-field' - | 'field' - | 'public-field' - | 'public-decorated-field' - | 'decorated-field' - | 'static-field' - | 'public-static-field' - | 'instance-field' - | 'public-instance-field' - | 'abstract-field' - | 'public-abstract-field' - | 'protected-field' - | 'protected-decorated-field' - | 'protected-static-field' - | 'protected-instance-field' - | 'protected-abstract-field' - | 'private-field' - | 'private-decorated-field' - | 'private-static-field' - | 'private-instance-field' - | '#private-field' - | '#private-static-field' - | '#private-instance-field' - | 'method' - | 'public-method' - | 'public-decorated-method' - | 'decorated-method' - | 'static-method' - | 'public-static-method' - | 'instance-method' - | 'public-instance-method' - | 'abstract-method' - | 'public-abstract-method' - | 'protected-method' - | 'protected-decorated-method' - | 'protected-static-method' - | 'protected-instance-method' - | 'protected-abstract-method' - | 'private-method' - | 'private-decorated-method' - | 'private-static-method' - | 'private-instance-method' - | '#private-method' - | '#private-static-method' - | '#private-instance-method' - | 'call-signature' - | 'constructor' - | 'public-constructor' - | 'protected-constructor' - | 'private-constructor' - | 'get' - | 'public-get' - | 'public-decorated-get' - | 'decorated-get' - | 'static-get' - | 'public-static-get' - | 'instance-get' - | 'public-instance-get' - | 'abstract-get' - | 'public-abstract-get' - | 'protected-get' - | 'protected-decorated-get' - | 'protected-static-get' - | 'protected-instance-get' - | 'protected-abstract-get' - | 'private-get' - | 'private-decorated-get' - | 'private-static-get' - | 'private-instance-get' - | '#private-get' - | '#private-static-get' - | '#private-instance-get' - | 'set' - | 'public-set' - | 'public-decorated-set' - | 'decorated-set' - | 'static-set' - | 'public-static-set' - | 'instance-set' - | 'public-instance-set' - | 'abstract-set' - | 'public-abstract-set' - | 'protected-set' - | 'protected-decorated-set' - | 'protected-static-set' - | 'protected-instance-set' - | 'protected-abstract-set' - | 'private-set' - | 'private-decorated-set' - | 'private-static-set' - | 'private-instance-set' - | '#private-set' - | '#private-static-set' - | '#private-instance-set' - | 'static-initialization' - | 'static-static-initialization' - | 'public-static-static-initialization' - | 'instance-static-initialization' - | 'public-instance-static-initialization' - | 'abstract-static-initialization' - | 'public-abstract-static-initialization' - | 'protected-static-static-initialization' - | 'protected-instance-static-initialization' - | 'protected-abstract-static-initialization' - | 'private-static-static-initialization' - | 'private-instance-static-initialization' - | '#private-static-static-initialization' - | '#private-instance-static-initialization' - )[] - )[] - | 'never'; - order?: - | 'alphabetically' - | 'alphabetically-case-insensitive' - | 'as-written' - | 'natural' - | 'natural-case-insensitive'; - optionalityOrder?: 'optional-first' | 'required-first'; - }; - interfaces?: - | 'never' - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - )[] - )[] - | { - memberTypes?: - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - )[] - )[] - | 'never'; - order?: - | 'alphabetically' - | 'alphabetically-case-insensitive' - | 'as-written' - | 'natural' - | 'natural-case-insensitive'; - optionalityOrder?: 'optional-first' | 'required-first'; - }; - typeLiterals?: - | 'never' - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - )[] - )[] - | { - memberTypes?: - | ( - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - ) - | ( - | 'readonly-signature' - | 'signature' - | 'readonly-field' - | 'field' - | 'method' - | 'constructor' - )[] - )[] - | 'never'; - order?: - | 'alphabetically' - | 'alphabetically-case-insensitive' - | 'as-written' - | 'natural' - | 'natural-case-insensitive'; - optionalityOrder?: 'optional-first' | 'required-first'; - }; + default?: BaseConfig; + classes?: BaseConfig; + classExpressions?: BaseConfig; + interfaces?: TypesConfig; + typeLiterals?: TypesConfig; } /** diff --git a/src/rules/typescript-eslint/no-duplicate-imports.d.ts b/src/rules/typescript-eslint/no-duplicate-imports.d.ts deleted file mode 100644 index 299cf570..00000000 --- a/src/rules/typescript-eslint/no-duplicate-imports.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Option. - */ -export interface NoDuplicateImportsOption { - includeExports?: boolean; -} - -/** - * Options. - */ -export type NoDuplicateImportsOptions = [NoDuplicateImportsOption?]; - -/** - * Disallow duplicate imports. - * - * @deprecated - * - * @see [no-duplicate-imports](https://typescript-eslint.io/rules/no-duplicate-imports) - */ -export type NoDuplicateImportsRuleConfig = - RuleConfig; - -/** - * Disallow duplicate imports. - * - * @deprecated - * - * @see [no-duplicate-imports](https://typescript-eslint.io/rules/no-duplicate-imports) - */ -export interface NoDuplicateImportsRule { - /** - * Disallow duplicate imports. - * - * @deprecated - * - * @see [no-duplicate-imports](https://typescript-eslint.io/rules/no-duplicate-imports) - */ - '@typescript-eslint/no-duplicate-imports': NoDuplicateImportsRuleConfig; -} diff --git a/src/rules/typescript-eslint/no-implicit-any-catch.d.ts b/src/rules/typescript-eslint/no-implicit-any-catch.d.ts deleted file mode 100644 index 5d1a9c43..00000000 --- a/src/rules/typescript-eslint/no-implicit-any-catch.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Option. - */ -export interface NoImplicitAnyCatchOption { - /** - * Whether to disallow specifying `: any` as the error type as well. See also `no-explicit-any`. - */ - allowExplicitAny?: boolean; -} - -/** - * Options. - */ -export type NoImplicitAnyCatchOptions = [NoImplicitAnyCatchOption?]; - -/** - * Disallow usage of the implicit `any` type in catch clauses. - * - * @deprecated - * - * @see [no-implicit-any-catch](https://typescript-eslint.io/rules/no-implicit-any-catch) - */ -export type NoImplicitAnyCatchRuleConfig = - RuleConfig; - -/** - * Disallow usage of the implicit `any` type in catch clauses. - * - * @deprecated - * - * @see [no-implicit-any-catch](https://typescript-eslint.io/rules/no-implicit-any-catch) - */ -export interface NoImplicitAnyCatchRule { - /** - * Disallow usage of the implicit `any` type in catch clauses. - * - * @deprecated - * - * @see [no-implicit-any-catch](https://typescript-eslint.io/rules/no-implicit-any-catch) - */ - '@typescript-eslint/no-implicit-any-catch': NoImplicitAnyCatchRuleConfig; -} diff --git a/src/rules/typescript-eslint/no-misused-promises.d.ts b/src/rules/typescript-eslint/no-misused-promises.d.ts index c8afa528..8acc74be 100644 --- a/src/rules/typescript-eslint/no-misused-promises.d.ts +++ b/src/rules/typescript-eslint/no-misused-promises.d.ts @@ -15,7 +15,6 @@ export interface NoMisusedPromisesOption { variables?: boolean; }; checksSpreads?: boolean; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/no-parameter-properties.d.ts b/src/rules/typescript-eslint/no-parameter-properties.d.ts deleted file mode 100644 index 1998ac87..00000000 --- a/src/rules/typescript-eslint/no-parameter-properties.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Option. - */ -export interface NoParameterPropertiesOption { - /** - * @minItems 1 - */ - allows?: [ - ( - | 'readonly' - | 'private' - | 'protected' - | 'public' - | 'private readonly' - | 'protected readonly' - | 'public readonly' - ), - ...( - | 'readonly' - | 'private' - | 'protected' - | 'public' - | 'private readonly' - | 'protected readonly' - | 'public readonly' - )[], - ]; -} - -/** - * Options. - */ -export type NoParameterPropertiesOptions = [NoParameterPropertiesOption?]; - -/** - * Disallow the use of parameter properties in class constructors. - * - * @deprecated - * - * @see [no-parameter-properties](https://typescript-eslint.io/rules/no-parameter-properties) - */ -export type NoParameterPropertiesRuleConfig = - RuleConfig; - -/** - * Disallow the use of parameter properties in class constructors. - * - * @deprecated - * - * @see [no-parameter-properties](https://typescript-eslint.io/rules/no-parameter-properties) - */ -export interface NoParameterPropertiesRule { - /** - * Disallow the use of parameter properties in class constructors. - * - * @deprecated - * - * @see [no-parameter-properties](https://typescript-eslint.io/rules/no-parameter-properties) - */ - '@typescript-eslint/no-parameter-properties': NoParameterPropertiesRuleConfig; -} diff --git a/src/rules/typescript-eslint/no-type-alias.d.ts b/src/rules/typescript-eslint/no-type-alias.d.ts index 78ffdd85..6ea6ac10 100644 --- a/src/rules/typescript-eslint/no-type-alias.d.ts +++ b/src/rules/typescript-eslint/no-type-alias.d.ts @@ -66,6 +66,8 @@ export type NoTypeAliasOptions = [NoTypeAliasOption?]; /** * Disallow type aliases. * + * @deprecated + * * @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias) */ export type NoTypeAliasRuleConfig = RuleConfig; @@ -73,12 +75,16 @@ export type NoTypeAliasRuleConfig = RuleConfig; /** * Disallow type aliases. * + * @deprecated + * * @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias) */ export interface NoTypeAliasRule { /** * Disallow type aliases. * + * @deprecated + * * @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias) */ '@typescript-eslint/no-type-alias': NoTypeAliasRuleConfig; diff --git a/src/rules/typescript-eslint/no-unnecessary-type-assertion.d.ts b/src/rules/typescript-eslint/no-unnecessary-type-assertion.d.ts index 5cabbf65..c27d9d2a 100644 --- a/src/rules/typescript-eslint/no-unnecessary-type-assertion.d.ts +++ b/src/rules/typescript-eslint/no-unnecessary-type-assertion.d.ts @@ -8,7 +8,6 @@ export interface NoUnnecessaryTypeAssertionOption { * A list of type names to ignore. */ typesToIgnore?: string[]; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/parameter-properties.d.ts b/src/rules/typescript-eslint/parameter-properties.d.ts index 591a9a47..aaab3f7b 100644 --- a/src/rules/typescript-eslint/parameter-properties.d.ts +++ b/src/rules/typescript-eslint/parameter-properties.d.ts @@ -3,30 +3,17 @@ import type { RuleConfig } from '../rule-config'; /** * Option. */ +export type Modifier = + | 'readonly' + | 'private' + | 'protected' + | 'public' + | 'private readonly' + | 'protected readonly' + | 'public readonly'; + export interface ParameterPropertiesOption { - /** - * @minItems 1 - */ - allow?: [ - ( - | 'readonly' - | 'private' - | 'protected' - | 'public' - | 'private readonly' - | 'protected readonly' - | 'public readonly' - ), - ...( - | 'readonly' - | 'private' - | 'protected' - | 'public' - | 'private readonly' - | 'protected readonly' - | 'public readonly' - )[], - ]; + allow?: Modifier[]; prefer?: 'class-property' | 'parameter-property'; } diff --git a/src/rules/typescript-eslint/prefer-readonly.d.ts b/src/rules/typescript-eslint/prefer-readonly.d.ts index 2652ba16..402a6089 100644 --- a/src/rules/typescript-eslint/prefer-readonly.d.ts +++ b/src/rules/typescript-eslint/prefer-readonly.d.ts @@ -5,7 +5,6 @@ import type { RuleConfig } from '../rule-config'; */ export interface PreferReadonlyOption { onlyInlineLambdas?: boolean; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/require-array-sort-compare.d.ts b/src/rules/typescript-eslint/require-array-sort-compare.d.ts index 18604cbb..d819c9c9 100644 --- a/src/rules/typescript-eslint/require-array-sort-compare.d.ts +++ b/src/rules/typescript-eslint/require-array-sort-compare.d.ts @@ -8,7 +8,6 @@ export interface RequireArraySortCompareOption { * Whether to ignore arrays in which all elements are strings. */ ignoreStringArrays?: boolean; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/restrict-template-expressions.d.ts b/src/rules/typescript-eslint/restrict-template-expressions.d.ts index 86708ffd..6cacd7e8 100644 --- a/src/rules/typescript-eslint/restrict-template-expressions.d.ts +++ b/src/rules/typescript-eslint/restrict-template-expressions.d.ts @@ -28,7 +28,6 @@ export interface RestrictTemplateExpressionsOption { * Whether to allow `never` typed values in template expressions. */ allowNever?: boolean; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/sort-type-constituents.d.ts b/src/rules/typescript-eslint/sort-type-constituents.d.ts index 70b02d54..49cb4f3a 100644 --- a/src/rules/typescript-eslint/sort-type-constituents.d.ts +++ b/src/rules/typescript-eslint/sort-type-constituents.d.ts @@ -29,7 +29,6 @@ export interface SortTypeConstituentsOption { | 'tuple' | 'union' )[]; - [k: string]: any; } /** diff --git a/src/rules/typescript-eslint/sort-type-union-intersection-members.d.ts b/src/rules/typescript-eslint/sort-type-union-intersection-members.d.ts deleted file mode 100644 index 78ed4674..00000000 --- a/src/rules/typescript-eslint/sort-type-union-intersection-members.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -import type { RuleConfig } from '../rule-config'; - -/** - * Option. - */ -export interface SortTypeUnionIntersectionMembersOption { - /** - * Whether to check intersection types. - */ - checkIntersections?: boolean; - /** - * Whether to check union types. - */ - checkUnions?: boolean; - /** - * Ordering of the groups. - */ - groupOrder?: ( - | 'conditional' - | 'function' - | 'import' - | 'intersection' - | 'keyword' - | 'nullish' - | 'literal' - | 'named' - | 'object' - | 'operator' - | 'tuple' - | 'union' - )[]; - [k: string]: any; -} - -/** - * Options. - */ -export type SortTypeUnionIntersectionMembersOptions = [ - SortTypeUnionIntersectionMembersOption?, -]; - -/** - * Enforce members of a type union/intersection to be sorted alphabetically. - * - * @deprecated - * - * @see [sort-type-union-intersection-members](https://typescript-eslint.io/rules/sort-type-union-intersection-members) - */ -export type SortTypeUnionIntersectionMembersRuleConfig = - RuleConfig; - -/** - * Enforce members of a type union/intersection to be sorted alphabetically. - * - * @deprecated - * - * @see [sort-type-union-intersection-members](https://typescript-eslint.io/rules/sort-type-union-intersection-members) - */ -export interface SortTypeUnionIntersectionMembersRule { - /** - * Enforce members of a type union/intersection to be sorted alphabetically. - * - * @deprecated - * - * @see [sort-type-union-intersection-members](https://typescript-eslint.io/rules/sort-type-union-intersection-members) - */ - '@typescript-eslint/sort-type-union-intersection-members': SortTypeUnionIntersectionMembersRuleConfig; -} diff --git a/src/rules/typescript-eslint/type-annotation-spacing.d.ts b/src/rules/typescript-eslint/type-annotation-spacing.d.ts index 5295b521..7417ef55 100644 --- a/src/rules/typescript-eslint/type-annotation-spacing.d.ts +++ b/src/rules/typescript-eslint/type-annotation-spacing.d.ts @@ -7,32 +7,18 @@ export interface TypeAnnotationSpacingOption { before?: boolean; after?: boolean; overrides?: { - colon?: { - before?: boolean; - after?: boolean; - }; - arrow?: { - before?: boolean; - after?: boolean; - }; - variable?: { - before?: boolean; - after?: boolean; - }; - parameter?: { - before?: boolean; - after?: boolean; - }; - property?: { - before?: boolean; - after?: boolean; - }; - returnType?: { - before?: boolean; - after?: boolean; - }; + colon?: SpacingConfig; + arrow?: SpacingConfig; + variable?: SpacingConfig; + parameter?: SpacingConfig; + property?: SpacingConfig; + returnType?: SpacingConfig; }; } +export interface SpacingConfig { + before?: boolean; + after?: boolean; +} /** * Options. diff --git a/src/rules/typescript-eslint/typedef.d.ts b/src/rules/typescript-eslint/typedef.d.ts index 079cecb8..67db65d6 100644 --- a/src/rules/typescript-eslint/typedef.d.ts +++ b/src/rules/typescript-eslint/typedef.d.ts @@ -12,7 +12,6 @@ export interface TypedefOption { propertyDeclaration?: boolean; variableDeclaration?: boolean; variableDeclarationIgnoreFunction?: boolean; - [k: string]: any; } /** diff --git a/src/rules/vitest/valid-title.d.ts b/src/rules/vitest/valid-title.d.ts index 67dbd4ca..834ac9b5 100644 --- a/src/rules/vitest/valid-title.d.ts +++ b/src/rules/vitest/valid-title.d.ts @@ -7,8 +7,6 @@ export interface ValidTitleOption { ignoreTypeOfDescribeName?: boolean; allowArguments?: boolean; disallowedWords?: string[]; - /** - */ [k: string]: any; }