@nyxb/eslint-define-config
Version:
Provide a defineConfig function for .eslintrc.js files
50,198 lines • 1.38 MB
TypeScript
import { ESLintMdxSettings } from 'eslint-plugin-mdx';
import { Linter, ESLint } from 'eslint';
/**
* A literal type that supports custom further strings but preserves autocompletion in IDEs.
*
* @see [copied from issue](https://github.com/microsoft/TypeScript/issues/29729#issuecomment-471566609)
*/
type LiteralUnion<Union extends Base, Base = string> =
| Union
| (Base & { zz_IGNORE_ME?: never });
// Some types copied from `@types/eslint` `Linter.ParserOptions`
/**
* Any valid ECMAScript version number or 'latest':
*
* - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ...
* - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ...
* - 'latest'
*
* @see https://typescript-eslint.io/architecture/parser/#ecmaversion
*/
type EcmaVersion =
| 3
| 5
| 6
| 7
| 8
| 9
| 10
| 11
| 12
| 13
| 14
| 2015
| 2016
| 2017
| 2018
| 2019
| 2020
| 2021
| 2022
| 2023
| 'latest';
/**
* Set to "script" (default) or "module" if your code is in ECMAScript modules.
*/
type SourceType = 'script' | 'module';
/**
* An object indicating which additional language features you'd like to use.
*
* @see https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options
* @see https://typescript-eslint.io/architecture/parser#ecmafeatures
*/
interface EcmaFeatures extends Partial<Record<string, boolean>> {
/**
* Allow `return` statements in the global scope.
*/
globalReturn?: boolean;
/**
* Enable global [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) (if `ecmaVersion` is 5 or greater).
*/
impliedStrict?: boolean;
/**
* Enable [JSX](https://facebook.github.io/jsx).
*/
jsx?: boolean;
}
/** Lib. */
type Lib = LiteralUnion<
| 'es5'
| 'es6'
| 'es2015'
| 'es7'
| 'es2016'
| 'es2017'
| 'es2018'
| 'es2019'
| 'es2020'
| 'esnext'
| 'dom'
| 'dom.iterable'
| 'webworker'
| 'webworker.importscripts'
| 'webworker.iterable'
| 'scripthost'
| 'es2015.core'
| 'es2015.collection'
| 'es2015.generator'
| 'es2015.iterable'
| 'es2015.promise'
| 'es2015.proxy'
| 'es2015.reflect'
| 'es2015.symbol'
| 'es2015.symbol.wellknown'
| 'es2016.array.include'
| 'es2017.object'
| 'es2017.sharedmemory'
| 'es2017.string'
| 'es2017.intl'
| 'es2017.typedarrays'
| 'es2018.asyncgenerator'
| 'es2018.asynciterable'
| 'es2018.intl'
| 'es2018.promise'
| 'es2018.regexp'
| 'es2019.array'
| 'es2019.object'
| 'es2019.string'
| 'es2019.symbol'
| 'es2020.bigint'
| 'es2020.promise'
| 'es2020.sharedmemory'
| 'es2020.string'
| 'es2020.symbol.wellknown'
| 'es2020.intl'
| 'esnext.array'
| 'esnext.symbol'
| 'esnext.asynciterable'
| 'esnext.intl'
| 'esnext.bigint'
| 'esnext.string'
| 'esnext.promise'
| 'esnext.weakref'
| 'es2016.full'
| 'es2017.full'
| 'es2018.full'
| 'es2019.full'
| 'es2020.full'
| 'esnext.full'
| 'lib'
>;
/** DebugLevel. */
type DebugLevel =
| boolean
| Array<'eslint' | 'typescript' | 'typescript-eslint'>;
/** Parser. */
type Parser = LiteralUnion<
| 'babel-eslint'
| '@typescript-eslint/parser'
| 'jsonc-eslint-parser'
| 'vue-eslint-parser'
>;
/**
* Parser options.
*
* @see [Specifying Parser Options](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options)
*/
interface ParserOptions extends Partial<Record<string, unknown>> {
/**
* Accepts any valid ECMAScript version number or `'latest'`:
*
* - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or
* - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or
* - `'latest'`
*
* When it's a version or a year, the value must be a number - so do not include the `es` prefix.
*
* Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default
*
* @default 2018
*
* @see https://typescript-eslint.io/architecture/parser/#ecmaversion
*/
ecmaVersion?: EcmaVersion;
/**
* Set to "script" (default) or "module" if your code is in ECMAScript modules.
*
* @default 'script'
*
* @see https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options
*/
sourceType?: SourceType;
/**
* An object indicating which additional language features you'd like to use.
*
* @see https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options
* @see https://typescript-eslint.io/architecture/parser#ecmafeatures
*/
ecmaFeatures?: EcmaFeatures;
/**
* The identifier that's used for JSX Elements creation (after transpilation).
* If you're using a library other than React (like `preact`), then you should change this value.
* If you are using the [new JSX transform](https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) you can set this to `null`.
*
* This should not be a member expression - just the root identifier (i.e. use `"React"` instead of `"React.createElement"`).
*
* If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
*
* @default 'React'
*
* @see [jsxPragma](https://typescript-eslint.io/architecture/parser#jsxpragma)
*/
jsxPragma?: string;
/**
* The identifier that's used for JSX fragment elements (after transpilation).
* If `null`, assumes transpilation will always use a member of the configured `jsxPragma`.
* This should not be a member expression - just the root identifier (i.e. use `"h"` instead of `"h.Fragment"`).
*
* If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
*
* @default null
*
* @see [jsxFragmentName](https://typescript-eslint.io/architecture/parser#jsxfragmentname)
*/
jsxFragmentName?: string | null;
/**
* For valid options, see the [TypeScript compiler options](https://www.typescriptlang.org/tsconfig#lib).
*
* Specifies the TypeScript `libs` that are available.
* This is used by the scope analyser to ensure there are global variables declared for the types exposed by TypeScript.
*
* If you provide `parserOptions.project`, you do not need to set this, as it will automatically detected from the compiler.
*
* @default ['es2018']
*
* @see [lib](https://typescript-eslint.io/architecture/parser/#lib)
*/
lib?: Lib[];
comment?: boolean;
debugLevel?: DebugLevel;
errorOnTypeScriptSyntacticAndSemanticIssues?: boolean;
errorOnUnknownASTType?: boolean;
/**
* This option allows you to provide one or more additional file extensions which should be considered in the TypeScript Program compilation.
*
* The default extensions are `.ts`, `.tsx`, `.js`, and `.jsx`. Add extensions starting with `.`, followed by the file extension.
* E.g. for a `.vue` file use `"extraFileExtensions: [".vue"]`.
*
* @see [extraFileExtensions](https://typescript-eslint.io/architecture/parser/#extrafileextensions)
*/
extraFileExtensions?: string[];
filePath?: string;
loc?: boolean;
/**
* Parser.
*
* @see [Working with Custom Parsers](https://eslint.org/docs/developer-guide/working-with-custom-parsers)
* @see [Specifying Parser](https://eslint.org/docs/user-guide/configuring/plugins#specifying-parser)
*/
parser?: Parser;
/**
* This option allows you to provide a path to your project's `tsconfig.json`.
* **This setting is required if you want to use rules which require type information.**
* Relative paths are interpreted relative to the current working directory if `tsconfigRootDir` is not set.
* If you intend on running ESLint from directories other than the project root, you should consider using `tsconfigRootDir`.
*
* @default undefined
*
* @see [project](https://typescript-eslint.io/architecture/parser/#project)
*/
project?: string | string[] | true | null;
/**
* This option allows you to ignore folders from being included in your provided list of `project`s.
* This is useful if you have configured glob patterns, but want to make sure you ignore certain folders.
*
* It accepts an array of globs to exclude from the `project` globs.
*
* For example, by default it will ensure that a glob like `./**/tsconfig.json` will not match any `tsconfigs` within your `node_modules` folder (some npm packages do not exclude their source files from their published packages).
*
* @default ['**/node_modules/**']
*
* @see [projectFolderIgnoreList](https://typescript-eslint.io/architecture/parser/#projectfolderignorelist)
*/
projectFolderIgnoreList?: Array<string | RegExp>;
range?: boolean;
tokens?: boolean;
/**
* This option allows you to provide the root directory for relative tsconfig paths specified in the `project` option above.
*
* @see [tsconfigRootDir](https://typescript-eslint.io/architecture/parser/#tsconfigrootdir)
*/
tsconfigRootDir?: string;
useJSXTextNode?: boolean;
/**
* This option allows you to toggle the warning that the parser will give you if you use a version of TypeScript which is not explicitly supported.
*
* @default true
*
* @see [warnOnUnsupportedTypeScriptVersion](https://typescript-eslint.io/architecture/parser/#warnonunsupportedtypescriptversion)
*/
warnOnUnsupportedTypeScriptVersion?: boolean;
/**
* This option allow you to tell parser to act as if `emitDecoratorMetadata: true` is set in `tsconfig.json`, but without [type-aware linting](https://typescript-eslint.io/linting/typed-linting).
* In other words, you don't have to specify `parserOptions.project` in this case, making the linting process faster.
*
* @default undefined
*
* @see [emitDecoratorMetadata](https://typescript-eslint.io/architecture/parser/#emitdecoratormetadata)
*/
emitDecoratorMetadata?: boolean;
/**
* @see [vueFeatures](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeatures)
*/
vueFeatures?: {
/**
* You can use `parserOptions.vueFeatures.filter` property to specify whether to parse the Vue2 filter.
*
* If you specify `false`, the parser does not parse `|` as a filter.
*
* @see [filter](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeaturesfilter)
*/
filter?: boolean;
/**
* You can use `parserOptions.vueFeatures.interpolationAsNonHTML` property to specify whether to parse the interpolation as HTML.
*
* If you specify `true`, the parser handles the interpolation as non-HTML (However, you can use HTML escaping in the interpolation).
*
* @see [interpolationAsNonHTML](https://github.com/vuejs/vue-eslint-parser#parseroptionsvuefeaturesinterpolationasnonhtml)
*/
interpolationAsNonHTML?: boolean;
};
/**
* @see [templateTokenizer](https://github.com/rashfael/eslint-plugin-vue-pug#usage)
*/
templateTokenizer?: {
pug?: LiteralUnion<'vue-eslint-parser-template-tokenizer-pug'>;
};
}
type Unprefix<T extends Record<string, any>, Pre extends string> = {
[K in keyof T as K extends `${Pre}${infer U}` ? U : never]: T[K];
};
type Prefix<T extends Record<string, any>, Pre extends string> = {
[K in keyof T as `${Pre}${K}`]: T[K];
};
type RenamePrefix<T extends Record<string, any>, Old extends string, New extends string> = Prefix<Unprefix<T, Old>, New>;
type MergeIntersection<T extends Record<any, any>> = {
[K in keyof T]: T[K];
};
// Synced to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/042141ce5f77f36df01c344ad09f32feda26c4fd/types/eslint/index.d.ts#L714-L716
/**
* Rule ordinal severity.
*/
type Severity = 0 | 1 | 2;
/**
* Rule severity.
*/
type RuleLevel = Severity | 'off' | 'warn' | 'error';
/**
* Rule severity.
*
* @alias RuleLevel
*/
type RuleSeverity = RuleLevel;
// Synced to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/042141ce5f77f36df01c344ad09f32feda26c4fd/types/eslint/helpers.d.ts#L1-L3
type Prepend<Tuple extends any[], Addend> = ((
_: Addend,
..._1: Tuple
) => any) extends (..._: infer Result) => any
? Result
: never;
// Synced to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/042141ce5f77f36df01c344ad09f32feda26c4fd/types/eslint/index.d.ts#L717-L719
/**
* Rule configuration.
*/
type RuleLevelAndOptions<Options extends any[] = any[]> = Prepend<
Partial<Options>,
RuleLevel
>;
type RuleEntry<Options extends any[] = any[]> =
| RuleLevel
| RuleLevelAndOptions<Options>;
/**
* Rule configuration.
*
* @alias RuleEntry
*/
type RuleConfig<Options extends any[] = any[]> = RuleEntry<Options>;
/**
* Do not use deprecated APIs.
*
* @see [deprecation](https://github.com/gund/eslint-plugin-deprecation)
*/
type DeprecationRuleConfig = RuleConfig<[]>;
/**
* Do not use deprecated APIs.
*
* @see [deprecation](https://github.com/gund/eslint-plugin-deprecation)
*/
interface DeprecationRule {
/**
* Do not use deprecated APIs.
*
* @see [deprecation](https://github.com/gund/eslint-plugin-deprecation)
*/
'deprecation/deprecation': DeprecationRuleConfig;
}
/**
* All Deprecation rules.
*/
type DeprecationRules = DeprecationRule;
/**
* Option.
*/
interface AccessorPairsOption {
getWithoutSet?: boolean;
setWithoutGet?: boolean;
enforceForClassMembers?: boolean;
}
/**
* Options.
*/
type AccessorPairsOptions = [AccessorPairsOption?];
/**
* Enforce getter and setter pairs in objects and classes.
*
* @see [accessor-pairs](https://eslint.org/docs/latest/rules/accessor-pairs)
*/
type AccessorPairsRuleConfig = RuleConfig<AccessorPairsOptions>;
/**
* Enforce getter and setter pairs in objects and classes.
*
* @see [accessor-pairs](https://eslint.org/docs/latest/rules/accessor-pairs)
*/
interface AccessorPairsRule {
/**
* Enforce getter and setter pairs in objects and classes.
*
* @see [accessor-pairs](https://eslint.org/docs/latest/rules/accessor-pairs)
*/
'accessor-pairs': AccessorPairsRuleConfig;
}
/**
* Option.
*/
type ArrayBracketNewlineOption$2 =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayBracketNewlineOptions$2 = [ArrayBracketNewlineOption$2?];
/**
* Enforce linebreaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://eslint.org/docs/latest/rules/array-bracket-newline)
*/
type ArrayBracketNewlineRuleConfig$2 =
RuleConfig<ArrayBracketNewlineOptions$2>;
/**
* Enforce linebreaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://eslint.org/docs/latest/rules/array-bracket-newline)
*/
interface ArrayBracketNewlineRule$2 {
/**
* Enforce linebreaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://eslint.org/docs/latest/rules/array-bracket-newline)
*/
'array-bracket-newline': ArrayBracketNewlineRuleConfig$2;
}
/**
* Config.
*/
interface ArrayBracketSpacingConfig$2 {
singleValue?: boolean;
objectsInArrays?: boolean;
arraysInArrays?: boolean;
}
/**
* Option.
*/
type ArrayBracketSpacingOption$2 = 'always' | 'never';
/**
* Options.
*/
type ArrayBracketSpacingOptions$2 = [
ArrayBracketSpacingOption$2?,
ArrayBracketSpacingConfig$2?,
];
/**
* Enforce consistent spacing inside array brackets.
*
* @see [array-bracket-spacing](https://eslint.org/docs/latest/rules/array-bracket-spacing)
*/
type ArrayBracketSpacingRuleConfig$2 =
RuleConfig<ArrayBracketSpacingOptions$2>;
/**
* Enforce consistent spacing inside array brackets.
*
* @see [array-bracket-spacing](https://eslint.org/docs/latest/rules/array-bracket-spacing)
*/
interface ArrayBracketSpacingRule$2 {
/**
* Enforce consistent spacing inside array brackets.
*
* @see [array-bracket-spacing](https://eslint.org/docs/latest/rules/array-bracket-spacing)
*/
'array-bracket-spacing': ArrayBracketSpacingRuleConfig$2;
}
/**
* Option.
*/
interface ArrayCallbackReturnOption {
allowImplicit?: boolean;
checkForEach?: boolean;
allowVoid?: boolean;
}
/**
* Options.
*/
type ArrayCallbackReturnOptions = [ArrayCallbackReturnOption?];
/**
* Enforce `return` statements in callbacks of array methods.
*
* @see [array-callback-return](https://eslint.org/docs/latest/rules/array-callback-return)
*/
type ArrayCallbackReturnRuleConfig =
RuleConfig<ArrayCallbackReturnOptions>;
/**
* Enforce `return` statements in callbacks of array methods.
*
* @see [array-callback-return](https://eslint.org/docs/latest/rules/array-callback-return)
*/
interface ArrayCallbackReturnRule {
/**
* Enforce `return` statements in callbacks of array methods.
*
* @see [array-callback-return](https://eslint.org/docs/latest/rules/array-callback-return)
*/
'array-callback-return': ArrayCallbackReturnRuleConfig;
}
/**
* Option.
*/
type ArrayElementNewlineOption$2 =
| []
| [
| BasicConfig$3
| {
ArrayExpression?: BasicConfig$3;
ArrayPattern?: BasicConfig$3;
},
];
type BasicConfig$3 =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayElementNewlineOptions$2 = ArrayElementNewlineOption$2;
/**
* Enforce line breaks after each array element.
*
* @see [array-element-newline](https://eslint.org/docs/latest/rules/array-element-newline)
*/
type ArrayElementNewlineRuleConfig$2 =
RuleConfig<ArrayElementNewlineOptions$2>;
/**
* Enforce line breaks after each array element.
*
* @see [array-element-newline](https://eslint.org/docs/latest/rules/array-element-newline)
*/
interface ArrayElementNewlineRule$2 {
/**
* Enforce line breaks after each array element.
*
* @see [array-element-newline](https://eslint.org/docs/latest/rules/array-element-newline)
*/
'array-element-newline': ArrayElementNewlineRuleConfig$2;
}
/**
* Option.
*/
type ArrowBodyStyleOption =
| []
| ['always' | 'never']
| []
| ['as-needed']
| [
'as-needed',
{
requireReturnForObjectLiteral?: boolean;
},
];
/**
* Options.
*/
type ArrowBodyStyleOptions = ArrowBodyStyleOption;
/**
* Require braces around arrow function bodies.
*
* @see [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style)
*/
type ArrowBodyStyleRuleConfig = RuleConfig<ArrowBodyStyleOptions>;
/**
* Require braces around arrow function bodies.
*
* @see [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style)
*/
interface ArrowBodyStyleRule {
/**
* Require braces around arrow function bodies.
*
* @see [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style)
*/
'arrow-body-style': ArrowBodyStyleRuleConfig;
}
/**
* Config.
*/
interface ArrowParensConfig {
requireForBlockBody?: boolean;
}
/**
* Option.
*/
type ArrowParensOption = 'always' | 'as-needed';
/**
* Options.
*/
type ArrowParensOptions = [ArrowParensOption?, ArrowParensConfig?];
/**
* Require parentheses around arrow function arguments.
*
* @see [arrow-parens](https://eslint.org/docs/latest/rules/arrow-parens)
*/
type ArrowParensRuleConfig = RuleConfig<ArrowParensOptions>;
/**
* Require parentheses around arrow function arguments.
*
* @see [arrow-parens](https://eslint.org/docs/latest/rules/arrow-parens)
*/
interface ArrowParensRule {
/**
* Require parentheses around arrow function arguments.
*
* @see [arrow-parens](https://eslint.org/docs/latest/rules/arrow-parens)
*/
'arrow-parens': ArrowParensRuleConfig;
}
/**
* Option.
*/
interface ArrowSpacingOption$1 {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type ArrowSpacingOptions$1 = [ArrowSpacingOption$1?];
/**
* Enforce consistent spacing before and after the arrow in arrow functions.
*
* @see [arrow-spacing](https://eslint.org/docs/latest/rules/arrow-spacing)
*/
type ArrowSpacingRuleConfig$1 = RuleConfig<ArrowSpacingOptions$1>;
/**
* Enforce consistent spacing before and after the arrow in arrow functions.
*
* @see [arrow-spacing](https://eslint.org/docs/latest/rules/arrow-spacing)
*/
interface ArrowSpacingRule$1 {
/**
* Enforce consistent spacing before and after the arrow in arrow functions.
*
* @see [arrow-spacing](https://eslint.org/docs/latest/rules/arrow-spacing)
*/
'arrow-spacing': ArrowSpacingRuleConfig$1;
}
/**
* Enforce the use of variables within the scope they are defined.
*
* @see [block-scoped-var](https://eslint.org/docs/latest/rules/block-scoped-var)
*/
type BlockScopedVarRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of variables within the scope they are defined.
*
* @see [block-scoped-var](https://eslint.org/docs/latest/rules/block-scoped-var)
*/
interface BlockScopedVarRule {
/**
* Enforce the use of variables within the scope they are defined.
*
* @see [block-scoped-var](https://eslint.org/docs/latest/rules/block-scoped-var)
*/
'block-scoped-var': BlockScopedVarRuleConfig;
}
/**
* Option.
*/
type BlockSpacingOption$2 = 'always' | 'never';
/**
* Options.
*/
type BlockSpacingOptions$2 = [BlockSpacingOption$2?];
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://eslint.org/docs/latest/rules/block-spacing)
*/
type BlockSpacingRuleConfig$2 = RuleConfig<BlockSpacingOptions$2>;
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://eslint.org/docs/latest/rules/block-spacing)
*/
interface BlockSpacingRule$2 {
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://eslint.org/docs/latest/rules/block-spacing)
*/
'block-spacing': BlockSpacingRuleConfig$2;
}
/**
* Config.
*/
interface BraceStyleConfig$2 {
allowSingleLine?: boolean;
}
/**
* Option.
*/
type BraceStyleOption$2 = '1tbs' | 'stroustrup' | 'allman';
/**
* Options.
*/
type BraceStyleOptions$2 = [BraceStyleOption$2?, BraceStyleConfig$2?];
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://eslint.org/docs/latest/rules/brace-style)
*/
type BraceStyleRuleConfig$2 = RuleConfig<BraceStyleOptions$2>;
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://eslint.org/docs/latest/rules/brace-style)
*/
interface BraceStyleRule$2 {
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://eslint.org/docs/latest/rules/brace-style)
*/
'brace-style': BraceStyleRuleConfig$2;
}
/**
* Option.
*/
type CallbackReturnOption$2 = string[];
/**
* Options.
*/
type CallbackReturnOptions$2 = [CallbackReturnOption$2?];
/**
* Require `return` statements after callbacks.
*
* @deprecated
*
* @see [callback-return](https://eslint.org/docs/latest/rules/callback-return)
*/
type CallbackReturnRuleConfig$2 = RuleConfig<CallbackReturnOptions$2>;
/**
* Require `return` statements after callbacks.
*
* @deprecated
*
* @see [callback-return](https://eslint.org/docs/latest/rules/callback-return)
*/
interface CallbackReturnRule$2 {
/**
* Require `return` statements after callbacks.
*
* @deprecated
*
* @see [callback-return](https://eslint.org/docs/latest/rules/callback-return)
*/
'callback-return': CallbackReturnRuleConfig$2;
}
/**
* Option.
*/
interface CamelcaseOption$1 {
ignoreDestructuring?: boolean;
ignoreImports?: boolean;
ignoreGlobals?: boolean;
properties?: 'always' | 'never';
/**
* @minItems 0
*/
allow?: [] | [string];
}
/**
* Options.
*/
type CamelcaseOptions$1 = [CamelcaseOption$1?];
/**
* Enforce camelcase naming convention.
*
* @see [camelcase](https://eslint.org/docs/latest/rules/camelcase)
*/
type CamelcaseRuleConfig$1 = RuleConfig<CamelcaseOptions$1>;
/**
* Enforce camelcase naming convention.
*
* @see [camelcase](https://eslint.org/docs/latest/rules/camelcase)
*/
interface CamelcaseRule$1 {
/**
* Enforce camelcase naming convention.
*
* @see [camelcase](https://eslint.org/docs/latest/rules/camelcase)
*/
camelcase: CamelcaseRuleConfig$1;
}
/**
* Config.
*/
type CapitalizedCommentsConfig =
| {
ignorePattern?: string;
ignoreInlineComments?: boolean;
ignoreConsecutiveComments?: boolean;
}
| {
line?: {
ignorePattern?: string;
ignoreInlineComments?: boolean;
ignoreConsecutiveComments?: boolean;
};
block?: {
ignorePattern?: string;
ignoreInlineComments?: boolean;
ignoreConsecutiveComments?: boolean;
};
};
/**
* Option.
*/
type CapitalizedCommentsOption = 'always' | 'never';
/**
* Options.
*/
type CapitalizedCommentsOptions = [
CapitalizedCommentsOption?,
CapitalizedCommentsConfig?,
];
/**
* Enforce or disallow capitalization of the first letter of a comment.
*
* @see [capitalized-comments](https://eslint.org/docs/latest/rules/capitalized-comments)
*/
type CapitalizedCommentsRuleConfig =
RuleConfig<CapitalizedCommentsOptions>;
/**
* Enforce or disallow capitalization of the first letter of a comment.
*
* @see [capitalized-comments](https://eslint.org/docs/latest/rules/capitalized-comments)
*/
interface CapitalizedCommentsRule {
/**
* Enforce or disallow capitalization of the first letter of a comment.
*
* @see [capitalized-comments](https://eslint.org/docs/latest/rules/capitalized-comments)
*/
'capitalized-comments': CapitalizedCommentsRuleConfig;
}
/**
* Option.
*/
interface ClassMethodsUseThisOption$1 {
exceptMethods?: string[];
enforceForClassFields?: boolean;
}
/**
* Options.
*/
type ClassMethodsUseThisOptions$1 = [ClassMethodsUseThisOption$1?];
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://eslint.org/docs/latest/rules/class-methods-use-this)
*/
type ClassMethodsUseThisRuleConfig$1 =
RuleConfig<ClassMethodsUseThisOptions$1>;
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://eslint.org/docs/latest/rules/class-methods-use-this)
*/
interface ClassMethodsUseThisRule$1 {
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://eslint.org/docs/latest/rules/class-methods-use-this)
*/
'class-methods-use-this': ClassMethodsUseThisRuleConfig$1;
}
/**
* Option.
*/
type CommaDangleOption$3 =
| []
| [
| Value$4
| {
arrays?: ValueWithIgnore$3;
objects?: ValueWithIgnore$3;
imports?: ValueWithIgnore$3;
exports?: ValueWithIgnore$3;
functions?: ValueWithIgnore$3;
},
];
type Value$4 = 'always-multiline' | 'always' | 'never' | 'only-multiline';
type ValueWithIgnore$3 =
| 'always-multiline'
| 'always'
| 'ignore'
| 'never'
| 'only-multiline';
/**
* Options.
*/
type CommaDangleOptions$3 = CommaDangleOption$3;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://eslint.org/docs/latest/rules/comma-dangle)
*/
type CommaDangleRuleConfig$3 = RuleConfig<CommaDangleOptions$3>;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://eslint.org/docs/latest/rules/comma-dangle)
*/
interface CommaDangleRule$3 {
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://eslint.org/docs/latest/rules/comma-dangle)
*/
'comma-dangle': CommaDangleRuleConfig$3;
}
/**
* Option.
*/
interface CommaSpacingOption$2 {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type CommaSpacingOptions$2 = [CommaSpacingOption$2?];
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://eslint.org/docs/latest/rules/comma-spacing)
*/
type CommaSpacingRuleConfig$2 = RuleConfig<CommaSpacingOptions$2>;
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://eslint.org/docs/latest/rules/comma-spacing)
*/
interface CommaSpacingRule$2 {
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://eslint.org/docs/latest/rules/comma-spacing)
*/
'comma-spacing': CommaSpacingRuleConfig$2;
}
/**
* Config.
*/
interface CommaStyleConfig$2 {
exceptions?: {
[k: string]: boolean;
};
}
/**
* Option.
*/
type CommaStyleOption$2 = 'first' | 'last';
/**
* Options.
*/
type CommaStyleOptions$2 = [CommaStyleOption$2?, CommaStyleConfig$2?];
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://eslint.org/docs/latest/rules/comma-style)
*/
type CommaStyleRuleConfig$2 = RuleConfig<CommaStyleOptions$2>;
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://eslint.org/docs/latest/rules/comma-style)
*/
interface CommaStyleRule$2 {
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://eslint.org/docs/latest/rules/comma-style)
*/
'comma-style': CommaStyleRuleConfig$2;
}
/**
* Option.
*/
type ComplexityOption =
| number
| {
maximum?: number;
max?: number;
};
/**
* Options.
*/
type ComplexityOptions = [ComplexityOption?];
/**
* Enforce a maximum cyclomatic complexity allowed in a program.
*
* @see [complexity](https://eslint.org/docs/latest/rules/complexity)
*/
type ComplexityRuleConfig = RuleConfig<ComplexityOptions>;
/**
* Enforce a maximum cyclomatic complexity allowed in a program.
*
* @see [complexity](https://eslint.org/docs/latest/rules/complexity)
*/
interface ComplexityRule {
/**
* Enforce a maximum cyclomatic complexity allowed in a program.
*
* @see [complexity](https://eslint.org/docs/latest/rules/complexity)
*/
complexity: ComplexityRuleConfig;
}
/**
* Config.
*/
interface ComputedPropertySpacingConfig {
enforceForClassMembers?: boolean;
}
/**
* Option.
*/
type ComputedPropertySpacingOption = 'always' | 'never';
/**
* Options.
*/
type ComputedPropertySpacingOptions = [
ComputedPropertySpacingOption?,
ComputedPropertySpacingConfig?,
];
/**
* Enforce consistent spacing inside computed property brackets.
*
* @see [computed-property-spacing](https://eslint.org/docs/latest/rules/computed-property-spacing)
*/
type ComputedPropertySpacingRuleConfig =
RuleConfig<ComputedPropertySpacingOptions>;
/**
* Enforce consistent spacing inside computed property brackets.
*
* @see [computed-property-spacing](https://eslint.org/docs/latest/rules/computed-property-spacing)
*/
interface ComputedPropertySpacingRule {
/**
* Enforce consistent spacing inside computed property brackets.
*
* @see [computed-property-spacing](https://eslint.org/docs/latest/rules/computed-property-spacing)
*/
'computed-property-spacing': ComputedPropertySpacingRuleConfig;
}
/**
* Option.
*/
interface ConsistentReturnOption {
treatUndefinedAsUnspecified?: boolean;
}
/**
* Options.
*/
type ConsistentReturnOptions = [ConsistentReturnOption?];
/**
* Require `return` statements to either always or never specify values.
*
* @see [consistent-return](https://eslint.org/docs/latest/rules/consistent-return)
*/
type ConsistentReturnRuleConfig = RuleConfig<ConsistentReturnOptions>;
/**
* Require `return` statements to either always or never specify values.
*
* @see [consistent-return](https://eslint.org/docs/latest/rules/consistent-return)
*/
interface ConsistentReturnRule {
/**
* Require `return` statements to either always or never specify values.
*
* @see [consistent-return](https://eslint.org/docs/latest/rules/consistent-return)
*/
'consistent-return': ConsistentReturnRuleConfig;
}
/**
* Option.
*/
type ConsistentThisOption = string[];
/**
* Options.
*/
type ConsistentThisOptions = ConsistentThisOption;
/**
* Enforce consistent naming when capturing the current execution context.
*
* @see [consistent-this](https://eslint.org/docs/latest/rules/consistent-this)
*/
type ConsistentThisRuleConfig = RuleConfig<ConsistentThisOptions>;
/**
* Enforce consistent naming when capturing the current execution context.
*
* @see [consistent-this](https://eslint.org/docs/latest/rules/consistent-this)
*/
interface ConsistentThisRule {
/**
* Enforce consistent naming when capturing the current execution context.
*
* @see [consistent-this](https://eslint.org/docs/latest/rules/consistent-this)
*/
'consistent-this': ConsistentThisRuleConfig;
}
/**
* Require `super()` calls in constructors.
*
* @see [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)
*/
type ConstructorSuperRuleConfig = RuleConfig<[]>;
/**
* Require `super()` calls in constructors.
*
* @see [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)
*/
interface ConstructorSuperRule {
/**
* Require `super()` calls in constructors.
*
* @see [constructor-super](https://eslint.org/docs/latest/rules/constructor-super)
*/
'constructor-super': ConstructorSuperRuleConfig;
}
/**
* Option.
*/
type CurlyOption =
| []
| ['all']
| []
| ['multi' | 'multi-line' | 'multi-or-nest']
| ['multi' | 'multi-line' | 'multi-or-nest', 'consistent'];
/**
* Options.
*/
type CurlyOptions = CurlyOption;
/**
* Enforce consistent brace style for all control statements.
*
* @see [curly](https://eslint.org/docs/latest/rules/curly)
*/
type CurlyRuleConfig = RuleConfig<CurlyOptions>;
/**
* Enforce consistent brace style for all control statements.
*
* @see [curly](https://eslint.org/docs/latest/rules/curly)
*/
interface CurlyRule {
/**
* Enforce consistent brace style for all control statements.
*
* @see [curly](https://eslint.org/docs/latest/rules/curly)
*/
curly: CurlyRuleConfig;
}
/**
* Option.
*/
interface DefaultCaseOption {
commentPattern?: string;
}
/**
* Options.
*/
type DefaultCaseOptions = [DefaultCaseOption?];
/**
* Require `default` cases in `switch` statements.
*
* @see [default-case](https://eslint.org/docs/latest/rules/default-case)
*/
type DefaultCaseRuleConfig = RuleConfig<DefaultCaseOptions>;
/**
* Require `default` cases in `switch` statements.
*
* @see [default-case](https://eslint.org/docs/latest/rules/default-case)
*/
interface DefaultCaseRule {
/**
* Require `default` cases in `switch` statements.
*
* @see [default-case](https://eslint.org/docs/latest/rules/default-case)
*/
'default-case': DefaultCaseRuleConfig;
}
/**
* Enforce default clauses in switch statements to be last.
*
* @see [default-case-last](https://eslint.org/docs/latest/rules/default-case-last)
*/
type DefaultCaseLastRuleConfig = RuleConfig<[]>;
/**
* Enforce default clauses in switch statements to be last.
*
* @see [default-case-last](https://eslint.org/docs/latest/rules/default-case-last)
*/
interface DefaultCaseLastRule {
/**
* Enforce default clauses in switch statements to be last.
*
* @see [default-case-last](https://eslint.org/docs/latest/rules/default-case-last)
*/
'default-case-last': DefaultCaseLastRuleConfig;
}
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://eslint.org/docs/latest/rules/default-param-last)
*/
type DefaultParamLastRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://eslint.org/docs/latest/rules/default-param-last)
*/
interface DefaultParamLastRule$1 {
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://eslint.org/docs/latest/rules/default-param-last)
*/
'default-param-last': DefaultParamLastRuleConfig$1;
}
/**
* Option.
*/
type DotLocationOption$1 = 'object' | 'property';
/**
* Options.
*/
type DotLocationOptions$1 = [DotLocationOption$1?];
/**
* Enforce consistent newlines before and after dots.
*
* @see [dot-location](https://eslint.org/docs/latest/rules/dot-location)
*/
type DotLocationRuleConfig$1 = RuleConfig<DotLocationOptions$1>;
/**
* Enforce consistent newlines before and after dots.
*
* @see [dot-location](https://eslint.org/docs/latest/rules/dot-location)
*/
interface DotLocationRule$1 {
/**
* Enforce consistent newlines before and after dots.
*
* @see [dot-location](https://eslint.org/docs/latest/rules/dot-location)
*/
'dot-location': DotLocationRuleConfig$1;
}
/**
* Option.
*/
interface DotNotationOption$2 {
allowKeywords?: boolean;
allowPattern?: string;
}
/**
* Options.
*/
type DotNotationOptions$2 = [DotNotationOption$2?];
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://eslint.org/docs/latest/rules/dot-notation)
*/
type DotNotationRuleConfig$2 = RuleConfig<DotNotationOptions$2>;
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://eslint.org/docs/latest/rules/dot-notation)
*/
interface DotNotationRule$2 {
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://eslint.org/docs/latest/rules/dot-notation)
*/
'dot-notation': DotNotationRuleConfig$2;
}
/**
* Option.
*/
type EolLastOption = 'always' | 'never' | 'unix' | 'windows';
/**
* Options.
*/
type EolLastOptions = [EolLastOption?];
/**
* Require or disallow newline at the end of files.
*
* @see [eol-last](https://eslint.org/docs/latest/rules/eol-last)
*/
type EolLastRuleConfig = RuleConfig<EolLastOptions>;
/**
* Require or disallow newline at the end of files.
*
* @see [eol-last](https://eslint.org/docs/latest/rules/eol-last)
*/
interface EolLastRule {
/**
* Require or disallow newline at the end of files.
*
* @see [eol-last](https://eslint.org/docs/latest/rules/eol-last)
*/
'eol-last': EolLastRuleConfig;
}
/**
* Option.
*/
type EqeqeqOption$1 =
| []
| ['always']
| [
'always',
{
null?: 'always' | 'never' | 'ignore';
},
]
| []
| ['smart' | 'allow-null'];
/**
* Options.
*/
type EqeqeqOptions$1 = EqeqeqOption$1;
/**
* Require the use of `===` and `!==`.
*
* @see [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)
*/
type EqeqeqRuleConfig$1 = RuleConfig<EqeqeqOptions$1>;
/**
* Require the use of `===` and `!==`.
*
* @see [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)
*/
interface EqeqeqRule$1 {
/**
* Require the use of `===` and `!==`.
*
* @see [eqeqeq](https://eslint.org/docs/latest/rules/eqeqeq)
*/
eqeqeq: EqeqeqRuleConfig$1;
}
/**
* Enforce "for" loop update clause moving the counter in the right direction.
*
* @see [for-direction](https://eslint.org/docs/latest/rules/for-direction)
*/
type ForDirectionRuleConfig = RuleConfig<[]>;
/**
* Enforce "for" loop update clause moving the counter in the right direction.
*
* @see [for-direction](https://eslint.org/docs/latest/rules/for-direction)
*/
interface ForDirectionRule {
/**
* Enforce "for" loop update clause moving the counter in the right direction.
*
* @see [for-direction](https://eslint.org/docs/latest/rules/for-direction)
*/
'for-direction': ForDirectionRuleConfig;
}
/**
* Option.
*/
type FuncCallSpacingOption$2 =
| []
| ['never']
| []
| ['always']
| [
'always',
{
allowNewlines?: boolean;
},
];
/**
* Options.
*/
type FuncCallSpacingOptions$2 = FuncCallSpacingOption$2;
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://eslint.org/docs/latest/rules/func-call-spacing)
*/
type FuncCallSpacingRuleConfig$2 = RuleConfig<FuncCallSpacingOptions$2>;
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://eslint.org/docs/latest/rules/func-call-spacing)
*/
interface FuncCallSpacingRule$2 {
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://eslint.org/docs/latest/rules/func-call-spacing)
*/
'func-call-spacing': FuncCallSpacingRuleConfig$2;
}
/**
* Option.
*/
type FuncNameMatchingOption =
| []
| ['always' | 'never']
| [
'always' | 'never',
{
considerPropertyDescriptor?: boolean;
includeCommonJSModuleExports?: boolean;
},
]
| []
| [
{
considerPropertyDescriptor?: boolean;
includeCommonJSModuleExports?: boolean;
},
];
/**
* Options.
*/
type FuncNameMatchingOptions = FuncNameMatchingOption;
/**
* Require function names to match the name of the variable or property to which they are assigned.
*
* @see [func-name-matching](https://eslint.org/docs/latest/rules/func-name-matching)
*/
type FuncNameMatchingRuleConfig = RuleConfig<FuncNameMatchingOptions>;
/**
* Require function names to match the name of the variable or property to which they are assigned.
*
* @see [func-name-matching](https://eslint.org/docs/latest/rules/func-name-matching)
*/
interface FuncNameMatchingRule {
/**
* Require function names to match the name of the variable or property to which they are assigned.
*
* @see [func-name-matching](https://eslint.org/docs/latest/rules/func-name-matching)
*/
'func-name-matching': FuncNameMatchingRuleConfig;
}
/**
* Option.
*/
type FuncNamesOption =
| []
| [Value$3]
| [
Value$3,
{
generators?: Value$3;
},
];
type Value$3 = 'always' | 'as-needed' | 'never';
/**
* Options.
*/
type FuncNamesOptions = FuncNamesOption;
/**
* Require or disallow named `function` expressions.
*
* @see [func-names](https://eslint.org/docs/latest/rules/func-names)
*/
type FuncNamesRuleConfig = RuleConfig<FuncNamesOptions>;
/**
* Require or disallow named `function` expressions.
*
* @see [func-names](https://eslint.org/docs/latest/rules/func-names)
*/
interface FuncNamesRule {
/**
* Require or disallow named `function` expressions.
*
* @see [func-names](https://eslint.org/docs/latest/rules/func-names)
*/
'func-names': FuncNamesRuleConfig;
}
/**
* Config.
*/
interface FuncStyleConfig {
allowArrowFunctions?: boolean;
}
/**
* Option.
*/
type FuncStyleOption = 'declaration' | 'expression';
/**
* Options.
*/
type FuncStyleOptions = [FuncStyleOption?, FuncStyleConfig?];
/**
* Enforce the consistent use of either `function` declarations or expressions.
*
* @see [func-style](https://eslint.org/docs/latest/rules/func-style)
*/
type FuncStyleRuleConfig = RuleConfig<FuncStyleOptions>;
/**
* Enforce the consistent use of either `function` declarations or expressions.
*
* @see [func-style](https://eslint.org/docs/latest/rules/func-style)
*/
interface FuncStyleRule {
/**
* Enforce the consistent use of either `function` declarations or expressions.
*
* @see [func-style](https://eslint.org/docs/latest/rules/func-style)
*/
'func-style': FuncStyleRuleConfig;
}
/**
* Option.
*/
type FunctionCallArgumentNewlineOption =
| 'always'
| 'never'
| 'consistent';
/**
* Options.
*/
type FunctionCallArgumentNewlineOptions = [
FunctionCallArgumentNewlineOption?,
];
/**
* Enforce line breaks between arguments of a function call.
*
* @see [function-call-argument-newline](https://eslint.org/docs/latest/rules/function-call-argument-newline)
*/
type FunctionCallArgumentNewlineRuleConfig =
RuleConfig<FunctionCallArgumentNewlineOptions>;
/**
* Enforce line breaks between arguments of a function call.
*
* @see [function-call-argument-newline](https://eslint.org/docs/latest/rules/function-call-argument-newline)
*/
interface FunctionCallArgumentNewlineRule {
/**
* Enforce line breaks between arguments of a function call.
*
* @see [function-call-argument-newline](https://eslint.org/docs/latest/rules/function-call-argument-newline)
*/
'function-call-argument-newline': FunctionCallArgumentNewlineRuleConfig;
}
/**
* Option.
*/
type FunctionParenNewlineOption =
| ('always' | 'never' | 'consistent' | 'multiline' | 'multiline-arguments')
| {
minItems?: number;
};
/**
* Options.
*/
type FunctionParenNewlineOptions = [FunctionParenNewlineOption?];
/**
* Enforce consistent line breaks inside function parentheses.
*
* @see [function-paren-newline](https://eslint.org/docs/latest/rules/function-paren-newline)
*/
type FunctionParenNewlineRuleConfig =
RuleConfig<FunctionParenNewlineOptions>;
/**
* Enforce consistent line breaks inside function parentheses.
*
* @see [function-paren-newline](https://eslint.org/docs/latest/rules/function-paren-newline)
*/
interface FunctionParenNewlineRule {
/**
* Enforce consistent line breaks inside function parentheses.
*
* @see [function-paren-newline](https://eslint.org/docs/latest/rules/function-paren-newline)
*/
'function-paren-newline': FunctionParenNewlineRuleConfig;
}
/**
* Option.
*/
type GeneratorStarSpacingOption =
| ('before' | 'after' | 'both' | 'neither')
| {
before?: boolean;
after?: boolean;
named?:
| ('before' | 'after' | 'both' | 'neither')
| {
before?: boolean;
after?: boolean;
};
anonymous?:
| ('before' | 'after' | 'both' | 'neither')
| {
before?: boolean;
after?: boolean;
};
method?:
| ('before' | 'after' | 'both' | 'neither')
| {
before?: boolean;
after?: boolean;
};
};
/**
* Options.
*/
type GeneratorStarSpacingOptions = [GeneratorStarSpacingOption?];
/**
* Enforce consistent spacing around `*` operators in generator functions.
*
* @see [generator-star-spacing](https://eslint.org/docs/latest/rules/generator-star-spacing)
*/
type GeneratorStarSpacingRuleConfig =
RuleConfig<GeneratorStarSpacingOptions>;
/**
* Enforce consistent spacing around `*` operators in generator functions.
*
* @see [generator-star-spacing](https://eslint.org/docs/latest/rules/generator-star-spacing)
*/
interface GeneratorStarSpacingRule {
/**
* Enforce consistent spacing around `*` operators in generator functions.
*
* @see [generator-star-spacing](https://eslint.org/docs/latest/rules/generator-star-spacing)
*/
'generator-star-spacing': GeneratorStarSpacingRuleConfig;
}
/**
* Option.
*/
interface GetterReturnOption {
allowImplicit?: boolean;
}
/**
* Options.
*/
type GetterReturnOptions = [GetterReturnOption?];
/**
* Enforce `return` statements in getters.
*
* @see [getter-return](https://eslint.org/docs/latest/rules/getter-return)
*/
type GetterReturnRuleConfig = RuleConfig<GetterReturnOptions>;
/**
* Enforce `return` statements in getters.
*
* @see [getter-return](https://eslint.org/docs/latest/rules/getter-return)
*/
interface GetterReturnRule {
/**
* Enforce `return` statements in getters.
*
* @see [getter-return](https://eslint.org/docs/latest/rules/getter-return)
*/
'getter-return': GetterReturnRuleConfig;
}
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @deprecated
*
* @see [global-require](https://eslint.org/docs/latest/rules/global-require)
*/
type GlobalRequireRuleConfig$2 = RuleConfig<[]>;
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @deprecated
*
* @see [global-require](https://eslint.org/docs/latest/rules/global-require)
*/
interface GlobalRequireRule$2 {
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @deprecated
*
* @see [global-require](https://eslint.org/docs/latest/rules/global-require)
*/
'global-require': GlobalRequireRuleConfig$2;
}
/**
* Option.
*/
type GroupedAccessorPairsOption =
| 'anyOrder'
| 'getBeforeSet'
| 'setBeforeGet';
/**
* Options.
*/
type GroupedAccessorPairsOptions = [GroupedAccessorPairsOption?];
/**
* Require grouped accessor pairs in object literals and classes.
*
* @see [grouped-accessor-pairs](https://eslint.org/docs/latest/rules/grouped-accessor-pairs)
*/
type GroupedAccessorPairsRuleConfig =
RuleConfig<GroupedAccessorPairsOptions>;
/**
* Require grouped accessor pairs in object literals and classes.
*
* @see [grouped-accessor-pairs](https://eslint.org/docs/latest/rules/grouped-accessor-pairs)
*/
interface GroupedAccessorPairsRule {
/**
* Require grouped accessor pairs in object literals and classes.
*
* @see [grouped-accessor-pairs](https://eslint.org/docs/latest/rules/grouped-accessor-pairs)
*/
'grouped-accessor-pairs': GroupedAccessorPairsRuleConfig;
}
/**
* Require `for-in` loops to include an `if` statement.
*
* @see [guard-for-in](https://eslint.org/docs/latest/rules/guard-for-in)
*/
type GuardForInRuleConfig = RuleConfig<[]>;
/**
* Require `for-in` loops to include an `if` statement.
*
* @see [guard-for-in](https://eslint.org/docs/latest/rules/guard-for-in)
*/
interface GuardForInRule {
/**
* Require `for-in` loops to include an `if` statement.
*
* @see [guard-for-in](https://eslint.org/docs/latest/rules/guard-for-in)
*/
'guard-for-in': GuardForInRuleConfig;
}
/**
* Option.
*/
type HandleCallbackErrOption$2 = string;
/**
* Options.
*/
type HandleCallbackErrOptions$2 = [HandleCallbackErrOption$2?];
/**
* Require error handling in callbacks.
*
* @deprecated
*
* @see [handle-callback-err](https://eslint.org/docs/latest/rules/handle-callback-err)
*/
type HandleCallbackErrRuleConfig$2 = RuleConfig<HandleCallbackErrOptions$2>;
/**
* Require error handling in callbacks.
*
* @deprecated
*
* @see [handle-callback-err](https://eslint.org/docs/latest/rules/handle-callback-err)
*/
interface HandleCallbackErrRule$2 {
/**
* Require error handling in callbacks.
*
* @deprecated
*
* @see [handle-callback-err](https://eslint.org/docs/latest/rules/handle-callback-err)
*/
'handle-callback-err': HandleCallbackErrRuleConfig$2;
}
/**
* Option.
*/
type IdBlacklistOption = string[];
/**
* Options.
*/
type IdBlacklistOptions = IdBlacklistOption;
/**
* Disallow specified identifiers.
*
* @deprecated
*
* @see [id-blacklist](https://eslint.org/docs/latest/rules/id-blacklist)
*/
type IdBlacklistRuleConfig = RuleConfig<IdBlacklistOptions>;
/**
* Disallow specified identifiers.
*
* @deprecated
*
* @see [id-blacklist](https://eslint.org/docs/latest/rules/id-blacklist)
*/
interface IdBlacklistRule {
/**
* Disallow specified identifiers.
*
* @deprecated
*
* @see [id-blacklist](https://eslint.org/docs/latest/rules/id-blacklist)
*/
'id-blacklist': IdBlacklistRuleConfig;
}
/**
* Option.
*/
type IdDenylistOption = string[];
/**
* Options.
*/
type IdDenylistOptions = IdDenylistOption;
/**
* Disallow specified identifiers.
*
* @see [id-denylist](https://eslint.org/docs/latest/rules/id-denylist)
*/
type IdDenylistRuleConfig = RuleConfig<IdDenylistOptions>;
/**
* Disallow specified identifiers.
*
* @see [id-denylist](https://eslint.org/docs/latest/rules/id-denylist)
*/
interface IdDenylistRule {
/**
* Disallow specified identifiers.
*
* @see [id-denylist](https://eslint.org/docs/latest/rules/id-denylist)
*/
'id-denylist': IdDenylistRuleConfig;
}
/**
* Option.
*/
interface IdLengthOption {
min?: number;
max?: number;
exceptions?: string[];
exceptionPatterns?: string[];
properties?: 'always' | 'never';
}
/**
* Options.
*/
type IdLengthOptions = [IdLengthOption?];
/**
* Enforce minimum and maximum identifier lengths.
*
* @see [id-length](https://eslint.org/docs/latest/rules/id-length)
*/
type IdLengthRuleConfig = RuleConfig<IdLengthOptions>;
/**
* Enforce minimum and maximum identifier lengths.
*
* @see [id-length](https://eslint.org/docs/latest/rules/id-length)
*/
interface IdLengthRule {
/**
* Enforce minimum and maximum identifier lengths.
*
* @see [id-length](https://eslint.org/docs/latest/rules/id-length)
*/
'id-length': IdLengthRuleConfig;
}
/**
* Config.
*/
interface IdMatchConfig {
properties?: boolean;
classFields?: boolean;
onlyDeclarations?: boolean;
ignoreDestructuring?: boolean;
}
/**
* Option.
*/
type IdMatchOption = string;
/**
* Options.
*/
type IdMatchOptions = [IdMatchOption?, IdMatchConfig?];
/**
* Require identifiers to match a specified regular expression.
*
* @see [id-match](https://eslint.org/docs/latest/rules/id-match)
*/
type IdMatchRuleConfig = RuleConfig<IdMatchOptions>;
/**
* Require identifiers to match a specified regular expression.
*
* @see [id-match](https://eslint.org/docs/latest/rules/id-match)
*/
interface IdMatchRule {
/**
* Require identifiers to match a specified regular expression.
*
* @see [id-match](https://eslint.org/docs/latest/rules/id-match)
*/
'id-match': IdMatchRuleConfig;
}
/**
* Option.
*/
type ImplicitArrowLinebreakOption = 'beside' | 'below';
/**
* Options.
*/
type ImplicitArrowLinebreakOptions = [ImplicitArrowLinebreakOption?];
/**
* Enforce the location of arrow function bodies.
*
* @see [implicit-arrow-linebreak](https://eslint.org/docs/latest/rules/implicit-arrow-linebreak)
*/
type ImplicitArrowLinebreakRuleConfig =
RuleConfig<ImplicitArrowLinebreakOptions>;
/**
* Enforce the location of arrow function bodies.
*
* @see [implicit-arrow-linebreak](https://eslint.org/docs/latest/rules/implicit-arrow-linebreak)
*/
interface ImplicitArrowLinebreakRule {
/**
* Enforce the location of arrow function bodies.
*
* @see [implicit-arrow-linebreak](https://eslint.org/docs/latest/rules/implicit-arrow-linebreak)
*/
'implicit-arrow-linebreak': ImplicitArrowLinebreakRuleConfig;
}
/**
* Config.
*/
interface IndentConfig$3 {
SwitchCase?: number;
VariableDeclarator?:
| (number | ('first' | 'off'))
| {
var?: number | ('first' | 'off');
let?: number | ('first' | 'off');
const?: number | ('first' | 'off');
};
outerIIFEBody?: number | 'off';
MemberExpression?: number | 'off';
FunctionDeclaration?: {
parameters?: number | ('first' | 'off');
body?: number;
};
FunctionExpression?: {
parameters?: number | ('first' | 'off');
body?: number;
};
StaticBlock?: {
body?: number;
};
CallExpression?: {
arguments?: number | ('first' | 'off');
};
ArrayExpression?: number | ('first' | 'off');
ObjectExpression?: number | ('first' | 'off');
ImportDeclaration?: number | ('first' | 'off');
flatTernaryExpressions?: boolean;
offsetTernaryExpressions?: boolean;
ignoredNodes?: string[];
ignoreComments?: boolean;
}
/**
* Option.
*/
type IndentOption$3 = 'tab' | number;
/**
* Options.
*/
type IndentOptions$3 = [IndentOption$3?, IndentConfig$3?];
/**
* Enforce consistent indentation.
*
* @see [indent](https://eslint.org/docs/latest/rules/indent)
*/
type IndentRuleConfig$3 = RuleConfig<IndentOptions$3>;
/**
* Enforce consistent indentation.
*
* @see [indent](https://eslint.org/docs/latest/rules/indent)
*/
interface IndentRule$3 {
/**
* Enforce consistent indentation.
*
* @see [indent](https://eslint.org/docs/latest/rules/indent)
*/
indent: IndentRuleConfig$3;
}
/**
* Config.
*/
interface IndentLegacyConfig {
SwitchCase?: number;
VariableDeclarator?:
| number
| {
var?: number;
let?: number;
const?: number;
[k: string]: any;
};
outerIIFEBody?: number;
MemberExpression?: number;
FunctionDeclaration?: {
parameters?: number | 'first';
body?: number;
[k: string]: any;
};
FunctionExpression?: {
parameters?: number | 'first';
body?: number;
[k: string]: any;
};
CallExpression?: {
parameters?: number | 'first';
[k: string]: any;
};
ArrayExpression?: number | 'first';
ObjectExpression?: number | 'first';
}
/**
* Option.
*/
type IndentLegacyOption = 'tab' | number;
/**
* Options.
*/
type IndentLegacyOptions = [IndentLegacyOption?, IndentLegacyConfig?];
/**
* Enforce consistent indentation.
*
* @deprecated
*
* @see [indent-legacy](https://eslint.org/docs/latest/rules/indent-legacy)
*/
type IndentLegacyRuleConfig = RuleConfig<IndentLegacyOptions>;
/**
* Enforce consistent indentation.
*
* @deprecated
*
* @see [indent-legacy](https://eslint.org/docs/latest/rules/indent-legacy)
*/
interface IndentLegacyRule {
/**
* Enforce consistent indentation.
*
* @deprecated
*
* @see [indent-legacy](https://eslint.org/docs/latest/rules/indent-legacy)
*/
'indent-legacy': IndentLegacyRuleConfig;
}
/**
* Option.
*/
type InitDeclarationsOption$1 =
| []
| ['always']
| []
| ['never']
| [
'never',
{
ignoreForLoopInit?: boolean;
},
];
/**
* Options.
*/
type InitDeclarationsOptions$1 = InitDeclarationsOption$1;
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://eslint.org/docs/latest/rules/init-declarations)
*/
type InitDeclarationsRuleConfig$1 = RuleConfig<InitDeclarationsOptions$1>;
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://eslint.org/docs/latest/rules/init-declarations)
*/
interface InitDeclarationsRule$1 {
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://eslint.org/docs/latest/rules/init-declarations)
*/
'init-declarations': InitDeclarationsRuleConfig$1;
}
/**
* Option.
*/
type JsxQuotesOption = 'prefer-single' | 'prefer-double';
/**
* Options.
*/
type JsxQuotesOptions = [JsxQuotesOption?];
/**
* Enforce the consistent use of either double or single quotes in JSX attributes.
*
* @see [jsx-quotes](https://eslint.org/docs/latest/rules/jsx-quotes)
*/
type JsxQuotesRuleConfig = RuleConfig<JsxQuotesOptions>;
/**
* Enforce the consistent use of either double or single quotes in JSX attributes.
*
* @see [jsx-quotes](https://eslint.org/docs/latest/rules/jsx-quotes)
*/
interface JsxQuotesRule {
/**
* Enforce the consistent use of either double or single quotes in JSX attributes.
*
* @see [jsx-quotes](https://eslint.org/docs/latest/rules/jsx-quotes)
*/
'jsx-quotes': JsxQuotesRuleConfig;
}
/**
* Option.
*/
type KeySpacingOption$4 =
| {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
align?: {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
};
/**
* Options.
*/
type KeySpacingOptions$4 = [KeySpacingOption$4?];
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://eslint.org/docs/latest/rules/key-spacing)
*/
type KeySpacingRuleConfig$4 = RuleConfig<KeySpacingOptions$4>;
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://eslint.org/docs/latest/rules/key-spacing)
*/
interface KeySpacingRule$4 {
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://eslint.org/docs/latest/rules/key-spacing)
*/
'key-spacing': KeySpacingRuleConfig$4;
}
/**
* Option.
*/
interface KeywordSpacingOption$2 {
before?: boolean;
after?: boolean;
overrides?: {
abstract?: {
before?: boolean;
after?: boolean;
};
as?: {
before?: boolean;
after?: boolean;
};
async?: {
before?: boolean;
after?: boolean;
};
await?: {
before?: boolean;
after?: boolean;
};
boolean?: {
before?: boolean;
after?: boolean;
};
break?: {
before?: boolean;
after?: boolean;
};
byte?: {
before?: boolean;
after?: boolean;
};
case?: {
before?: boolean;
after?: boolean;
};
catch?: {
before?: boolean;
after?: boolean;
};
char?: {
before?: boolean;
after?: boolean;
};
class?: {
before?: boolean;
after?: boolean;
};
const?: {
before?: boolean;
after?: boolean;
};
continue?: {
before?: boolean;
after?: boolean;
};
debugger?: {
before?: boolean;
after?: boolean;
};
default?: {
before?: boolean;
after?: boolean;
};
delete?: {
before?: boolean;
after?: boolean;
};
do?: {
before?: boolean;
after?: boolean;
};
double?: {
before?: boolean;
after?: boolean;
};
else?: {
before?: boolean;
after?: boolean;
};
enum?: {
before?: boolean;
after?: boolean;
};
export?: {
before?: boolean;
after?: boolean;
};
extends?: {
before?: boolean;
after?: boolean;
};
false?: {
before?: boolean;
after?: boolean;
};
final?: {
before?: boolean;
after?: boolean;
};
finally?: {
before?: boolean;
after?: boolean;
};
float?: {
before?: boolean;
after?: boolean;
};
for?: {
before?: boolean;
after?: boolean;
};
from?: {
before?: boolean;
after?: boolean;
};
function?: {
before?: boolean;
after?: boolean;
};
get?: {
before?: boolean;
after?: boolean;
};
goto?: {
before?: boolean;
after?: boolean;
};
if?: {
before?: boolean;
after?: boolean;
};
implements?: {
before?: boolean;
after?: boolean;
};
import?: {
before?: boolean;
after?: boolean;
};
in?: {
before?: boolean;
after?: boolean;
};
instanceof?: {
before?: boolean;
after?: boolean;
};
int?: {
before?: boolean;
after?: boolean;
};
interface?: {
before?: boolean;
after?: boolean;
};
let?: {
before?: boolean;
after?: boolean;
};
long?: {
before?: boolean;
after?: boolean;
};
native?: {
before?: boolean;
after?: boolean;
};
new?: {
before?: boolean;
after?: boolean;
};
null?: {
before?: boolean;
after?: boolean;
};
of?: {
before?: boolean;
after?: boolean;
};
package?: {
before?: boolean;
after?: boolean;
};
private?: {
before?: boolean;
after?: boolean;
};
protected?: {
before?: boolean;
after?: boolean;
};
public?: {
before?: boolean;
after?: boolean;
};
return?: {
before?: boolean;
after?: boolean;
};
set?: {
before?: boolean;
after?: boolean;
};
short?: {
before?: boolean;
after?: boolean;
};
static?: {
before?: boolean;
after?: boolean;
};
super?: {
before?: boolean;
after?: boolean;
};
switch?: {
before?: boolean;
after?: boolean;
};
synchronized?: {
before?: boolean;
after?: boolean;
};
this?: {
before?: boolean;
after?: boolean;
};
throw?: {
before?: boolean;
after?: boolean;
};
throws?: {
before?: boolean;
after?: boolean;
};
transient?: {
before?: boolean;
after?: boolean;
};
true?: {
before?: boolean;
after?: boolean;
};
try?: {
before?: boolean;
after?: boolean;
};
typeof?: {
before?: boolean;
after?: boolean;
};
var?: {
before?: boolean;
after?: boolean;
};
void?: {
before?: boolean;
after?: boolean;
};
volatile?: {
before?: boolean;
after?: boolean;
};
while?: {
before?: boolean;
after?: boolean;
};
with?: {
before?: boolean;
after?: boolean;
};
yield?: {
before?: boolean;
after?: boolean;
};
};
}
/**
* Options.
*/
type KeywordSpacingOptions$2 = [KeywordSpacingOption$2?];
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://eslint.org/docs/latest/rules/keyword-spacing)
*/
type KeywordSpacingRuleConfig$2 = RuleConfig<KeywordSpacingOptions$2>;
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://eslint.org/docs/latest/rules/keyword-spacing)
*/
interface KeywordSpacingRule$2 {
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://eslint.org/docs/latest/rules/keyword-spacing)
*/
'keyword-spacing': KeywordSpacingRuleConfig$2;
}
/**
* Option.
*/
type LineCommentPositionOption =
| ('above' | 'beside')
| {
position?: 'above' | 'beside';
ignorePattern?: string;
applyDefaultPatterns?: boolean;
applyDefaultIgnorePatterns?: boolean;
};
/**
* Options.
*/
type LineCommentPositionOptions = [LineCommentPositionOption?];
/**
* Enforce position of line comments.
*
* @see [line-comment-position](https://eslint.org/docs/latest/rules/line-comment-position)
*/
type LineCommentPositionRuleConfig =
RuleConfig<LineCommentPositionOptions>;
/**
* Enforce position of line comments.
*
* @see [line-comment-position](https://eslint.org/docs/latest/rules/line-comment-position)
*/
interface LineCommentPositionRule {
/**
* Enforce position of line comments.
*
* @see [line-comment-position](https://eslint.org/docs/latest/rules/line-comment-position)
*/
'line-comment-position': LineCommentPositionRuleConfig;
}
/**
* Option.
*/
type LinebreakStyleOption = 'unix' | 'windows';
/**
* Options.
*/
type LinebreakStyleOptions = [LinebreakStyleOption?];
/**
* Enforce consistent linebreak style.
*
* @see [linebreak-style](https://eslint.org/docs/latest/rules/linebreak-style)
*/
type LinebreakStyleRuleConfig = RuleConfig<LinebreakStyleOptions>;
/**
* Enforce consistent linebreak style.
*
* @see [linebreak-style](https://eslint.org/docs/latest/rules/linebreak-style)
*/
interface LinebreakStyleRule {
/**
* Enforce consistent linebreak style.
*
* @see [linebreak-style](https://eslint.org/docs/latest/rules/linebreak-style)
*/
'linebreak-style': LinebreakStyleRuleConfig;
}
/**
* Option.
*/
interface LinesAroundCommentOption$1 {
beforeBlockComment?: boolean;
afterBlockComment?: boolean;
beforeLineComment?: boolean;
afterLineComment?: boolean;
allowBlockStart?: boolean;
allowBlockEnd?: boolean;
allowClassStart?: boolean;
allowClassEnd?: boolean;
allowObjectStart?: boolean;
allowObjectEnd?: boolean;
allowArrayStart?: boolean;
allowArrayEnd?: boolean;
ignorePattern?: string;
applyDefaultIgnorePatterns?: boolean;
afterHashbangComment?: boolean;
}
/**
* Options.
*/
type LinesAroundCommentOptions$1 = [LinesAroundCommentOption$1?];
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://eslint.org/docs/latest/rules/lines-around-comment)
*/
type LinesAroundCommentRuleConfig$1 =
RuleConfig<LinesAroundCommentOptions$1>;
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://eslint.org/docs/latest/rules/lines-around-comment)
*/
interface LinesAroundCommentRule$1 {
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://eslint.org/docs/latest/rules/lines-around-comment)
*/
'lines-around-comment': LinesAroundCommentRuleConfig$1;
}
/**
* Option.
*/
type LinesAroundDirectiveOption =
| ('always' | 'never')
| {
before?: 'always' | 'never';
after?: 'always' | 'never';
};
/**
* Options.
*/
type LinesAroundDirectiveOptions = [LinesAroundDirectiveOption?];
/**
* Require or disallow newlines around directives.
*
* @deprecated
*
* @see [lines-around-directive](https://eslint.org/docs/latest/rules/lines-around-directive)
*/
type LinesAroundDirectiveRuleConfig =
RuleConfig<LinesAroundDirectiveOptions>;
/**
* Require or disallow newlines around directives.
*
* @deprecated
*
* @see [lines-around-directive](https://eslint.org/docs/latest/rules/lines-around-directive)
*/
interface LinesAroundDirectiveRule {
/**
* Require or disallow newlines around directives.
*
* @deprecated
*
* @see [lines-around-directive](https://eslint.org/docs/latest/rules/lines-around-directive)
*/
'lines-around-directive': LinesAroundDirectiveRuleConfig;
}
/**
* Config.
*/
interface LinesBetweenClassMembersConfig$1 {
exceptAfterSingleLine?: boolean;
}
/**
* Option.
*/
type LinesBetweenClassMembersOption$1 =
| {
/**
* @minItems 1
*/
enforce: [
{
blankLine: 'always' | 'never';
prev: 'method' | 'field' | '*';
next: 'method' | 'field' | '*';
},
...{
blankLine: 'always' | 'never';
prev: 'method' | 'field' | '*';
next: 'method' | 'field' | '*';
}[],
];
}
| ('always' | 'never');
/**
* Options.
*/
type LinesBetweenClassMembersOptions$1 = [
LinesBetweenClassMembersOption$1?,
LinesBetweenClassMembersConfig$1?,
];
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://eslint.org/docs/latest/rules/lines-between-class-members)
*/
type LinesBetweenClassMembersRuleConfig$1 =
RuleConfig<LinesBetweenClassMembersOptions$1>;
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://eslint.org/docs/latest/rules/lines-between-class-members)
*/
interface LinesBetweenClassMembersRule$1 {
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://eslint.org/docs/latest/rules/lines-between-class-members)
*/
'lines-between-class-members': LinesBetweenClassMembersRuleConfig$1;
}
/**
* Option.
*/
type LogicalAssignmentOperatorsOption = (
| []
| ['always']
| [
'always',
{
enforceForIfStatements?: boolean;
},
]
| ['never']
) &
any[];
/**
* Options.
*/
type LogicalAssignmentOperatorsOptions =
LogicalAssignmentOperatorsOption;
/**
* Require or disallow logical assignment operator shorthand.
*
* @see [logical-assignment-operators](https://eslint.org/docs/latest/rules/logical-assignment-operators)
*/
type LogicalAssignmentOperatorsRuleConfig =
RuleConfig<LogicalAssignmentOperatorsOptions>;
/**
* Require or disallow logical assignment operator shorthand.
*
* @see [logical-assignment-operators](https://eslint.org/docs/latest/rules/logical-assignment-operators)
*/
interface LogicalAssignmentOperatorsRule {
/**
* Require or disallow logical assignment operator shorthand.
*
* @see [logical-assignment-operators](https://eslint.org/docs/latest/rules/logical-assignment-operators)
*/
'logical-assignment-operators': LogicalAssignmentOperatorsRuleConfig;
}
/**
* Option.
*/
type MaxClassesPerFileOption =
| number
| {
ignoreExpressions?: boolean;
max?: number;
};
/**
* Options.
*/
type MaxClassesPerFileOptions = [MaxClassesPerFileOption?];
/**
* Enforce a maximum number of classes per file.
*
* @see [max-classes-per-file](https://eslint.org/docs/latest/rules/max-classes-per-file)
*/
type MaxClassesPerFileRuleConfig = RuleConfig<MaxClassesPerFileOptions>;
/**
* Enforce a maximum number of classes per file.
*
* @see [max-classes-per-file](https://eslint.org/docs/latest/rules/max-classes-per-file)
*/
interface MaxClassesPerFileRule {
/**
* Enforce a maximum number of classes per file.
*
* @see [max-classes-per-file](https://eslint.org/docs/latest/rules/max-classes-per-file)
*/
'max-classes-per-file': MaxClassesPerFileRuleConfig;
}
/**
* Option.
*/
type MaxDepthOption =
| number
| {
maximum?: number;
max?: number;
};
/**
* Options.
*/
type MaxDepthOptions = [MaxDepthOption?];
/**
* Enforce a maximum depth that blocks can be nested.
*
* @see [max-depth](https://eslint.org/docs/latest/rules/max-depth)
*/
type MaxDepthRuleConfig = RuleConfig<MaxDepthOptions>;
/**
* Enforce a maximum depth that blocks can be nested.
*
* @see [max-depth](https://eslint.org/docs/latest/rules/max-depth)
*/
interface MaxDepthRule {
/**
* Enforce a maximum depth that blocks can be nested.
*
* @see [max-depth](https://eslint.org/docs/latest/rules/max-depth)
*/
'max-depth': MaxDepthRuleConfig;
}
/**
* Setting.
*/
interface MaxLenSetting$1 {
code?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreStrings?: boolean;
ignoreUrls?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreTrailingComments?: boolean;
}
/**
* Config.
*/
type MaxLenConfig$1 =
| {
code?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreStrings?: boolean;
ignoreUrls?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreTrailingComments?: boolean;
}
| number;
/**
* Option.
*/
type MaxLenOption$1 =
| {
code?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreStrings?: boolean;
ignoreUrls?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreTrailingComments?: boolean;
}
| number;
/**
* Options.
*/
type MaxLenOptions$1 = [MaxLenOption$1?, MaxLenConfig$1?, MaxLenSetting$1?];
/**
* Enforce a maximum line length.
*
* @see [max-len](https://eslint.org/docs/latest/rules/max-len)
*/
type MaxLenRuleConfig$1 = RuleConfig<MaxLenOptions$1>;
/**
* Enforce a maximum line length.
*
* @see [max-len](https://eslint.org/docs/latest/rules/max-len)
*/
interface MaxLenRule$1 {
/**
* Enforce a maximum line length.
*
* @see [max-len](https://eslint.org/docs/latest/rules/max-len)
*/
'max-len': MaxLenRuleConfig$1;
}
/**
* Option.
*/
type MaxLinesOption =
| number
| {
max?: number;
skipComments?: boolean;
skipBlankLines?: boolean;
};
/**
* Options.
*/
type MaxLinesOptions = [MaxLinesOption?];
/**
* Enforce a maximum number of lines per file.
*
* @see [max-lines](https://eslint.org/docs/latest/rules/max-lines)
*/
type MaxLinesRuleConfig = RuleConfig<MaxLinesOptions>;
/**
* Enforce a maximum number of lines per file.
*
* @see [max-lines](https://eslint.org/docs/latest/rules/max-lines)
*/
interface MaxLinesRule {
/**
* Enforce a maximum number of lines per file.
*
* @see [max-lines](https://eslint.org/docs/latest/rules/max-lines)
*/
'max-lines': MaxLinesRuleConfig;
}
/**
* Option.
*/
type MaxLinesPerFunctionOption =
| {
max?: number;
skipComments?: boolean;
skipBlankLines?: boolean;
IIFEs?: boolean;
}
| number;
/**
* Options.
*/
type MaxLinesPerFunctionOptions = [MaxLinesPerFunctionOption?];
/**
* Enforce a maximum number of lines of code in a function.
*
* @see [max-lines-per-function](https://eslint.org/docs/latest/rules/max-lines-per-function)
*/
type MaxLinesPerFunctionRuleConfig =
RuleConfig<MaxLinesPerFunctionOptions>;
/**
* Enforce a maximum number of lines of code in a function.
*
* @see [max-lines-per-function](https://eslint.org/docs/latest/rules/max-lines-per-function)
*/
interface MaxLinesPerFunctionRule {
/**
* Enforce a maximum number of lines of code in a function.
*
* @see [max-lines-per-function](https://eslint.org/docs/latest/rules/max-lines-per-function)
*/
'max-lines-per-function': MaxLinesPerFunctionRuleConfig;
}
/**
* Option.
*/
type MaxNestedCallbacksOption =
| number
| {
maximum?: number;
max?: number;
};
/**
* Options.
*/
type MaxNestedCallbacksOptions = [MaxNestedCallbacksOption?];
/**
* Enforce a maximum depth that callbacks can be nested.
*
* @see [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
*/
type MaxNestedCallbacksRuleConfig =
RuleConfig<MaxNestedCallbacksOptions>;
/**
* Enforce a maximum depth that callbacks can be nested.
*
* @see [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
*/
interface MaxNestedCallbacksRule {
/**
* Enforce a maximum depth that callbacks can be nested.
*
* @see [max-nested-callbacks](https://eslint.org/docs/latest/rules/max-nested-callbacks)
*/
'max-nested-callbacks': MaxNestedCallbacksRuleConfig;
}
/**
* Option.
*/
type MaxParamsOption =
| number
| {
maximum?: number;
max?: number;
};
/**
* Options.
*/
type MaxParamsOptions = [MaxParamsOption?];
/**
* Enforce a maximum number of parameters in function definitions.
*
* @see [max-params](https://eslint.org/docs/latest/rules/max-params)
*/
type MaxParamsRuleConfig = RuleConfig<MaxParamsOptions>;
/**
* Enforce a maximum number of parameters in function definitions.
*
* @see [max-params](https://eslint.org/docs/latest/rules/max-params)
*/
interface MaxParamsRule {
/**
* Enforce a maximum number of parameters in function definitions.
*
* @see [max-params](https://eslint.org/docs/latest/rules/max-params)
*/
'max-params': MaxParamsRuleConfig;
}
/**
* Config.
*/
interface MaxStatementsConfig {
ignoreTopLevelFunctions?: boolean;
}
/**
* Option.
*/
type MaxStatementsOption =
| number
| {
maximum?: number;
max?: number;
};
/**
* Options.
*/
type MaxStatementsOptions = [MaxStatementsOption?, MaxStatementsConfig?];
/**
* Enforce a maximum number of statements allowed in function blocks.
*
* @see [max-statements](https://eslint.org/docs/latest/rules/max-statements)
*/
type MaxStatementsRuleConfig = RuleConfig<MaxStatementsOptions>;
/**
* Enforce a maximum number of statements allowed in function blocks.
*
* @see [max-statements](https://eslint.org/docs/latest/rules/max-statements)
*/
interface MaxStatementsRule {
/**
* Enforce a maximum number of statements allowed in function blocks.
*
* @see [max-statements](https://eslint.org/docs/latest/rules/max-statements)
*/
'max-statements': MaxStatementsRuleConfig;
}
/**
* Option.
*/
interface MaxStatementsPerLineOption {
max?: number;
}
/**
* Options.
*/
type MaxStatementsPerLineOptions = [MaxStatementsPerLineOption?];
/**
* Enforce a maximum number of statements allowed per line.
*
* @see [max-statements-per-line](https://eslint.org/docs/latest/rules/max-statements-per-line)
*/
type MaxStatementsPerLineRuleConfig =
RuleConfig<MaxStatementsPerLineOptions>;
/**
* Enforce a maximum number of statements allowed per line.
*
* @see [max-statements-per-line](https://eslint.org/docs/latest/rules/max-statements-per-line)
*/
interface MaxStatementsPerLineRule {
/**
* Enforce a maximum number of statements allowed per line.
*
* @see [max-statements-per-line](https://eslint.org/docs/latest/rules/max-statements-per-line)
*/
'max-statements-per-line': MaxStatementsPerLineRuleConfig;
}
/**
* Option.
*/
type MultilineCommentStyleOption =
| []
| ['starred-block' | 'bare-block']
| []
| ['separate-lines']
| [
'separate-lines',
{
checkJSDoc?: boolean;
},
];
/**
* Options.
*/
type MultilineCommentStyleOptions = MultilineCommentStyleOption;
/**
* Enforce a particular style for multiline comments.
*
* @see [multiline-comment-style](https://eslint.org/docs/latest/rules/multiline-comment-style)
*/
type MultilineCommentStyleRuleConfig =
RuleConfig<MultilineCommentStyleOptions>;
/**
* Enforce a particular style for multiline comments.
*
* @see [multiline-comment-style](https://eslint.org/docs/latest/rules/multiline-comment-style)
*/
interface MultilineCommentStyleRule {
/**
* Enforce a particular style for multiline comments.
*
* @see [multiline-comment-style](https://eslint.org/docs/latest/rules/multiline-comment-style)
*/
'multiline-comment-style': MultilineCommentStyleRuleConfig;
}
/**
* Option.
*/
type MultilineTernaryOption$1 = 'always' | 'always-multiline' | 'never';
/**
* Options.
*/
type MultilineTernaryOptions$1 = [MultilineTernaryOption$1?];
/**
* Enforce newlines between operands of ternary expressions.
*
* @see [multiline-ternary](https://eslint.org/docs/latest/rules/multiline-ternary)
*/
type MultilineTernaryRuleConfig$1 = RuleConfig<MultilineTernaryOptions$1>;
/**
* Enforce newlines between operands of ternary expressions.
*
* @see [multiline-ternary](https://eslint.org/docs/latest/rules/multiline-ternary)
*/
interface MultilineTernaryRule$1 {
/**
* Enforce newlines between operands of ternary expressions.
*
* @see [multiline-ternary](https://eslint.org/docs/latest/rules/multiline-ternary)
*/
'multiline-ternary': MultilineTernaryRuleConfig$1;
}
/**
* Option.
*/
interface NewCapOption {
newIsCap?: boolean;
capIsNew?: boolean;
newIsCapExceptions?: string[];
newIsCapExceptionPattern?: string;
capIsNewExceptions?: string[];
capIsNewExceptionPattern?: string;
properties?: boolean;
}
/**
* Options.
*/
type NewCapOptions = [NewCapOption?];
/**
* Require constructor names to begin with a capital letter.
*
* @see [new-cap](https://eslint.org/docs/latest/rules/new-cap)
*/
type NewCapRuleConfig = RuleConfig<NewCapOptions>;
/**
* Require constructor names to begin with a capital letter.
*
* @see [new-cap](https://eslint.org/docs/latest/rules/new-cap)
*/
interface NewCapRule {
/**
* Require constructor names to begin with a capital letter.
*
* @see [new-cap](https://eslint.org/docs/latest/rules/new-cap)
*/
'new-cap': NewCapRuleConfig;
}
/**
* Option.
*/
type NewParensOption = 'always' | 'never';
/**
* Options.
*/
type NewParensOptions = [NewParensOption?];
/**
* Enforce or disallow parentheses when invoking a constructor with no arguments.
*
* @see [new-parens](https://eslint.org/docs/latest/rules/new-parens)
*/
type NewParensRuleConfig = RuleConfig<NewParensOptions>;
/**
* Enforce or disallow parentheses when invoking a constructor with no arguments.
*
* @see [new-parens](https://eslint.org/docs/latest/rules/new-parens)
*/
interface NewParensRule {
/**
* Enforce or disallow parentheses when invoking a constructor with no arguments.
*
* @see [new-parens](https://eslint.org/docs/latest/rules/new-parens)
*/
'new-parens': NewParensRuleConfig;
}
/**
* Option.
*/
type NewlineAfterVarOption = 'never' | 'always';
/**
* Options.
*/
type NewlineAfterVarOptions = [NewlineAfterVarOption?];
/**
* Require or disallow an empty line after variable declarations.
*
* @deprecated
*
* @see [newline-after-var](https://eslint.org/docs/latest/rules/newline-after-var)
*/
type NewlineAfterVarRuleConfig = RuleConfig<NewlineAfterVarOptions>;
/**
* Require or disallow an empty line after variable declarations.
*
* @deprecated
*
* @see [newline-after-var](https://eslint.org/docs/latest/rules/newline-after-var)
*/
interface NewlineAfterVarRule {
/**
* Require or disallow an empty line after variable declarations.
*
* @deprecated
*
* @see [newline-after-var](https://eslint.org/docs/latest/rules/newline-after-var)
*/
'newline-after-var': NewlineAfterVarRuleConfig;
}
/**
* Require an empty line before `return` statements.
*
* @deprecated
*
* @see [newline-before-return](https://eslint.org/docs/latest/rules/newline-before-return)
*/
type NewlineBeforeReturnRuleConfig = RuleConfig<[]>;
/**
* Require an empty line before `return` statements.
*
* @deprecated
*
* @see [newline-before-return](https://eslint.org/docs/latest/rules/newline-before-return)
*/
interface NewlineBeforeReturnRule {
/**
* Require an empty line before `return` statements.
*
* @deprecated
*
* @see [newline-before-return](https://eslint.org/docs/latest/rules/newline-before-return)
*/
'newline-before-return': NewlineBeforeReturnRuleConfig;
}
/**
* Option.
*/
interface NewlinePerChainedCallOption {
ignoreChainWithDepth?: number;
}
/**
* Options.
*/
type NewlinePerChainedCallOptions = [NewlinePerChainedCallOption?];
/**
* Require a newline after each call in a method chain.
*
* @see [newline-per-chained-call](https://eslint.org/docs/latest/rules/newline-per-chained-call)
*/
type NewlinePerChainedCallRuleConfig =
RuleConfig<NewlinePerChainedCallOptions>;
/**
* Require a newline after each call in a method chain.
*
* @see [newline-per-chained-call](https://eslint.org/docs/latest/rules/newline-per-chained-call)
*/
interface NewlinePerChainedCallRule {
/**
* Require a newline after each call in a method chain.
*
* @see [newline-per-chained-call](https://eslint.org/docs/latest/rules/newline-per-chained-call)
*/
'newline-per-chained-call': NewlinePerChainedCallRuleConfig;
}
/**
* Disallow the use of `alert`, `confirm`, and `prompt`.
*
* @see [no-alert](https://eslint.org/docs/latest/rules/no-alert)
*/
type NoAlertRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `alert`, `confirm`, and `prompt`.
*
* @see [no-alert](https://eslint.org/docs/latest/rules/no-alert)
*/
interface NoAlertRule {
/**
* Disallow the use of `alert`, `confirm`, and `prompt`.
*
* @see [no-alert](https://eslint.org/docs/latest/rules/no-alert)
*/
'no-alert': NoAlertRuleConfig;
}
/**
* Disallow `Array` constructors.
*
* @see [no-array-constructor](https://eslint.org/docs/latest/rules/no-array-constructor)
*/
type NoArrayConstructorRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow `Array` constructors.
*
* @see [no-array-constructor](https://eslint.org/docs/latest/rules/no-array-constructor)
*/
interface NoArrayConstructorRule$1 {
/**
* Disallow `Array` constructors.
*
* @see [no-array-constructor](https://eslint.org/docs/latest/rules/no-array-constructor)
*/
'no-array-constructor': NoArrayConstructorRuleConfig$1;
}
/**
* Disallow using an async function as a Promise executor.
*
* @see [no-async-promise-executor](https://eslint.org/docs/latest/rules/no-async-promise-executor)
*/
type NoAsyncPromiseExecutorRuleConfig = RuleConfig<[]>;
/**
* Disallow using an async function as a Promise executor.
*
* @see [no-async-promise-executor](https://eslint.org/docs/latest/rules/no-async-promise-executor)
*/
interface NoAsyncPromiseExecutorRule {
/**
* Disallow using an async function as a Promise executor.
*
* @see [no-async-promise-executor](https://eslint.org/docs/latest/rules/no-async-promise-executor)
*/
'no-async-promise-executor': NoAsyncPromiseExecutorRuleConfig;
}
/**
* Disallow `await` inside of loops.
*
* @see [no-await-in-loop](https://eslint.org/docs/latest/rules/no-await-in-loop)
*/
type NoAwaitInLoopRuleConfig = RuleConfig<[]>;
/**
* Disallow `await` inside of loops.
*
* @see [no-await-in-loop](https://eslint.org/docs/latest/rules/no-await-in-loop)
*/
interface NoAwaitInLoopRule {
/**
* Disallow `await` inside of loops.
*
* @see [no-await-in-loop](https://eslint.org/docs/latest/rules/no-await-in-loop)
*/
'no-await-in-loop': NoAwaitInLoopRuleConfig;
}
/**
* Option.
*/
interface NoBitwiseOption {
allow?: (
| '^'
| '|'
| '&'
| '<<'
| '>>'
| '>>>'
| '^='
| '|='
| '&='
| '<<='
| '>>='
| '>>>='
| '~'
)[];
int32Hint?: boolean;
}
/**
* Options.
*/
type NoBitwiseOptions = [NoBitwiseOption?];
/**
* Disallow bitwise operators.
*
* @see [no-bitwise](https://eslint.org/docs/latest/rules/no-bitwise)
*/
type NoBitwiseRuleConfig = RuleConfig<NoBitwiseOptions>;
/**
* Disallow bitwise operators.
*
* @see [no-bitwise](https://eslint.org/docs/latest/rules/no-bitwise)
*/
interface NoBitwiseRule {
/**
* Disallow bitwise operators.
*
* @see [no-bitwise](https://eslint.org/docs/latest/rules/no-bitwise)
*/
'no-bitwise': NoBitwiseRuleConfig;
}
/**
* Disallow use of the `Buffer()` constructor.
*
* @deprecated
*
* @see [no-buffer-constructor](https://eslint.org/docs/latest/rules/no-buffer-constructor)
*/
type NoBufferConstructorRuleConfig = RuleConfig<[]>;
/**
* Disallow use of the `Buffer()` constructor.
*
* @deprecated
*
* @see [no-buffer-constructor](https://eslint.org/docs/latest/rules/no-buffer-constructor)
*/
interface NoBufferConstructorRule {
/**
* Disallow use of the `Buffer()` constructor.
*
* @deprecated
*
* @see [no-buffer-constructor](https://eslint.org/docs/latest/rules/no-buffer-constructor)
*/
'no-buffer-constructor': NoBufferConstructorRuleConfig;
}
/**
* Disallow the use of `arguments.caller` or `arguments.callee`.
*
* @see [no-caller](https://eslint.org/docs/latest/rules/no-caller)
*/
type NoCallerRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `arguments.caller` or `arguments.callee`.
*
* @see [no-caller](https://eslint.org/docs/latest/rules/no-caller)
*/
interface NoCallerRule {
/**
* Disallow the use of `arguments.caller` or `arguments.callee`.
*
* @see [no-caller](https://eslint.org/docs/latest/rules/no-caller)
*/
'no-caller': NoCallerRuleConfig;
}
/**
* Disallow lexical declarations in case clauses.
*
* @see [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)
*/
type NoCaseDeclarationsRuleConfig = RuleConfig<[]>;
/**
* Disallow lexical declarations in case clauses.
*
* @see [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)
*/
interface NoCaseDeclarationsRule {
/**
* Disallow lexical declarations in case clauses.
*
* @see [no-case-declarations](https://eslint.org/docs/latest/rules/no-case-declarations)
*/
'no-case-declarations': NoCaseDeclarationsRuleConfig;
}
/**
* Disallow `catch` clause parameters from shadowing variables in the outer scope.
*
* @deprecated
*
* @see [no-catch-shadow](https://eslint.org/docs/latest/rules/no-catch-shadow)
*/
type NoCatchShadowRuleConfig = RuleConfig<[]>;
/**
* Disallow `catch` clause parameters from shadowing variables in the outer scope.
*
* @deprecated
*
* @see [no-catch-shadow](https://eslint.org/docs/latest/rules/no-catch-shadow)
*/
interface NoCatchShadowRule {
/**
* Disallow `catch` clause parameters from shadowing variables in the outer scope.
*
* @deprecated
*
* @see [no-catch-shadow](https://eslint.org/docs/latest/rules/no-catch-shadow)
*/
'no-catch-shadow': NoCatchShadowRuleConfig;
}
/**
* Disallow reassigning class members.
*
* @see [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)
*/
type NoClassAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow reassigning class members.
*
* @see [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)
*/
interface NoClassAssignRule {
/**
* Disallow reassigning class members.
*
* @see [no-class-assign](https://eslint.org/docs/latest/rules/no-class-assign)
*/
'no-class-assign': NoClassAssignRuleConfig;
}
/**
* Disallow comparing against -0.
*
* @see [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)
*/
type NoCompareNegZeroRuleConfig = RuleConfig<[]>;
/**
* Disallow comparing against -0.
*
* @see [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)
*/
interface NoCompareNegZeroRule {
/**
* Disallow comparing against -0.
*
* @see [no-compare-neg-zero](https://eslint.org/docs/latest/rules/no-compare-neg-zero)
*/
'no-compare-neg-zero': NoCompareNegZeroRuleConfig;
}
/**
* Option.
*/
type NoCondAssignOption = 'except-parens' | 'always';
/**
* Options.
*/
type NoCondAssignOptions = [NoCondAssignOption?];
/**
* Disallow assignment operators in conditional expressions.
*
* @see [no-cond-assign](https://eslint.org/docs/latest/rules/no-cond-assign)
*/
type NoCondAssignRuleConfig = RuleConfig<NoCondAssignOptions>;
/**
* Disallow assignment operators in conditional expressions.
*
* @see [no-cond-assign](https://eslint.org/docs/latest/rules/no-cond-assign)
*/
interface NoCondAssignRule {
/**
* Disallow assignment operators in conditional expressions.
*
* @see [no-cond-assign](https://eslint.org/docs/latest/rules/no-cond-assign)
*/
'no-cond-assign': NoCondAssignRuleConfig;
}
/**
* Option.
*/
interface NoConfusingArrowOption {
allowParens?: boolean;
onlyOneSimpleParam?: boolean;
}
/**
* Options.
*/
type NoConfusingArrowOptions = [NoConfusingArrowOption?];
/**
* Disallow arrow functions where they could be confused with comparisons.
*
* @see [no-confusing-arrow](https://eslint.org/docs/latest/rules/no-confusing-arrow)
*/
type NoConfusingArrowRuleConfig = RuleConfig<NoConfusingArrowOptions>;
/**
* Disallow arrow functions where they could be confused with comparisons.
*
* @see [no-confusing-arrow](https://eslint.org/docs/latest/rules/no-confusing-arrow)
*/
interface NoConfusingArrowRule {
/**
* Disallow arrow functions where they could be confused with comparisons.
*
* @see [no-confusing-arrow](https://eslint.org/docs/latest/rules/no-confusing-arrow)
*/
'no-confusing-arrow': NoConfusingArrowRuleConfig;
}
/**
* Option.
*/
interface NoConsoleOption$1 {
/**
* @minItems 1
*/
allow?: [string, ...string[]];
}
/**
* Options.
*/
type NoConsoleOptions$1 = [NoConsoleOption$1?];
/**
* Disallow the use of `console`.
*
* @see [no-console](https://eslint.org/docs/latest/rules/no-console)
*/
type NoConsoleRuleConfig$1 = RuleConfig<NoConsoleOptions$1>;
/**
* Disallow the use of `console`.
*
* @see [no-console](https://eslint.org/docs/latest/rules/no-console)
*/
interface NoConsoleRule$1 {
/**
* Disallow the use of `console`.
*
* @see [no-console](https://eslint.org/docs/latest/rules/no-console)
*/
'no-console': NoConsoleRuleConfig$1;
}
/**
* Disallow reassigning `const` variables.
*
* @see [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)
*/
type NoConstAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow reassigning `const` variables.
*
* @see [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)
*/
interface NoConstAssignRule {
/**
* Disallow reassigning `const` variables.
*
* @see [no-const-assign](https://eslint.org/docs/latest/rules/no-const-assign)
*/
'no-const-assign': NoConstAssignRuleConfig;
}
/**
* Disallow expressions where the operation doesn't affect the value.
*
* @see [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression)
*/
type NoConstantBinaryExpressionRuleConfig = RuleConfig<[]>;
/**
* Disallow expressions where the operation doesn't affect the value.
*
* @see [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression)
*/
interface NoConstantBinaryExpressionRule {
/**
* Disallow expressions where the operation doesn't affect the value.
*
* @see [no-constant-binary-expression](https://eslint.org/docs/latest/rules/no-constant-binary-expression)
*/
'no-constant-binary-expression': NoConstantBinaryExpressionRuleConfig;
}
/**
* Option.
*/
interface NoConstantConditionOption$1 {
checkLoops?: boolean;
}
/**
* Options.
*/
type NoConstantConditionOptions$1 = [NoConstantConditionOption$1?];
/**
* Disallow constant expressions in conditions.
*
* @see [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)
*/
type NoConstantConditionRuleConfig$1 =
RuleConfig<NoConstantConditionOptions$1>;
/**
* Disallow constant expressions in conditions.
*
* @see [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)
*/
interface NoConstantConditionRule$1 {
/**
* Disallow constant expressions in conditions.
*
* @see [no-constant-condition](https://eslint.org/docs/latest/rules/no-constant-condition)
*/
'no-constant-condition': NoConstantConditionRuleConfig$1;
}
/**
* Options.
*/
type NoConstructorReturnOptions = [];
/**
* Disallow returning value from constructor.
*
* @see [no-constructor-return](https://eslint.org/docs/latest/rules/no-constructor-return)
*/
type NoConstructorReturnRuleConfig =
RuleConfig<NoConstructorReturnOptions>;
/**
* Disallow returning value from constructor.
*
* @see [no-constructor-return](https://eslint.org/docs/latest/rules/no-constructor-return)
*/
interface NoConstructorReturnRule {
/**
* Disallow returning value from constructor.
*
* @see [no-constructor-return](https://eslint.org/docs/latest/rules/no-constructor-return)
*/
'no-constructor-return': NoConstructorReturnRuleConfig;
}
/**
* Disallow `continue` statements.
*
* @see [no-continue](https://eslint.org/docs/latest/rules/no-continue)
*/
type NoContinueRuleConfig = RuleConfig<[]>;
/**
* Disallow `continue` statements.
*
* @see [no-continue](https://eslint.org/docs/latest/rules/no-continue)
*/
interface NoContinueRule {
/**
* Disallow `continue` statements.
*
* @see [no-continue](https://eslint.org/docs/latest/rules/no-continue)
*/
'no-continue': NoContinueRuleConfig;
}
/**
* Disallow control characters in regular expressions.
*
* @see [no-control-regex](https://eslint.org/docs/latest/rules/no-control-regex)
*/
type NoControlRegexRuleConfig = RuleConfig<[]>;
/**
* Disallow control characters in regular expressions.
*
* @see [no-control-regex](https://eslint.org/docs/latest/rules/no-control-regex)
*/
interface NoControlRegexRule {
/**
* Disallow control characters in regular expressions.
*
* @see [no-control-regex](https://eslint.org/docs/latest/rules/no-control-regex)
*/
'no-control-regex': NoControlRegexRuleConfig;
}
/**
* Disallow the use of `debugger`.
*
* @see [no-debugger](https://eslint.org/docs/latest/rules/no-debugger)
*/
type NoDebuggerRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `debugger`.
*
* @see [no-debugger](https://eslint.org/docs/latest/rules/no-debugger)
*/
interface NoDebuggerRule {
/**
* Disallow the use of `debugger`.
*
* @see [no-debugger](https://eslint.org/docs/latest/rules/no-debugger)
*/
'no-debugger': NoDebuggerRuleConfig;
}
/**
* Disallow deleting variables.
*
* @see [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)
*/
type NoDeleteVarRuleConfig = RuleConfig<[]>;
/**
* Disallow deleting variables.
*
* @see [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)
*/
interface NoDeleteVarRule {
/**
* Disallow deleting variables.
*
* @see [no-delete-var](https://eslint.org/docs/latest/rules/no-delete-var)
*/
'no-delete-var': NoDeleteVarRuleConfig;
}
/**
* Disallow equal signs explicitly at the beginning of regular expressions.
*
* @see [no-div-regex](https://eslint.org/docs/latest/rules/no-div-regex)
*/
type NoDivRegexRuleConfig = RuleConfig<[]>;
/**
* Disallow equal signs explicitly at the beginning of regular expressions.
*
* @see [no-div-regex](https://eslint.org/docs/latest/rules/no-div-regex)
*/
interface NoDivRegexRule {
/**
* Disallow equal signs explicitly at the beginning of regular expressions.
*
* @see [no-div-regex](https://eslint.org/docs/latest/rules/no-div-regex)
*/
'no-div-regex': NoDivRegexRuleConfig;
}
/**
* Disallow duplicate arguments in `function` definitions.
*
* @see [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)
*/
type NoDupeArgsRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate arguments in `function` definitions.
*
* @see [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)
*/
interface NoDupeArgsRule {
/**
* Disallow duplicate arguments in `function` definitions.
*
* @see [no-dupe-args](https://eslint.org/docs/latest/rules/no-dupe-args)
*/
'no-dupe-args': NoDupeArgsRuleConfig;
}
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)
*/
type NoDupeClassMembersRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)
*/
interface NoDupeClassMembersRule$1 {
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://eslint.org/docs/latest/rules/no-dupe-class-members)
*/
'no-dupe-class-members': NoDupeClassMembersRuleConfig$1;
}
/**
* Disallow duplicate conditions in if-else-if chains.
*
* @see [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)
*/
type NoDupeElseIfRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate conditions in if-else-if chains.
*
* @see [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)
*/
interface NoDupeElseIfRule {
/**
* Disallow duplicate conditions in if-else-if chains.
*
* @see [no-dupe-else-if](https://eslint.org/docs/latest/rules/no-dupe-else-if)
*/
'no-dupe-else-if': NoDupeElseIfRuleConfig;
}
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)
*/
type NoDupeKeysRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)
*/
interface NoDupeKeysRule$2 {
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://eslint.org/docs/latest/rules/no-dupe-keys)
*/
'no-dupe-keys': NoDupeKeysRuleConfig$2;
}
/**
* Disallow duplicate case labels.
*
* @see [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)
*/
type NoDuplicateCaseRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate case labels.
*
* @see [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)
*/
interface NoDuplicateCaseRule {
/**
* Disallow duplicate case labels.
*
* @see [no-duplicate-case](https://eslint.org/docs/latest/rules/no-duplicate-case)
*/
'no-duplicate-case': NoDuplicateCaseRuleConfig;
}
/**
* Option.
*/
interface NoDuplicateImportsOption {
includeExports?: boolean;
}
/**
* Options.
*/
type NoDuplicateImportsOptions = [NoDuplicateImportsOption?];
/**
* Disallow duplicate module imports.
*
* @see [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports)
*/
type NoDuplicateImportsRuleConfig =
RuleConfig<NoDuplicateImportsOptions>;
/**
* Disallow duplicate module imports.
*
* @see [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports)
*/
interface NoDuplicateImportsRule {
/**
* Disallow duplicate module imports.
*
* @see [no-duplicate-imports](https://eslint.org/docs/latest/rules/no-duplicate-imports)
*/
'no-duplicate-imports': NoDuplicateImportsRuleConfig;
}
/**
* Option.
*/
interface NoElseReturnOption {
allowElseIf?: boolean;
}
/**
* Options.
*/
type NoElseReturnOptions = [NoElseReturnOption?];
/**
* Disallow `else` blocks after `return` statements in `if` statements.
*
* @see [no-else-return](https://eslint.org/docs/latest/rules/no-else-return)
*/
type NoElseReturnRuleConfig = RuleConfig<NoElseReturnOptions>;
/**
* Disallow `else` blocks after `return` statements in `if` statements.
*
* @see [no-else-return](https://eslint.org/docs/latest/rules/no-else-return)
*/
interface NoElseReturnRule {
/**
* Disallow `else` blocks after `return` statements in `if` statements.
*
* @see [no-else-return](https://eslint.org/docs/latest/rules/no-else-return)
*/
'no-else-return': NoElseReturnRuleConfig;
}
/**
* Option.
*/
interface NoEmptyOption {
allowEmptyCatch?: boolean;
}
/**
* Options.
*/
type NoEmptyOptions = [NoEmptyOption?];
/**
* Disallow empty block statements.
*
* @see [no-empty](https://eslint.org/docs/latest/rules/no-empty)
*/
type NoEmptyRuleConfig = RuleConfig<NoEmptyOptions>;
/**
* Disallow empty block statements.
*
* @see [no-empty](https://eslint.org/docs/latest/rules/no-empty)
*/
interface NoEmptyRule {
/**
* Disallow empty block statements.
*
* @see [no-empty](https://eslint.org/docs/latest/rules/no-empty)
*/
'no-empty': NoEmptyRuleConfig;
}
/**
* Disallow empty character classes in regular expressions.
*
* @see [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)
*/
type NoEmptyCharacterClassRuleConfig = RuleConfig<[]>;
/**
* Disallow empty character classes in regular expressions.
*
* @see [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)
*/
interface NoEmptyCharacterClassRule {
/**
* Disallow empty character classes in regular expressions.
*
* @see [no-empty-character-class](https://eslint.org/docs/latest/rules/no-empty-character-class)
*/
'no-empty-character-class': NoEmptyCharacterClassRuleConfig;
}
/**
* Option.
*/
interface NoEmptyFunctionOption$1 {
allow?: (
| 'functions'
| 'arrowFunctions'
| 'generatorFunctions'
| 'methods'
| 'generatorMethods'
| 'getters'
| 'setters'
| 'constructors'
| 'asyncFunctions'
| 'asyncMethods'
)[];
}
/**
* Options.
*/
type NoEmptyFunctionOptions$1 = [NoEmptyFunctionOption$1?];
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://eslint.org/docs/latest/rules/no-empty-function)
*/
type NoEmptyFunctionRuleConfig$1 = RuleConfig<NoEmptyFunctionOptions$1>;
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://eslint.org/docs/latest/rules/no-empty-function)
*/
interface NoEmptyFunctionRule$1 {
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://eslint.org/docs/latest/rules/no-empty-function)
*/
'no-empty-function': NoEmptyFunctionRuleConfig$1;
}
/**
* Option.
*/
interface NoEmptyPatternOption$1 {
allowObjectPatternsAsParameters?: boolean;
}
/**
* Options.
*/
type NoEmptyPatternOptions$1 = [NoEmptyPatternOption$1?];
/**
* Disallow empty destructuring patterns.
*
* @see [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
*/
type NoEmptyPatternRuleConfig$1 = RuleConfig<NoEmptyPatternOptions$1>;
/**
* Disallow empty destructuring patterns.
*
* @see [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
*/
interface NoEmptyPatternRule$1 {
/**
* Disallow empty destructuring patterns.
*
* @see [no-empty-pattern](https://eslint.org/docs/latest/rules/no-empty-pattern)
*/
'no-empty-pattern': NoEmptyPatternRuleConfig$1;
}
/**
* Disallow empty static blocks.
*
* @see [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)
*/
type NoEmptyStaticBlockRuleConfig = RuleConfig<[]>;
/**
* Disallow empty static blocks.
*
* @see [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)
*/
interface NoEmptyStaticBlockRule {
/**
* Disallow empty static blocks.
*
* @see [no-empty-static-block](https://eslint.org/docs/latest/rules/no-empty-static-block)
*/
'no-empty-static-block': NoEmptyStaticBlockRuleConfig;
}
/**
* Disallow `null` comparisons without type-checking operators.
*
* @see [no-eq-null](https://eslint.org/docs/latest/rules/no-eq-null)
*/
type NoEqNullRuleConfig = RuleConfig<[]>;
/**
* Disallow `null` comparisons without type-checking operators.
*
* @see [no-eq-null](https://eslint.org/docs/latest/rules/no-eq-null)
*/
interface NoEqNullRule {
/**
* Disallow `null` comparisons without type-checking operators.
*
* @see [no-eq-null](https://eslint.org/docs/latest/rules/no-eq-null)
*/
'no-eq-null': NoEqNullRuleConfig;
}
/**
* Option.
*/
interface NoEvalOption {
allowIndirect?: boolean;
}
/**
* Options.
*/
type NoEvalOptions = [NoEvalOption?];
/**
* Disallow the use of `eval()`.
*
* @see [no-eval](https://eslint.org/docs/latest/rules/no-eval)
*/
type NoEvalRuleConfig = RuleConfig<NoEvalOptions>;
/**
* Disallow the use of `eval()`.
*
* @see [no-eval](https://eslint.org/docs/latest/rules/no-eval)
*/
interface NoEvalRule {
/**
* Disallow the use of `eval()`.
*
* @see [no-eval](https://eslint.org/docs/latest/rules/no-eval)
*/
'no-eval': NoEvalRuleConfig;
}
/**
* Disallow reassigning exceptions in `catch` clauses.
*
* @see [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)
*/
type NoExAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow reassigning exceptions in `catch` clauses.
*
* @see [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)
*/
interface NoExAssignRule {
/**
* Disallow reassigning exceptions in `catch` clauses.
*
* @see [no-ex-assign](https://eslint.org/docs/latest/rules/no-ex-assign)
*/
'no-ex-assign': NoExAssignRuleConfig;
}
/**
* Option.
*/
interface NoExtendNativeOption {
exceptions?: string[];
}
/**
* Options.
*/
type NoExtendNativeOptions = [NoExtendNativeOption?];
/**
* Disallow extending native types.
*
* @see [no-extend-native](https://eslint.org/docs/latest/rules/no-extend-native)
*/
type NoExtendNativeRuleConfig = RuleConfig<NoExtendNativeOptions>;
/**
* Disallow extending native types.
*
* @see [no-extend-native](https://eslint.org/docs/latest/rules/no-extend-native)
*/
interface NoExtendNativeRule {
/**
* Disallow extending native types.
*
* @see [no-extend-native](https://eslint.org/docs/latest/rules/no-extend-native)
*/
'no-extend-native': NoExtendNativeRuleConfig;
}
/**
* Disallow unnecessary calls to `.bind()`.
*
* @see [no-extra-bind](https://eslint.org/docs/latest/rules/no-extra-bind)
*/
type NoExtraBindRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary calls to `.bind()`.
*
* @see [no-extra-bind](https://eslint.org/docs/latest/rules/no-extra-bind)
*/
interface NoExtraBindRule {
/**
* Disallow unnecessary calls to `.bind()`.
*
* @see [no-extra-bind](https://eslint.org/docs/latest/rules/no-extra-bind)
*/
'no-extra-bind': NoExtraBindRuleConfig;
}
/**
* Option.
*/
interface NoExtraBooleanCastOption {
enforceForLogicalOperands?: boolean;
}
/**
* Options.
*/
type NoExtraBooleanCastOptions = [NoExtraBooleanCastOption?];
/**
* Disallow unnecessary boolean casts.
*
* @see [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
*/
type NoExtraBooleanCastRuleConfig =
RuleConfig<NoExtraBooleanCastOptions>;
/**
* Disallow unnecessary boolean casts.
*
* @see [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
*/
interface NoExtraBooleanCastRule {
/**
* Disallow unnecessary boolean casts.
*
* @see [no-extra-boolean-cast](https://eslint.org/docs/latest/rules/no-extra-boolean-cast)
*/
'no-extra-boolean-cast': NoExtraBooleanCastRuleConfig;
}
/**
* Disallow unnecessary labels.
*
* @see [no-extra-label](https://eslint.org/docs/latest/rules/no-extra-label)
*/
type NoExtraLabelRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary labels.
*
* @see [no-extra-label](https://eslint.org/docs/latest/rules/no-extra-label)
*/
interface NoExtraLabelRule {
/**
* Disallow unnecessary labels.
*
* @see [no-extra-label](https://eslint.org/docs/latest/rules/no-extra-label)
*/
'no-extra-label': NoExtraLabelRuleConfig;
}
/**
* Option.
*/
type NoExtraParensOption$2 =
| []
| ['functions']
| []
| ['all']
| [
'all',
{
conditionalAssign?: boolean;
ternaryOperandBinaryExpressions?: boolean;
nestedBinaryExpressions?: boolean;
returnAssign?: boolean;
ignoreJSX?: 'none' | 'all' | 'single-line' | 'multi-line';
enforceForArrowConditionals?: boolean;
enforceForSequenceExpressions?: boolean;
enforceForNewInMemberExpressions?: boolean;
enforceForFunctionPrototypeMethods?: boolean;
allowParensAfterCommentPattern?: string;
},
];
/**
* Options.
*/
type NoExtraParensOptions$2 = NoExtraParensOption$2;
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://eslint.org/docs/latest/rules/no-extra-parens)
*/
type NoExtraParensRuleConfig$2 = RuleConfig<NoExtraParensOptions$2>;
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://eslint.org/docs/latest/rules/no-extra-parens)
*/
interface NoExtraParensRule$2 {
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://eslint.org/docs/latest/rules/no-extra-parens)
*/
'no-extra-parens': NoExtraParensRuleConfig$2;
}
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://eslint.org/docs/latest/rules/no-extra-semi)
*/
type NoExtraSemiRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://eslint.org/docs/latest/rules/no-extra-semi)
*/
interface NoExtraSemiRule$1 {
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://eslint.org/docs/latest/rules/no-extra-semi)
*/
'no-extra-semi': NoExtraSemiRuleConfig$1;
}
/**
* Option.
*/
interface NoFallthroughOption {
commentPattern?: string;
allowEmptyCase?: boolean;
}
/**
* Options.
*/
type NoFallthroughOptions = [NoFallthroughOption?];
/**
* Disallow fallthrough of `case` statements.
*
* @see [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)
*/
type NoFallthroughRuleConfig = RuleConfig<NoFallthroughOptions>;
/**
* Disallow fallthrough of `case` statements.
*
* @see [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)
*/
interface NoFallthroughRule {
/**
* Disallow fallthrough of `case` statements.
*
* @see [no-fallthrough](https://eslint.org/docs/latest/rules/no-fallthrough)
*/
'no-fallthrough': NoFallthroughRuleConfig;
}
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://eslint.org/docs/latest/rules/no-floating-decimal)
*/
type NoFloatingDecimalRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://eslint.org/docs/latest/rules/no-floating-decimal)
*/
interface NoFloatingDecimalRule$1 {
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://eslint.org/docs/latest/rules/no-floating-decimal)
*/
'no-floating-decimal': NoFloatingDecimalRuleConfig$1;
}
/**
* Disallow reassigning `function` declarations.
*
* @see [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)
*/
type NoFuncAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow reassigning `function` declarations.
*
* @see [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)
*/
interface NoFuncAssignRule {
/**
* Disallow reassigning `function` declarations.
*
* @see [no-func-assign](https://eslint.org/docs/latest/rules/no-func-assign)
*/
'no-func-assign': NoFuncAssignRuleConfig;
}
/**
* Option.
*/
interface NoGlobalAssignOption {
exceptions?: string[];
}
/**
* Options.
*/
type NoGlobalAssignOptions = [NoGlobalAssignOption?];
/**
* Disallow assignments to native objects or read-only global variables.
*
* @see [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)
*/
type NoGlobalAssignRuleConfig = RuleConfig<NoGlobalAssignOptions>;
/**
* Disallow assignments to native objects or read-only global variables.
*
* @see [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)
*/
interface NoGlobalAssignRule {
/**
* Disallow assignments to native objects or read-only global variables.
*
* @see [no-global-assign](https://eslint.org/docs/latest/rules/no-global-assign)
*/
'no-global-assign': NoGlobalAssignRuleConfig;
}
/**
* Option.
*/
interface NoImplicitCoercionOption {
boolean?: boolean;
number?: boolean;
string?: boolean;
disallowTemplateShorthand?: boolean;
allow?: ('~' | '!!' | '+' | '*')[];
}
/**
* Options.
*/
type NoImplicitCoercionOptions = [NoImplicitCoercionOption?];
/**
* Disallow shorthand type conversions.
*
* @see [no-implicit-coercion](https://eslint.org/docs/latest/rules/no-implicit-coercion)
*/
type NoImplicitCoercionRuleConfig =
RuleConfig<NoImplicitCoercionOptions>;
/**
* Disallow shorthand type conversions.
*
* @see [no-implicit-coercion](https://eslint.org/docs/latest/rules/no-implicit-coercion)
*/
interface NoImplicitCoercionRule {
/**
* Disallow shorthand type conversions.
*
* @see [no-implicit-coercion](https://eslint.org/docs/latest/rules/no-implicit-coercion)
*/
'no-implicit-coercion': NoImplicitCoercionRuleConfig;
}
/**
* Option.
*/
interface NoImplicitGlobalsOption {
lexicalBindings?: boolean;
}
/**
* Options.
*/
type NoImplicitGlobalsOptions = [NoImplicitGlobalsOption?];
/**
* Disallow declarations in the global scope.
*
* @see [no-implicit-globals](https://eslint.org/docs/latest/rules/no-implicit-globals)
*/
type NoImplicitGlobalsRuleConfig = RuleConfig<NoImplicitGlobalsOptions>;
/**
* Disallow declarations in the global scope.
*
* @see [no-implicit-globals](https://eslint.org/docs/latest/rules/no-implicit-globals)
*/
interface NoImplicitGlobalsRule {
/**
* Disallow declarations in the global scope.
*
* @see [no-implicit-globals](https://eslint.org/docs/latest/rules/no-implicit-globals)
*/
'no-implicit-globals': NoImplicitGlobalsRuleConfig;
}
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://eslint.org/docs/latest/rules/no-implied-eval)
*/
type NoImpliedEvalRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://eslint.org/docs/latest/rules/no-implied-eval)
*/
interface NoImpliedEvalRule$1 {
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://eslint.org/docs/latest/rules/no-implied-eval)
*/
'no-implied-eval': NoImpliedEvalRuleConfig$1;
}
/**
* Disallow assigning to imported bindings.
*
* @see [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)
*/
type NoImportAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow assigning to imported bindings.
*
* @see [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)
*/
interface NoImportAssignRule {
/**
* Disallow assigning to imported bindings.
*
* @see [no-import-assign](https://eslint.org/docs/latest/rules/no-import-assign)
*/
'no-import-assign': NoImportAssignRuleConfig;
}
/**
* Option.
*/
interface NoInlineCommentsOption {
ignorePattern?: string;
}
/**
* Options.
*/
type NoInlineCommentsOptions = [NoInlineCommentsOption?];
/**
* Disallow inline comments after code.
*
* @see [no-inline-comments](https://eslint.org/docs/latest/rules/no-inline-comments)
*/
type NoInlineCommentsRuleConfig = RuleConfig<NoInlineCommentsOptions>;
/**
* Disallow inline comments after code.
*
* @see [no-inline-comments](https://eslint.org/docs/latest/rules/no-inline-comments)
*/
interface NoInlineCommentsRule {
/**
* Disallow inline comments after code.
*
* @see [no-inline-comments](https://eslint.org/docs/latest/rules/no-inline-comments)
*/
'no-inline-comments': NoInlineCommentsRuleConfig;
}
/**
* Option.
*/
type NoInnerDeclarationsOption = 'functions' | 'both';
/**
* Options.
*/
type NoInnerDeclarationsOptions = [NoInnerDeclarationsOption?];
/**
* Disallow variable or `function` declarations in nested blocks.
*
* @see [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)
*/
type NoInnerDeclarationsRuleConfig =
RuleConfig<NoInnerDeclarationsOptions>;
/**
* Disallow variable or `function` declarations in nested blocks.
*
* @see [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)
*/
interface NoInnerDeclarationsRule {
/**
* Disallow variable or `function` declarations in nested blocks.
*
* @see [no-inner-declarations](https://eslint.org/docs/latest/rules/no-inner-declarations)
*/
'no-inner-declarations': NoInnerDeclarationsRuleConfig;
}
/**
* Option.
*/
interface NoInvalidRegexpOption {
allowConstructorFlags?: string[];
}
/**
* Options.
*/
type NoInvalidRegexpOptions = [NoInvalidRegexpOption?];
/**
* Disallow invalid regular expression strings in `RegExp` constructors.
*
* @see [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)
*/
type NoInvalidRegexpRuleConfig = RuleConfig<NoInvalidRegexpOptions>;
/**
* Disallow invalid regular expression strings in `RegExp` constructors.
*
* @see [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)
*/
interface NoInvalidRegexpRule {
/**
* Disallow invalid regular expression strings in `RegExp` constructors.
*
* @see [no-invalid-regexp](https://eslint.org/docs/latest/rules/no-invalid-regexp)
*/
'no-invalid-regexp': NoInvalidRegexpRuleConfig;
}
/**
* Option.
*/
interface NoInvalidThisOption$1 {
capIsConstructor?: boolean;
}
/**
* Options.
*/
type NoInvalidThisOptions$1 = [NoInvalidThisOption$1?];
/**
* Disallow use of `this` in contexts where the value of `this` is `undefined`.
*
* @see [no-invalid-this](https://eslint.org/docs/latest/rules/no-invalid-this)
*/
type NoInvalidThisRuleConfig$1 = RuleConfig<NoInvalidThisOptions$1>;
/**
* Disallow use of `this` in contexts where the value of `this` is `undefined`.
*
* @see [no-invalid-this](https://eslint.org/docs/latest/rules/no-invalid-this)
*/
interface NoInvalidThisRule$1 {
/**
* Disallow use of `this` in contexts where the value of `this` is `undefined`.
*
* @see [no-invalid-this](https://eslint.org/docs/latest/rules/no-invalid-this)
*/
'no-invalid-this': NoInvalidThisRuleConfig$1;
}
/**
* Option.
*/
interface NoIrregularWhitespaceOption$3 {
skipComments?: boolean;
skipStrings?: boolean;
skipTemplates?: boolean;
skipRegExps?: boolean;
skipJSXText?: boolean;
}
/**
* Options.
*/
type NoIrregularWhitespaceOptions$3 = [NoIrregularWhitespaceOption$3?];
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)
*/
type NoIrregularWhitespaceRuleConfig$3 =
RuleConfig<NoIrregularWhitespaceOptions$3>;
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)
*/
interface NoIrregularWhitespaceRule$3 {
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://eslint.org/docs/latest/rules/no-irregular-whitespace)
*/
'no-irregular-whitespace': NoIrregularWhitespaceRuleConfig$3;
}
/**
* Disallow the use of the `__iterator__` property.
*
* @see [no-iterator](https://eslint.org/docs/latest/rules/no-iterator)
*/
type NoIteratorRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of the `__iterator__` property.
*
* @see [no-iterator](https://eslint.org/docs/latest/rules/no-iterator)
*/
interface NoIteratorRule {
/**
* Disallow the use of the `__iterator__` property.
*
* @see [no-iterator](https://eslint.org/docs/latest/rules/no-iterator)
*/
'no-iterator': NoIteratorRuleConfig;
}
/**
* Disallow labels that share a name with a variable.
*
* @see [no-label-var](https://eslint.org/docs/latest/rules/no-label-var)
*/
type NoLabelVarRuleConfig = RuleConfig<[]>;
/**
* Disallow labels that share a name with a variable.
*
* @see [no-label-var](https://eslint.org/docs/latest/rules/no-label-var)
*/
interface NoLabelVarRule {
/**
* Disallow labels that share a name with a variable.
*
* @see [no-label-var](https://eslint.org/docs/latest/rules/no-label-var)
*/
'no-label-var': NoLabelVarRuleConfig;
}
/**
* Option.
*/
interface NoLabelsOption {
allowLoop?: boolean;
allowSwitch?: boolean;
}
/**
* Options.
*/
type NoLabelsOptions = [NoLabelsOption?];
/**
* Disallow labeled statements.
*
* @see [no-labels](https://eslint.org/docs/latest/rules/no-labels)
*/
type NoLabelsRuleConfig = RuleConfig<NoLabelsOptions>;
/**
* Disallow labeled statements.
*
* @see [no-labels](https://eslint.org/docs/latest/rules/no-labels)
*/
interface NoLabelsRule {
/**
* Disallow labeled statements.
*
* @see [no-labels](https://eslint.org/docs/latest/rules/no-labels)
*/
'no-labels': NoLabelsRuleConfig;
}
/**
* Disallow unnecessary nested blocks.
*
* @see [no-lone-blocks](https://eslint.org/docs/latest/rules/no-lone-blocks)
*/
type NoLoneBlocksRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary nested blocks.
*
* @see [no-lone-blocks](https://eslint.org/docs/latest/rules/no-lone-blocks)
*/
interface NoLoneBlocksRule {
/**
* Disallow unnecessary nested blocks.
*
* @see [no-lone-blocks](https://eslint.org/docs/latest/rules/no-lone-blocks)
*/
'no-lone-blocks': NoLoneBlocksRuleConfig;
}
/**
* Disallow `if` statements as the only statement in `else` blocks.
*
* @see [no-lonely-if](https://eslint.org/docs/latest/rules/no-lonely-if)
*/
type NoLonelyIfRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow `if` statements as the only statement in `else` blocks.
*
* @see [no-lonely-if](https://eslint.org/docs/latest/rules/no-lonely-if)
*/
interface NoLonelyIfRule$1 {
/**
* Disallow `if` statements as the only statement in `else` blocks.
*
* @see [no-lonely-if](https://eslint.org/docs/latest/rules/no-lonely-if)
*/
'no-lonely-if': NoLonelyIfRuleConfig$1;
}
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://eslint.org/docs/latest/rules/no-loop-func)
*/
type NoLoopFuncRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://eslint.org/docs/latest/rules/no-loop-func)
*/
interface NoLoopFuncRule$1 {
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://eslint.org/docs/latest/rules/no-loop-func)
*/
'no-loop-func': NoLoopFuncRuleConfig$1;
}
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://eslint.org/docs/latest/rules/no-loss-of-precision)
*/
type NoLossOfPrecisionRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://eslint.org/docs/latest/rules/no-loss-of-precision)
*/
interface NoLossOfPrecisionRule$2 {
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://eslint.org/docs/latest/rules/no-loss-of-precision)
*/
'no-loss-of-precision': NoLossOfPrecisionRuleConfig$2;
}
/**
* Option.
*/
interface NoMagicNumbersOption$1 {
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreDefaultValues?: boolean;
ignoreClassFieldInitialValues?: boolean;
}
/**
* Options.
*/
type NoMagicNumbersOptions$1 = [NoMagicNumbersOption$1?];
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://eslint.org/docs/latest/rules/no-magic-numbers)
*/
type NoMagicNumbersRuleConfig$1 = RuleConfig<NoMagicNumbersOptions$1>;
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://eslint.org/docs/latest/rules/no-magic-numbers)
*/
interface NoMagicNumbersRule$1 {
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://eslint.org/docs/latest/rules/no-magic-numbers)
*/
'no-magic-numbers': NoMagicNumbersRuleConfig$1;
}
/**
* Disallow characters which are made with multiple code points in character class syntax.
*
* @see [no-misleading-character-class](https://eslint.org/docs/latest/rules/no-misleading-character-class)
*/
type NoMisleadingCharacterClassRuleConfig = RuleConfig<[]>;
/**
* Disallow characters which are made with multiple code points in character class syntax.
*
* @see [no-misleading-character-class](https://eslint.org/docs/latest/rules/no-misleading-character-class)
*/
interface NoMisleadingCharacterClassRule {
/**
* Disallow characters which are made with multiple code points in character class syntax.
*
* @see [no-misleading-character-class](https://eslint.org/docs/latest/rules/no-misleading-character-class)
*/
'no-misleading-character-class': NoMisleadingCharacterClassRuleConfig;
}
/**
* Option.
*/
interface NoMixedOperatorsOption {
groups?: [
(
| '+'
| '-'
| '*'
| '/'
| '%'
| '**'
| '&'
| '|'
| '^'
| '~'
| '<<'
| '>>'
| '>>>'
| '=='
| '!='
| '==='
| '!=='
| '>'
| '>='
| '<'
| '<='
| '&&'
| '||'
| 'in'
| 'instanceof'
| '?:'
| '??'
),
(
| '+'
| '-'
| '*'
| '/'
| '%'
| '**'
| '&'
| '|'
| '^'
| '~'
| '<<'
| '>>'
| '>>>'
| '=='
| '!='
| '==='
| '!=='
| '>'
| '>='
| '<'
| '<='
| '&&'
| '||'
| 'in'
| 'instanceof'
| '?:'
| '??'
),
...(
| '+'
| '-'
| '*'
| '/'
| '%'
| '**'
| '&'
| '|'
| '^'
| '~'
| '<<'
| '>>'
| '>>>'
| '=='
| '!='
| '==='
| '!=='
| '>'
| '>='
| '<'
| '<='
| '&&'
| '||'
| 'in'
| 'instanceof'
| '?:'
| '??'
)[],
][];
allowSamePrecedence?: boolean;
}
/**
* Options.
*/
type NoMixedOperatorsOptions = [NoMixedOperatorsOption?];
/**
* Disallow mixed binary operators.
*
* @see [no-mixed-operators](https://eslint.org/docs/latest/rules/no-mixed-operators)
*/
type NoMixedOperatorsRuleConfig = RuleConfig<NoMixedOperatorsOptions>;
/**
* Disallow mixed binary operators.
*
* @see [no-mixed-operators](https://eslint.org/docs/latest/rules/no-mixed-operators)
*/
interface NoMixedOperatorsRule {
/**
* Disallow mixed binary operators.
*
* @see [no-mixed-operators](https://eslint.org/docs/latest/rules/no-mixed-operators)
*/
'no-mixed-operators': NoMixedOperatorsRuleConfig;
}
/**
* Option.
*/
type NoMixedRequiresOption$2 =
| boolean
| {
grouping?: boolean;
allowCall?: boolean;
};
/**
* Options.
*/
type NoMixedRequiresOptions$2 = [NoMixedRequiresOption$2?];
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @deprecated
*
* @see [no-mixed-requires](https://eslint.org/docs/latest/rules/no-mixed-requires)
*/
type NoMixedRequiresRuleConfig$2 = RuleConfig<NoMixedRequiresOptions$2>;
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @deprecated
*
* @see [no-mixed-requires](https://eslint.org/docs/latest/rules/no-mixed-requires)
*/
interface NoMixedRequiresRule$2 {
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @deprecated
*
* @see [no-mixed-requires](https://eslint.org/docs/latest/rules/no-mixed-requires)
*/
'no-mixed-requires': NoMixedRequiresRuleConfig$2;
}
/**
* Option.
*/
type NoMixedSpacesAndTabsOption = 'smart-tabs' | true | false;
/**
* Options.
*/
type NoMixedSpacesAndTabsOptions = [NoMixedSpacesAndTabsOption?];
/**
* Disallow mixed spaces and tabs for indentation.
*
* @see [no-mixed-spaces-and-tabs](https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs)
*/
type NoMixedSpacesAndTabsRuleConfig =
RuleConfig<NoMixedSpacesAndTabsOptions>;
/**
* Disallow mixed spaces and tabs for indentation.
*
* @see [no-mixed-spaces-and-tabs](https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs)
*/
interface NoMixedSpacesAndTabsRule {
/**
* Disallow mixed spaces and tabs for indentation.
*
* @see [no-mixed-spaces-and-tabs](https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs)
*/
'no-mixed-spaces-and-tabs': NoMixedSpacesAndTabsRuleConfig;
}
/**
* Option.
*/
interface NoMultiAssignOption {
ignoreNonDeclaration?: boolean;
}
/**
* Options.
*/
type NoMultiAssignOptions = [NoMultiAssignOption?];
/**
* Disallow use of chained assignment expressions.
*
* @see [no-multi-assign](https://eslint.org/docs/latest/rules/no-multi-assign)
*/
type NoMultiAssignRuleConfig = RuleConfig<NoMultiAssignOptions>;
/**
* Disallow use of chained assignment expressions.
*
* @see [no-multi-assign](https://eslint.org/docs/latest/rules/no-multi-assign)
*/
interface NoMultiAssignRule {
/**
* Disallow use of chained assignment expressions.
*
* @see [no-multi-assign](https://eslint.org/docs/latest/rules/no-multi-assign)
*/
'no-multi-assign': NoMultiAssignRuleConfig;
}
/**
* Option.
*/
interface NoMultiSpacesOption$1 {
exceptions?: {
/**
*/
[k: string]: boolean;
};
ignoreEOLComments?: boolean;
}
/**
* Options.
*/
type NoMultiSpacesOptions$1 = [NoMultiSpacesOption$1?];
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.org/docs/latest/rules/no-multi-spaces)
*/
type NoMultiSpacesRuleConfig$1 = RuleConfig<NoMultiSpacesOptions$1>;
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.org/docs/latest/rules/no-multi-spaces)
*/
interface NoMultiSpacesRule$1 {
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.org/docs/latest/rules/no-multi-spaces)
*/
'no-multi-spaces': NoMultiSpacesRuleConfig$1;
}
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://eslint.org/docs/latest/rules/no-multi-str)
*/
type NoMultiStrRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://eslint.org/docs/latest/rules/no-multi-str)
*/
interface NoMultiStrRule$1 {
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://eslint.org/docs/latest/rules/no-multi-str)
*/
'no-multi-str': NoMultiStrRuleConfig$1;
}
/**
* Option.
*/
interface NoMultipleEmptyLinesOption$1 {
max: number;
maxEOF?: number;
maxBOF?: number;
}
/**
* Options.
*/
type NoMultipleEmptyLinesOptions$1 = [NoMultipleEmptyLinesOption$1?];
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://eslint.org/docs/latest/rules/no-multiple-empty-lines)
*/
type NoMultipleEmptyLinesRuleConfig$1 =
RuleConfig<NoMultipleEmptyLinesOptions$1>;
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://eslint.org/docs/latest/rules/no-multiple-empty-lines)
*/
interface NoMultipleEmptyLinesRule$1 {
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://eslint.org/docs/latest/rules/no-multiple-empty-lines)
*/
'no-multiple-empty-lines': NoMultipleEmptyLinesRuleConfig$1;
}
/**
* Option.
*/
interface NoNativeReassignOption {
exceptions?: string[];
}
/**
* Options.
*/
type NoNativeReassignOptions = [NoNativeReassignOption?];
/**
* Disallow assignments to native objects or read-only global variables.
*
* @deprecated
*
* @see [no-native-reassign](https://eslint.org/docs/latest/rules/no-native-reassign)
*/
type NoNativeReassignRuleConfig = RuleConfig<NoNativeReassignOptions>;
/**
* Disallow assignments to native objects or read-only global variables.
*
* @deprecated
*
* @see [no-native-reassign](https://eslint.org/docs/latest/rules/no-native-reassign)
*/
interface NoNativeReassignRule {
/**
* Disallow assignments to native objects or read-only global variables.
*
* @deprecated
*
* @see [no-native-reassign](https://eslint.org/docs/latest/rules/no-native-reassign)
*/
'no-native-reassign': NoNativeReassignRuleConfig;
}
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://eslint.org/docs/latest/rules/no-negated-condition)
*/
type NoNegatedConditionRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://eslint.org/docs/latest/rules/no-negated-condition)
*/
interface NoNegatedConditionRule$1 {
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://eslint.org/docs/latest/rules/no-negated-condition)
*/
'no-negated-condition': NoNegatedConditionRuleConfig$1;
}
/**
* Disallow negating the left operand in `in` expressions.
*
* @deprecated
*
* @see [no-negated-in-lhs](https://eslint.org/docs/latest/rules/no-negated-in-lhs)
*/
type NoNegatedInLhsRuleConfig = RuleConfig<[]>;
/**
* Disallow negating the left operand in `in` expressions.
*
* @deprecated
*
* @see [no-negated-in-lhs](https://eslint.org/docs/latest/rules/no-negated-in-lhs)
*/
interface NoNegatedInLhsRule {
/**
* Disallow negating the left operand in `in` expressions.
*
* @deprecated
*
* @see [no-negated-in-lhs](https://eslint.org/docs/latest/rules/no-negated-in-lhs)
*/
'no-negated-in-lhs': NoNegatedInLhsRuleConfig;
}
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://eslint.org/docs/latest/rules/no-nested-ternary)
*/
type NoNestedTernaryRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://eslint.org/docs/latest/rules/no-nested-ternary)
*/
interface NoNestedTernaryRule$1 {
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://eslint.org/docs/latest/rules/no-nested-ternary)
*/
'no-nested-ternary': NoNestedTernaryRuleConfig$1;
}
/**
* Disallow `new` operators outside of assignments or comparisons.
*
* @see [no-new](https://eslint.org/docs/latest/rules/no-new)
*/
type NoNewRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators outside of assignments or comparisons.
*
* @see [no-new](https://eslint.org/docs/latest/rules/no-new)
*/
interface NoNewRule {
/**
* Disallow `new` operators outside of assignments or comparisons.
*
* @see [no-new](https://eslint.org/docs/latest/rules/no-new)
*/
'no-new': NoNewRuleConfig;
}
/**
* Disallow `new` operators with the `Function` object.
*
* @see [no-new-func](https://eslint.org/docs/latest/rules/no-new-func)
*/
type NoNewFuncRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators with the `Function` object.
*
* @see [no-new-func](https://eslint.org/docs/latest/rules/no-new-func)
*/
interface NoNewFuncRule {
/**
* Disallow `new` operators with the `Function` object.
*
* @see [no-new-func](https://eslint.org/docs/latest/rules/no-new-func)
*/
'no-new-func': NoNewFuncRuleConfig;
}
/**
* Disallow `new` operators with global non-constructor functions.
*
* @see [no-new-native-nonconstructor](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor)
*/
type NoNewNativeNonconstructorRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators with global non-constructor functions.
*
* @see [no-new-native-nonconstructor](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor)
*/
interface NoNewNativeNonconstructorRule {
/**
* Disallow `new` operators with global non-constructor functions.
*
* @see [no-new-native-nonconstructor](https://eslint.org/docs/latest/rules/no-new-native-nonconstructor)
*/
'no-new-native-nonconstructor': NoNewNativeNonconstructorRuleConfig;
}
/**
* Disallow `Object` constructors.
*
* @deprecated
*
* @see [no-new-object](https://eslint.org/docs/latest/rules/no-new-object)
*/
type NoNewObjectRuleConfig = RuleConfig<[]>;
/**
* Disallow `Object` constructors.
*
* @deprecated
*
* @see [no-new-object](https://eslint.org/docs/latest/rules/no-new-object)
*/
interface NoNewObjectRule {
/**
* Disallow `Object` constructors.
*
* @deprecated
*
* @see [no-new-object](https://eslint.org/docs/latest/rules/no-new-object)
*/
'no-new-object': NoNewObjectRuleConfig;
}
/**
* Disallow `new` operators with calls to `require`.
*
* @deprecated
*
* @see [no-new-require](https://eslint.org/docs/latest/rules/no-new-require)
*/
type NoNewRequireRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow `new` operators with calls to `require`.
*
* @deprecated
*
* @see [no-new-require](https://eslint.org/docs/latest/rules/no-new-require)
*/
interface NoNewRequireRule$2 {
/**
* Disallow `new` operators with calls to `require`.
*
* @deprecated
*
* @see [no-new-require](https://eslint.org/docs/latest/rules/no-new-require)
*/
'no-new-require': NoNewRequireRuleConfig$2;
}
/**
* Disallow `new` operators with the `Symbol` object.
*
* @see [no-new-symbol](https://eslint.org/docs/latest/rules/no-new-symbol)
*/
type NoNewSymbolRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators with the `Symbol` object.
*
* @see [no-new-symbol](https://eslint.org/docs/latest/rules/no-new-symbol)
*/
interface NoNewSymbolRule {
/**
* Disallow `new` operators with the `Symbol` object.
*
* @see [no-new-symbol](https://eslint.org/docs/latest/rules/no-new-symbol)
*/
'no-new-symbol': NoNewSymbolRuleConfig;
}
/**
* Disallow `new` operators with the `String`, `Number`, and `Boolean` objects.
*
* @see [no-new-wrappers](https://eslint.org/docs/latest/rules/no-new-wrappers)
*/
type NoNewWrappersRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators with the `String`, `Number`, and `Boolean` objects.
*
* @see [no-new-wrappers](https://eslint.org/docs/latest/rules/no-new-wrappers)
*/
interface NoNewWrappersRule {
/**
* Disallow `new` operators with the `String`, `Number`, and `Boolean` objects.
*
* @see [no-new-wrappers](https://eslint.org/docs/latest/rules/no-new-wrappers)
*/
'no-new-wrappers': NoNewWrappersRuleConfig;
}
/**
* Disallow `\8` and `\9` escape sequences in string literals.
*
* @see [no-nonoctal-decimal-escape](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
*/
type NoNonoctalDecimalEscapeRuleConfig = RuleConfig<[]>;
/**
* Disallow `\8` and `\9` escape sequences in string literals.
*
* @see [no-nonoctal-decimal-escape](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
*/
interface NoNonoctalDecimalEscapeRule {
/**
* Disallow `\8` and `\9` escape sequences in string literals.
*
* @see [no-nonoctal-decimal-escape](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
*/
'no-nonoctal-decimal-escape': NoNonoctalDecimalEscapeRuleConfig;
}
/**
* Disallow calling global object properties as functions.
*
* @see [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)
*/
type NoObjCallsRuleConfig = RuleConfig<[]>;
/**
* Disallow calling global object properties as functions.
*
* @see [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)
*/
interface NoObjCallsRule {
/**
* Disallow calling global object properties as functions.
*
* @see [no-obj-calls](https://eslint.org/docs/latest/rules/no-obj-calls)
*/
'no-obj-calls': NoObjCallsRuleConfig;
}
/**
* Disallow calls to the `Object` constructor without an argument.
*
* @see [no-object-constructor](https://eslint.org/docs/latest/rules/no-object-constructor)
*/
type NoObjectConstructorRuleConfig = RuleConfig<[]>;
/**
* Disallow calls to the `Object` constructor without an argument.
*
* @see [no-object-constructor](https://eslint.org/docs/latest/rules/no-object-constructor)
*/
interface NoObjectConstructorRule {
/**
* Disallow calls to the `Object` constructor without an argument.
*
* @see [no-object-constructor](https://eslint.org/docs/latest/rules/no-object-constructor)
*/
'no-object-constructor': NoObjectConstructorRuleConfig;
}
/**
* Disallow octal literals.
*
* @see [no-octal](https://eslint.org/docs/latest/rules/no-octal)
*/
type NoOctalRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow octal literals.
*
* @see [no-octal](https://eslint.org/docs/latest/rules/no-octal)
*/
interface NoOctalRule$1 {
/**
* Disallow octal literals.
*
* @see [no-octal](https://eslint.org/docs/latest/rules/no-octal)
*/
'no-octal': NoOctalRuleConfig$1;
}
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://eslint.org/docs/latest/rules/no-octal-escape)
*/
type NoOctalEscapeRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://eslint.org/docs/latest/rules/no-octal-escape)
*/
interface NoOctalEscapeRule$1 {
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://eslint.org/docs/latest/rules/no-octal-escape)
*/
'no-octal-escape': NoOctalEscapeRuleConfig$1;
}
/**
* Option.
*/
type NoParamReassignOption =
| {
props?: false;
}
| {
props?: true;
ignorePropertyModificationsFor?: string[];
ignorePropertyModificationsForRegex?: string[];
};
/**
* Options.
*/
type NoParamReassignOptions = [NoParamReassignOption?];
/**
* Disallow reassigning `function` parameters.
*
* @see [no-param-reassign](https://eslint.org/docs/latest/rules/no-param-reassign)
*/
type NoParamReassignRuleConfig = RuleConfig<NoParamReassignOptions>;
/**
* Disallow reassigning `function` parameters.
*
* @see [no-param-reassign](https://eslint.org/docs/latest/rules/no-param-reassign)
*/
interface NoParamReassignRule {
/**
* Disallow reassigning `function` parameters.
*
* @see [no-param-reassign](https://eslint.org/docs/latest/rules/no-param-reassign)
*/
'no-param-reassign': NoParamReassignRuleConfig;
}
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @deprecated
*
* @see [no-path-concat](https://eslint.org/docs/latest/rules/no-path-concat)
*/
type NoPathConcatRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @deprecated
*
* @see [no-path-concat](https://eslint.org/docs/latest/rules/no-path-concat)
*/
interface NoPathConcatRule$2 {
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @deprecated
*
* @see [no-path-concat](https://eslint.org/docs/latest/rules/no-path-concat)
*/
'no-path-concat': NoPathConcatRuleConfig$2;
}
/**
* Option.
*/
interface NoPlusplusOption {
allowForLoopAfterthoughts?: boolean;
}
/**
* Options.
*/
type NoPlusplusOptions = [NoPlusplusOption?];
/**
* Disallow the unary operators `++` and `--`.
*
* @see [no-plusplus](https://eslint.org/docs/latest/rules/no-plusplus)
*/
type NoPlusplusRuleConfig = RuleConfig<NoPlusplusOptions>;
/**
* Disallow the unary operators `++` and `--`.
*
* @see [no-plusplus](https://eslint.org/docs/latest/rules/no-plusplus)
*/
interface NoPlusplusRule {
/**
* Disallow the unary operators `++` and `--`.
*
* @see [no-plusplus](https://eslint.org/docs/latest/rules/no-plusplus)
*/
'no-plusplus': NoPlusplusRuleConfig;
}
/**
* Disallow the use of `process.env`.
*
* @deprecated
*
* @see [no-process-env](https://eslint.org/docs/latest/rules/no-process-env)
*/
type NoProcessEnvRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow the use of `process.env`.
*
* @deprecated
*
* @see [no-process-env](https://eslint.org/docs/latest/rules/no-process-env)
*/
interface NoProcessEnvRule$2 {
/**
* Disallow the use of `process.env`.
*
* @deprecated
*
* @see [no-process-env](https://eslint.org/docs/latest/rules/no-process-env)
*/
'no-process-env': NoProcessEnvRuleConfig$2;
}
/**
* Disallow the use of `process.exit()`.
*
* @deprecated
*
* @see [no-process-exit](https://eslint.org/docs/latest/rules/no-process-exit)
*/
type NoProcessExitRuleConfig$3 = RuleConfig<[]>;
/**
* Disallow the use of `process.exit()`.
*
* @deprecated
*
* @see [no-process-exit](https://eslint.org/docs/latest/rules/no-process-exit)
*/
interface NoProcessExitRule$3 {
/**
* Disallow the use of `process.exit()`.
*
* @deprecated
*
* @see [no-process-exit](https://eslint.org/docs/latest/rules/no-process-exit)
*/
'no-process-exit': NoProcessExitRuleConfig$3;
}
/**
* Option.
*/
interface NoPromiseExecutorReturnOption {
allowVoid?: boolean;
}
/**
* Options.
*/
type NoPromiseExecutorReturnOptions = [NoPromiseExecutorReturnOption?];
/**
* Disallow returning values from Promise executor functions.
*
* @see [no-promise-executor-return](https://eslint.org/docs/latest/rules/no-promise-executor-return)
*/
type NoPromiseExecutorReturnRuleConfig =
RuleConfig<NoPromiseExecutorReturnOptions>;
/**
* Disallow returning values from Promise executor functions.
*
* @see [no-promise-executor-return](https://eslint.org/docs/latest/rules/no-promise-executor-return)
*/
interface NoPromiseExecutorReturnRule {
/**
* Disallow returning values from Promise executor functions.
*
* @see [no-promise-executor-return](https://eslint.org/docs/latest/rules/no-promise-executor-return)
*/
'no-promise-executor-return': NoPromiseExecutorReturnRuleConfig;
}
/**
* Disallow the use of the `__proto__` property.
*
* @see [no-proto](https://eslint.org/docs/latest/rules/no-proto)
*/
type NoProtoRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of the `__proto__` property.
*
* @see [no-proto](https://eslint.org/docs/latest/rules/no-proto)
*/
interface NoProtoRule {
/**
* Disallow the use of the `__proto__` property.
*
* @see [no-proto](https://eslint.org/docs/latest/rules/no-proto)
*/
'no-proto': NoProtoRuleConfig;
}
/**
* Disallow calling some `Object.prototype` methods directly on objects.
*
* @see [no-prototype-builtins](https://eslint.org/docs/latest/rules/no-prototype-builtins)
*/
type NoPrototypeBuiltinsRuleConfig = RuleConfig<[]>;
/**
* Disallow calling some `Object.prototype` methods directly on objects.
*
* @see [no-prototype-builtins](https://eslint.org/docs/latest/rules/no-prototype-builtins)
*/
interface NoPrototypeBuiltinsRule {
/**
* Disallow calling some `Object.prototype` methods directly on objects.
*
* @see [no-prototype-builtins](https://eslint.org/docs/latest/rules/no-prototype-builtins)
*/
'no-prototype-builtins': NoPrototypeBuiltinsRuleConfig;
}
/**
* Option.
*/
interface NoRedeclareOption$1 {
builtinGlobals?: boolean;
}
/**
* Options.
*/
type NoRedeclareOptions$1 = [NoRedeclareOption$1?];
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)
*/
type NoRedeclareRuleConfig$1 = RuleConfig<NoRedeclareOptions$1>;
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)
*/
interface NoRedeclareRule$1 {
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)
*/
'no-redeclare': NoRedeclareRuleConfig$1;
}
/**
* Disallow multiple spaces in regular expressions.
*
* @see [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)
*/
type NoRegexSpacesRuleConfig = RuleConfig<[]>;
/**
* Disallow multiple spaces in regular expressions.
*
* @see [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)
*/
interface NoRegexSpacesRule {
/**
* Disallow multiple spaces in regular expressions.
*
* @see [no-regex-spaces](https://eslint.org/docs/latest/rules/no-regex-spaces)
*/
'no-regex-spaces': NoRegexSpacesRuleConfig;
}
/**
* Option.
*/
type NoRestrictedExportsOption =
| {
restrictedNamedExports?: string[];
}
| {
restrictedNamedExports?: string[];
restrictDefaultExports?: {
direct?: boolean;
named?: boolean;
defaultFrom?: boolean;
namedFrom?: boolean;
namespaceFrom?: boolean;
};
};
/**
* Options.
*/
type NoRestrictedExportsOptions = [NoRestrictedExportsOption?];
/**
* Disallow specified names in exports.
*
* @see [no-restricted-exports](https://eslint.org/docs/latest/rules/no-restricted-exports)
*/
type NoRestrictedExportsRuleConfig =
RuleConfig<NoRestrictedExportsOptions>;
/**
* Disallow specified names in exports.
*
* @see [no-restricted-exports](https://eslint.org/docs/latest/rules/no-restricted-exports)
*/
interface NoRestrictedExportsRule {
/**
* Disallow specified names in exports.
*
* @see [no-restricted-exports](https://eslint.org/docs/latest/rules/no-restricted-exports)
*/
'no-restricted-exports': NoRestrictedExportsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedGlobalsOption = (
| string
| {
name: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedGlobalsOptions = NoRestrictedGlobalsOption;
/**
* Disallow specified global variables.
*
* @see [no-restricted-globals](https://eslint.org/docs/latest/rules/no-restricted-globals)
*/
type NoRestrictedGlobalsRuleConfig =
RuleConfig<NoRestrictedGlobalsOptions>;
/**
* Disallow specified global variables.
*
* @see [no-restricted-globals](https://eslint.org/docs/latest/rules/no-restricted-globals)
*/
interface NoRestrictedGlobalsRule {
/**
* Disallow specified global variables.
*
* @see [no-restricted-globals](https://eslint.org/docs/latest/rules/no-restricted-globals)
*/
'no-restricted-globals': NoRestrictedGlobalsRuleConfig;
}
/**
* Option.
*/
type NoRestrictedImportsOption$1 =
| (
| string
| {
name: string;
message?: string;
importNames?: string[];
}
)[]
| []
| [
{
paths?: (
| string
| {
name: string;
message?: string;
importNames?: string[];
}
)[];
patterns?:
| string[]
| {
/**
* @minItems 1
*/
importNames?: [string, ...string[]];
/**
* @minItems 1
*/
group: [string, ...string[]];
message?: string;
caseSensitive?: boolean;
}[];
},
];
/**
* Options.
*/
type NoRestrictedImportsOptions$1 = NoRestrictedImportsOption$1;
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://eslint.org/docs/latest/rules/no-restricted-imports)
*/
type NoRestrictedImportsRuleConfig$1 =
RuleConfig<NoRestrictedImportsOptions$1>;
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://eslint.org/docs/latest/rules/no-restricted-imports)
*/
interface NoRestrictedImportsRule$1 {
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://eslint.org/docs/latest/rules/no-restricted-imports)
*/
'no-restricted-imports': NoRestrictedImportsRuleConfig$1;
}
/**
* Option.
*/
type NoRestrictedModulesOption =
| (
| string
| {
name: string;
message?: string;
}
)[]
| {
paths?: (
| string
| {
name: string;
message?: string;
}
)[];
patterns?: string[];
}[];
/**
* Options.
*/
type NoRestrictedModulesOptions = NoRestrictedModulesOption;
/**
* Disallow specified modules when loaded by `require`.
*
* @deprecated
*
* @see [no-restricted-modules](https://eslint.org/docs/latest/rules/no-restricted-modules)
*/
type NoRestrictedModulesRuleConfig =
RuleConfig<NoRestrictedModulesOptions>;
/**
* Disallow specified modules when loaded by `require`.
*
* @deprecated
*
* @see [no-restricted-modules](https://eslint.org/docs/latest/rules/no-restricted-modules)
*/
interface NoRestrictedModulesRule {
/**
* Disallow specified modules when loaded by `require`.
*
* @deprecated
*
* @see [no-restricted-modules](https://eslint.org/docs/latest/rules/no-restricted-modules)
*/
'no-restricted-modules': NoRestrictedModulesRuleConfig;
}
/**
* Option.
*/
type NoRestrictedPropertiesOption = (
| {
object: string;
property?: string;
message?: string;
}
| {
object?: string;
property: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedPropertiesOptions = NoRestrictedPropertiesOption;
/**
* Disallow certain properties on certain objects.
*
* @see [no-restricted-properties](https://eslint.org/docs/latest/rules/no-restricted-properties)
*/
type NoRestrictedPropertiesRuleConfig =
RuleConfig<NoRestrictedPropertiesOptions>;
/**
* Disallow certain properties on certain objects.
*
* @see [no-restricted-properties](https://eslint.org/docs/latest/rules/no-restricted-properties)
*/
interface NoRestrictedPropertiesRule {
/**
* Disallow certain properties on certain objects.
*
* @see [no-restricted-properties](https://eslint.org/docs/latest/rules/no-restricted-properties)
*/
'no-restricted-properties': NoRestrictedPropertiesRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedSyntaxOption$2 = (
| string
| {
selector: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedSyntaxOptions$2 = NoRestrictedSyntaxOption$2;
/**
* Disallow specified syntax.
*
* @see [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax)
*/
type NoRestrictedSyntaxRuleConfig$2 =
RuleConfig<NoRestrictedSyntaxOptions$2>;
/**
* Disallow specified syntax.
*
* @see [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax)
*/
interface NoRestrictedSyntaxRule$2 {
/**
* Disallow specified syntax.
*
* @see [no-restricted-syntax](https://eslint.org/docs/latest/rules/no-restricted-syntax)
*/
'no-restricted-syntax': NoRestrictedSyntaxRuleConfig$2;
}
/**
* Option.
*/
type NoReturnAssignOption = 'except-parens' | 'always';
/**
* Options.
*/
type NoReturnAssignOptions = [NoReturnAssignOption?];
/**
* Disallow assignment operators in `return` statements.
*
* @see [no-return-assign](https://eslint.org/docs/latest/rules/no-return-assign)
*/
type NoReturnAssignRuleConfig = RuleConfig<NoReturnAssignOptions>;
/**
* Disallow assignment operators in `return` statements.
*
* @see [no-return-assign](https://eslint.org/docs/latest/rules/no-return-assign)
*/
interface NoReturnAssignRule {
/**
* Disallow assignment operators in `return` statements.
*
* @see [no-return-assign](https://eslint.org/docs/latest/rules/no-return-assign)
*/
'no-return-assign': NoReturnAssignRuleConfig;
}
/**
* Disallow unnecessary `return await`.
*
* @deprecated
*
* @see [no-return-await](https://eslint.org/docs/latest/rules/no-return-await)
*/
type NoReturnAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary `return await`.
*
* @deprecated
*
* @see [no-return-await](https://eslint.org/docs/latest/rules/no-return-await)
*/
interface NoReturnAwaitRule {
/**
* Disallow unnecessary `return await`.
*
* @deprecated
*
* @see [no-return-await](https://eslint.org/docs/latest/rules/no-return-await)
*/
'no-return-await': NoReturnAwaitRuleConfig;
}
/**
* Disallow `javascript:` urls.
*
* @see [no-script-url](https://eslint.org/docs/latest/rules/no-script-url)
*/
type NoScriptUrlRuleConfig = RuleConfig<[]>;
/**
* Disallow `javascript:` urls.
*
* @see [no-script-url](https://eslint.org/docs/latest/rules/no-script-url)
*/
interface NoScriptUrlRule {
/**
* Disallow `javascript:` urls.
*
* @see [no-script-url](https://eslint.org/docs/latest/rules/no-script-url)
*/
'no-script-url': NoScriptUrlRuleConfig;
}
/**
* Option.
*/
interface NoSelfAssignOption {
props?: boolean;
}
/**
* Options.
*/
type NoSelfAssignOptions = [NoSelfAssignOption?];
/**
* Disallow assignments where both sides are exactly the same.
*
* @see [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)
*/
type NoSelfAssignRuleConfig = RuleConfig<NoSelfAssignOptions>;
/**
* Disallow assignments where both sides are exactly the same.
*
* @see [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)
*/
interface NoSelfAssignRule {
/**
* Disallow assignments where both sides are exactly the same.
*
* @see [no-self-assign](https://eslint.org/docs/latest/rules/no-self-assign)
*/
'no-self-assign': NoSelfAssignRuleConfig;
}
/**
* Disallow comparisons where both sides are exactly the same.
*
* @see [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare)
*/
type NoSelfCompareRuleConfig = RuleConfig<[]>;
/**
* Disallow comparisons where both sides are exactly the same.
*
* @see [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare)
*/
interface NoSelfCompareRule {
/**
* Disallow comparisons where both sides are exactly the same.
*
* @see [no-self-compare](https://eslint.org/docs/latest/rules/no-self-compare)
*/
'no-self-compare': NoSelfCompareRuleConfig;
}
/**
* Option.
*/
interface NoSequencesOption {
allowInParentheses?: boolean;
}
/**
* Options.
*/
type NoSequencesOptions = [NoSequencesOption?];
/**
* Disallow comma operators.
*
* @see [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)
*/
type NoSequencesRuleConfig = RuleConfig<NoSequencesOptions>;
/**
* Disallow comma operators.
*
* @see [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)
*/
interface NoSequencesRule {
/**
* Disallow comma operators.
*
* @see [no-sequences](https://eslint.org/docs/latest/rules/no-sequences)
*/
'no-sequences': NoSequencesRuleConfig;
}
/**
* Disallow returning values from setters.
*
* @see [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)
*/
type NoSetterReturnRuleConfig = RuleConfig<[]>;
/**
* Disallow returning values from setters.
*
* @see [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)
*/
interface NoSetterReturnRule {
/**
* Disallow returning values from setters.
*
* @see [no-setter-return](https://eslint.org/docs/latest/rules/no-setter-return)
*/
'no-setter-return': NoSetterReturnRuleConfig;
}
/**
* Option.
*/
interface NoShadowOption$1 {
builtinGlobals?: boolean;
hoist?: 'all' | 'functions' | 'never';
allow?: string[];
ignoreOnInitialization?: boolean;
}
/**
* Options.
*/
type NoShadowOptions$1 = [NoShadowOption$1?];
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://eslint.org/docs/latest/rules/no-shadow)
*/
type NoShadowRuleConfig$1 = RuleConfig<NoShadowOptions$1>;
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://eslint.org/docs/latest/rules/no-shadow)
*/
interface NoShadowRule$1 {
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://eslint.org/docs/latest/rules/no-shadow)
*/
'no-shadow': NoShadowRuleConfig$1;
}
/**
* Disallow identifiers from shadowing restricted names.
*
* @see [no-shadow-restricted-names](https://eslint.org/docs/latest/rules/no-shadow-restricted-names)
*/
type NoShadowRestrictedNamesRuleConfig = RuleConfig<[]>;
/**
* Disallow identifiers from shadowing restricted names.
*
* @see [no-shadow-restricted-names](https://eslint.org/docs/latest/rules/no-shadow-restricted-names)
*/
interface NoShadowRestrictedNamesRule {
/**
* Disallow identifiers from shadowing restricted names.
*
* @see [no-shadow-restricted-names](https://eslint.org/docs/latest/rules/no-shadow-restricted-names)
*/
'no-shadow-restricted-names': NoShadowRestrictedNamesRuleConfig;
}
/**
* Disallow spacing between function identifiers and their applications (deprecated).
*
* @deprecated
*
* @see [no-spaced-func](https://eslint.org/docs/latest/rules/no-spaced-func)
*/
type NoSpacedFuncRuleConfig = RuleConfig<[]>;
/**
* Disallow spacing between function identifiers and their applications (deprecated).
*
* @deprecated
*
* @see [no-spaced-func](https://eslint.org/docs/latest/rules/no-spaced-func)
*/
interface NoSpacedFuncRule {
/**
* Disallow spacing between function identifiers and their applications (deprecated).
*
* @deprecated
*
* @see [no-spaced-func](https://eslint.org/docs/latest/rules/no-spaced-func)
*/
'no-spaced-func': NoSpacedFuncRuleConfig;
}
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)
*/
type NoSparseArraysRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)
*/
interface NoSparseArraysRule$2 {
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://eslint.org/docs/latest/rules/no-sparse-arrays)
*/
'no-sparse-arrays': NoSparseArraysRuleConfig$2;
}
/**
* Option.
*/
interface NoSyncOption$2 {
allowAtRootLevel?: boolean;
}
/**
* Options.
*/
type NoSyncOptions$2 = [NoSyncOption$2?];
/**
* Disallow synchronous methods.
*
* @deprecated
*
* @see [no-sync](https://eslint.org/docs/latest/rules/no-sync)
*/
type NoSyncRuleConfig$2 = RuleConfig<NoSyncOptions$2>;
/**
* Disallow synchronous methods.
*
* @deprecated
*
* @see [no-sync](https://eslint.org/docs/latest/rules/no-sync)
*/
interface NoSyncRule$2 {
/**
* Disallow synchronous methods.
*
* @deprecated
*
* @see [no-sync](https://eslint.org/docs/latest/rules/no-sync)
*/
'no-sync': NoSyncRuleConfig$2;
}
/**
* Option.
*/
interface NoTabsOption {
allowIndentationTabs?: boolean;
}
/**
* Options.
*/
type NoTabsOptions = [NoTabsOption?];
/**
* Disallow all tabs.
*
* @see [no-tabs](https://eslint.org/docs/latest/rules/no-tabs)
*/
type NoTabsRuleConfig = RuleConfig<NoTabsOptions>;
/**
* Disallow all tabs.
*
* @see [no-tabs](https://eslint.org/docs/latest/rules/no-tabs)
*/
interface NoTabsRule {
/**
* Disallow all tabs.
*
* @see [no-tabs](https://eslint.org/docs/latest/rules/no-tabs)
*/
'no-tabs': NoTabsRuleConfig;
}
/**
* Disallow template literal placeholder syntax in regular strings.
*
* @see [no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)
*/
type NoTemplateCurlyInStringRuleConfig = RuleConfig<[]>;
/**
* Disallow template literal placeholder syntax in regular strings.
*
* @see [no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)
*/
interface NoTemplateCurlyInStringRule {
/**
* Disallow template literal placeholder syntax in regular strings.
*
* @see [no-template-curly-in-string](https://eslint.org/docs/latest/rules/no-template-curly-in-string)
*/
'no-template-curly-in-string': NoTemplateCurlyInStringRuleConfig;
}
/**
* Disallow ternary operators.
*
* @see [no-ternary](https://eslint.org/docs/latest/rules/no-ternary)
*/
type NoTernaryRuleConfig = RuleConfig<[]>;
/**
* Disallow ternary operators.
*
* @see [no-ternary](https://eslint.org/docs/latest/rules/no-ternary)
*/
interface NoTernaryRule {
/**
* Disallow ternary operators.
*
* @see [no-ternary](https://eslint.org/docs/latest/rules/no-ternary)
*/
'no-ternary': NoTernaryRuleConfig;
}
/**
* Disallow `this`/`super` before calling `super()` in constructors.
*
* @see [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)
*/
type NoThisBeforeSuperRuleConfig = RuleConfig<[]>;
/**
* Disallow `this`/`super` before calling `super()` in constructors.
*
* @see [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)
*/
interface NoThisBeforeSuperRule {
/**
* Disallow `this`/`super` before calling `super()` in constructors.
*
* @see [no-this-before-super](https://eslint.org/docs/latest/rules/no-this-before-super)
*/
'no-this-before-super': NoThisBeforeSuperRuleConfig;
}
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://eslint.org/docs/latest/rules/no-throw-literal)
*/
type NoThrowLiteralRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://eslint.org/docs/latest/rules/no-throw-literal)
*/
interface NoThrowLiteralRule$1 {
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://eslint.org/docs/latest/rules/no-throw-literal)
*/
'no-throw-literal': NoThrowLiteralRuleConfig$1;
}
/**
* Option.
*/
interface NoTrailingSpacesOption {
skipBlankLines?: boolean;
ignoreComments?: boolean;
}
/**
* Options.
*/
type NoTrailingSpacesOptions = [NoTrailingSpacesOption?];
/**
* Disallow trailing whitespace at the end of lines.
*
* @see [no-trailing-spaces](https://eslint.org/docs/latest/rules/no-trailing-spaces)
*/
type NoTrailingSpacesRuleConfig = RuleConfig<NoTrailingSpacesOptions>;
/**
* Disallow trailing whitespace at the end of lines.
*
* @see [no-trailing-spaces](https://eslint.org/docs/latest/rules/no-trailing-spaces)
*/
interface NoTrailingSpacesRule {
/**
* Disallow trailing whitespace at the end of lines.
*
* @see [no-trailing-spaces](https://eslint.org/docs/latest/rules/no-trailing-spaces)
*/
'no-trailing-spaces': NoTrailingSpacesRuleConfig;
}
/**
* Option.
*/
interface NoUndefOption {
typeof?: boolean;
}
/**
* Options.
*/
type NoUndefOptions = [NoUndefOption?];
/**
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
*
* @see [no-undef](https://eslint.org/docs/latest/rules/no-undef)
*/
type NoUndefRuleConfig = RuleConfig<NoUndefOptions>;
/**
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
*
* @see [no-undef](https://eslint.org/docs/latest/rules/no-undef)
*/
interface NoUndefRule {
/**
* Disallow the use of undeclared variables unless mentioned in `/*global ` comments.
*
* @see [no-undef](https://eslint.org/docs/latest/rules/no-undef)
*/
'no-undef': NoUndefRuleConfig;
}
/**
* Disallow initializing variables to `undefined`.
*
* @see [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)
*/
type NoUndefInitRuleConfig = RuleConfig<[]>;
/**
* Disallow initializing variables to `undefined`.
*
* @see [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)
*/
interface NoUndefInitRule {
/**
* Disallow initializing variables to `undefined`.
*
* @see [no-undef-init](https://eslint.org/docs/latest/rules/no-undef-init)
*/
'no-undef-init': NoUndefInitRuleConfig;
}
/**
* Disallow the use of `undefined` as an identifier.
*
* @see [no-undefined](https://eslint.org/docs/latest/rules/no-undefined)
*/
type NoUndefinedRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `undefined` as an identifier.
*
* @see [no-undefined](https://eslint.org/docs/latest/rules/no-undefined)
*/
interface NoUndefinedRule {
/**
* Disallow the use of `undefined` as an identifier.
*
* @see [no-undefined](https://eslint.org/docs/latest/rules/no-undefined)
*/
'no-undefined': NoUndefinedRuleConfig;
}
/**
* Option.
*/
interface NoUnderscoreDangleOption {
allow?: string[];
allowAfterThis?: boolean;
allowAfterSuper?: boolean;
allowAfterThisConstructor?: boolean;
enforceInMethodNames?: boolean;
allowFunctionParams?: boolean;
enforceInClassFields?: boolean;
allowInArrayDestructuring?: boolean;
allowInObjectDestructuring?: boolean;
}
/**
* Options.
*/
type NoUnderscoreDangleOptions = [NoUnderscoreDangleOption?];
/**
* Disallow dangling underscores in identifiers.
*
* @see [no-underscore-dangle](https://eslint.org/docs/latest/rules/no-underscore-dangle)
*/
type NoUnderscoreDangleRuleConfig =
RuleConfig<NoUnderscoreDangleOptions>;
/**
* Disallow dangling underscores in identifiers.
*
* @see [no-underscore-dangle](https://eslint.org/docs/latest/rules/no-underscore-dangle)
*/
interface NoUnderscoreDangleRule {
/**
* Disallow dangling underscores in identifiers.
*
* @see [no-underscore-dangle](https://eslint.org/docs/latest/rules/no-underscore-dangle)
*/
'no-underscore-dangle': NoUnderscoreDangleRuleConfig;
}
/**
* Disallow confusing multiline expressions.
*
* @see [no-unexpected-multiline](https://eslint.org/docs/latest/rules/no-unexpected-multiline)
*/
type NoUnexpectedMultilineRuleConfig = RuleConfig<[]>;
/**
* Disallow confusing multiline expressions.
*
* @see [no-unexpected-multiline](https://eslint.org/docs/latest/rules/no-unexpected-multiline)
*/
interface NoUnexpectedMultilineRule {
/**
* Disallow confusing multiline expressions.
*
* @see [no-unexpected-multiline](https://eslint.org/docs/latest/rules/no-unexpected-multiline)
*/
'no-unexpected-multiline': NoUnexpectedMultilineRuleConfig;
}
/**
* Disallow unmodified loop conditions.
*
* @see [no-unmodified-loop-condition](https://eslint.org/docs/latest/rules/no-unmodified-loop-condition)
*/
type NoUnmodifiedLoopConditionRuleConfig = RuleConfig<[]>;
/**
* Disallow unmodified loop conditions.
*
* @see [no-unmodified-loop-condition](https://eslint.org/docs/latest/rules/no-unmodified-loop-condition)
*/
interface NoUnmodifiedLoopConditionRule {
/**
* Disallow unmodified loop conditions.
*
* @see [no-unmodified-loop-condition](https://eslint.org/docs/latest/rules/no-unmodified-loop-condition)
*/
'no-unmodified-loop-condition': NoUnmodifiedLoopConditionRuleConfig;
}
/**
* Option.
*/
interface NoUnneededTernaryOption {
defaultAssignment?: boolean;
}
/**
* Options.
*/
type NoUnneededTernaryOptions = [NoUnneededTernaryOption?];
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
type NoUnneededTernaryRuleConfig = RuleConfig<NoUnneededTernaryOptions>;
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
interface NoUnneededTernaryRule {
/**
* Disallow ternary operators when simpler alternatives exist.
*
* @see [no-unneeded-ternary](https://eslint.org/docs/latest/rules/no-unneeded-ternary)
*/
'no-unneeded-ternary': NoUnneededTernaryRuleConfig;
}
/**
* Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
*
* @see [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)
*/
type NoUnreachableRuleConfig = RuleConfig<[]>;
/**
* Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
*
* @see [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)
*/
interface NoUnreachableRule {
/**
* Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements.
*
* @see [no-unreachable](https://eslint.org/docs/latest/rules/no-unreachable)
*/
'no-unreachable': NoUnreachableRuleConfig;
}
/**
* Option.
*/
interface NoUnreachableLoopOption {
ignore?: (
| 'WhileStatement'
| 'DoWhileStatement'
| 'ForStatement'
| 'ForInStatement'
| 'ForOfStatement'
)[];
}
/**
* Options.
*/
type NoUnreachableLoopOptions = [NoUnreachableLoopOption?];
/**
* Disallow loops with a body that allows only one iteration.
*
* @see [no-unreachable-loop](https://eslint.org/docs/latest/rules/no-unreachable-loop)
*/
type NoUnreachableLoopRuleConfig = RuleConfig<NoUnreachableLoopOptions>;
/**
* Disallow loops with a body that allows only one iteration.
*
* @see [no-unreachable-loop](https://eslint.org/docs/latest/rules/no-unreachable-loop)
*/
interface NoUnreachableLoopRule {
/**
* Disallow loops with a body that allows only one iteration.
*
* @see [no-unreachable-loop](https://eslint.org/docs/latest/rules/no-unreachable-loop)
*/
'no-unreachable-loop': NoUnreachableLoopRuleConfig;
}
/**
* Disallow control flow statements in `finally` blocks.
*
* @see [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)
*/
type NoUnsafeFinallyRuleConfig = RuleConfig<[]>;
/**
* Disallow control flow statements in `finally` blocks.
*
* @see [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)
*/
interface NoUnsafeFinallyRule {
/**
* Disallow control flow statements in `finally` blocks.
*
* @see [no-unsafe-finally](https://eslint.org/docs/latest/rules/no-unsafe-finally)
*/
'no-unsafe-finally': NoUnsafeFinallyRuleConfig;
}
/**
* Option.
*/
interface NoUnsafeNegationOption {
enforceForOrderingRelations?: boolean;
}
/**
* Options.
*/
type NoUnsafeNegationOptions = [NoUnsafeNegationOption?];
/**
* Disallow negating the left operand of relational operators.
*
* @see [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)
*/
type NoUnsafeNegationRuleConfig = RuleConfig<NoUnsafeNegationOptions>;
/**
* Disallow negating the left operand of relational operators.
*
* @see [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)
*/
interface NoUnsafeNegationRule {
/**
* Disallow negating the left operand of relational operators.
*
* @see [no-unsafe-negation](https://eslint.org/docs/latest/rules/no-unsafe-negation)
*/
'no-unsafe-negation': NoUnsafeNegationRuleConfig;
}
/**
* Option.
*/
interface NoUnsafeOptionalChainingOption {
disallowArithmeticOperators?: boolean;
}
/**
* Options.
*/
type NoUnsafeOptionalChainingOptions = [NoUnsafeOptionalChainingOption?];
/**
* Disallow use of optional chaining in contexts where the `undefined` value is not allowed.
*
* @see [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
*/
type NoUnsafeOptionalChainingRuleConfig =
RuleConfig<NoUnsafeOptionalChainingOptions>;
/**
* Disallow use of optional chaining in contexts where the `undefined` value is not allowed.
*
* @see [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
*/
interface NoUnsafeOptionalChainingRule {
/**
* Disallow use of optional chaining in contexts where the `undefined` value is not allowed.
*
* @see [no-unsafe-optional-chaining](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
*/
'no-unsafe-optional-chaining': NoUnsafeOptionalChainingRuleConfig;
}
/**
* Option.
*/
interface NoUnusedExpressionsOption$1 {
allowShortCircuit?: boolean;
allowTernary?: boolean;
allowTaggedTemplates?: boolean;
enforceForJSX?: boolean;
}
/**
* Options.
*/
type NoUnusedExpressionsOptions$1 = [NoUnusedExpressionsOption$1?];
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://eslint.org/docs/latest/rules/no-unused-expressions)
*/
type NoUnusedExpressionsRuleConfig$1 =
RuleConfig<NoUnusedExpressionsOptions$1>;
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://eslint.org/docs/latest/rules/no-unused-expressions)
*/
interface NoUnusedExpressionsRule$1 {
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://eslint.org/docs/latest/rules/no-unused-expressions)
*/
'no-unused-expressions': NoUnusedExpressionsRuleConfig$1;
}
/**
* Disallow unused labels.
*
* @see [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)
*/
type NoUnusedLabelsRuleConfig = RuleConfig<[]>;
/**
* Disallow unused labels.
*
* @see [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)
*/
interface NoUnusedLabelsRule {
/**
* Disallow unused labels.
*
* @see [no-unused-labels](https://eslint.org/docs/latest/rules/no-unused-labels)
*/
'no-unused-labels': NoUnusedLabelsRuleConfig;
}
/**
* Disallow unused private class members.
*
* @see [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)
*/
type NoUnusedPrivateClassMembersRuleConfig = RuleConfig<[]>;
/**
* Disallow unused private class members.
*
* @see [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)
*/
interface NoUnusedPrivateClassMembersRule {
/**
* Disallow unused private class members.
*
* @see [no-unused-private-class-members](https://eslint.org/docs/latest/rules/no-unused-private-class-members)
*/
'no-unused-private-class-members': NoUnusedPrivateClassMembersRuleConfig;
}
/**
* Option.
*/
type NoUnusedVarsOption$2 =
| ('all' | 'local')
| {
vars?: 'all' | 'local';
varsIgnorePattern?: string;
args?: 'all' | 'after-used' | 'none';
ignoreRestSiblings?: boolean;
argsIgnorePattern?: string;
caughtErrors?: 'all' | 'none';
caughtErrorsIgnorePattern?: string;
destructuredArrayIgnorePattern?: string;
};
/**
* Options.
*/
type NoUnusedVarsOptions$2 = [NoUnusedVarsOption$2?];
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)
*/
type NoUnusedVarsRuleConfig$2 = RuleConfig<NoUnusedVarsOptions$2>;
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)
*/
interface NoUnusedVarsRule$2 {
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars)
*/
'no-unused-vars': NoUnusedVarsRuleConfig$2;
}
/**
* Option.
*/
type NoUseBeforeDefineOption$1 =
| 'nofunc'
| {
functions?: boolean;
classes?: boolean;
variables?: boolean;
allowNamedExports?: boolean;
};
/**
* Options.
*/
type NoUseBeforeDefineOptions$1 = [NoUseBeforeDefineOption$1?];
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://eslint.org/docs/latest/rules/no-use-before-define)
*/
type NoUseBeforeDefineRuleConfig$1 = RuleConfig<NoUseBeforeDefineOptions$1>;
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://eslint.org/docs/latest/rules/no-use-before-define)
*/
interface NoUseBeforeDefineRule$1 {
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://eslint.org/docs/latest/rules/no-use-before-define)
*/
'no-use-before-define': NoUseBeforeDefineRuleConfig$1;
}
/**
* Disallow useless backreferences in regular expressions.
*
* @see [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference)
*/
type NoUselessBackreferenceRuleConfig = RuleConfig<[]>;
/**
* Disallow useless backreferences in regular expressions.
*
* @see [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference)
*/
interface NoUselessBackreferenceRule {
/**
* Disallow useless backreferences in regular expressions.
*
* @see [no-useless-backreference](https://eslint.org/docs/latest/rules/no-useless-backreference)
*/
'no-useless-backreference': NoUselessBackreferenceRuleConfig;
}
/**
* Disallow unnecessary calls to `.call()` and `.apply()`.
*
* @see [no-useless-call](https://eslint.org/docs/latest/rules/no-useless-call)
*/
type NoUselessCallRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary calls to `.call()` and `.apply()`.
*
* @see [no-useless-call](https://eslint.org/docs/latest/rules/no-useless-call)
*/
interface NoUselessCallRule {
/**
* Disallow unnecessary calls to `.call()` and `.apply()`.
*
* @see [no-useless-call](https://eslint.org/docs/latest/rules/no-useless-call)
*/
'no-useless-call': NoUselessCallRuleConfig;
}
/**
* Disallow unnecessary `catch` clauses.
*
* @see [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch)
*/
type NoUselessCatchRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unnecessary `catch` clauses.
*
* @see [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch)
*/
interface NoUselessCatchRule$1 {
/**
* Disallow unnecessary `catch` clauses.
*
* @see [no-useless-catch](https://eslint.org/docs/latest/rules/no-useless-catch)
*/
'no-useless-catch': NoUselessCatchRuleConfig$1;
}
/**
* Option.
*/
interface NoUselessComputedKeyOption {
enforceForClassMembers?: boolean;
}
/**
* Options.
*/
type NoUselessComputedKeyOptions = [NoUselessComputedKeyOption?];
/**
* Disallow unnecessary computed property keys in objects and classes.
*
* @see [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key)
*/
type NoUselessComputedKeyRuleConfig =
RuleConfig<NoUselessComputedKeyOptions>;
/**
* Disallow unnecessary computed property keys in objects and classes.
*
* @see [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key)
*/
interface NoUselessComputedKeyRule {
/**
* Disallow unnecessary computed property keys in objects and classes.
*
* @see [no-useless-computed-key](https://eslint.org/docs/latest/rules/no-useless-computed-key)
*/
'no-useless-computed-key': NoUselessComputedKeyRuleConfig;
}
/**
* Disallow unnecessary concatenation of literals or template literals.
*
* @see [no-useless-concat](https://eslint.org/docs/latest/rules/no-useless-concat)
*/
type NoUselessConcatRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unnecessary concatenation of literals or template literals.
*
* @see [no-useless-concat](https://eslint.org/docs/latest/rules/no-useless-concat)
*/
interface NoUselessConcatRule$1 {
/**
* Disallow unnecessary concatenation of literals or template literals.
*
* @see [no-useless-concat](https://eslint.org/docs/latest/rules/no-useless-concat)
*/
'no-useless-concat': NoUselessConcatRuleConfig$1;
}
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://eslint.org/docs/latest/rules/no-useless-constructor)
*/
type NoUselessConstructorRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://eslint.org/docs/latest/rules/no-useless-constructor)
*/
interface NoUselessConstructorRule$1 {
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://eslint.org/docs/latest/rules/no-useless-constructor)
*/
'no-useless-constructor': NoUselessConstructorRuleConfig$1;
}
/**
* Disallow unnecessary escape characters.
*
* @see [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)
*/
type NoUselessEscapeRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unnecessary escape characters.
*
* @see [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)
*/
interface NoUselessEscapeRule$1 {
/**
* Disallow unnecessary escape characters.
*
* @see [no-useless-escape](https://eslint.org/docs/latest/rules/no-useless-escape)
*/
'no-useless-escape': NoUselessEscapeRuleConfig$1;
}
/**
* Option.
*/
interface NoUselessRenameOption {
ignoreDestructuring?: boolean;
ignoreImport?: boolean;
ignoreExport?: boolean;
}
/**
* Options.
*/
type NoUselessRenameOptions = [NoUselessRenameOption?];
/**
* Disallow renaming import, export, and destructured assignments to the same name.
*
* @see [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)
*/
type NoUselessRenameRuleConfig = RuleConfig<NoUselessRenameOptions>;
/**
* Disallow renaming import, export, and destructured assignments to the same name.
*
* @see [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)
*/
interface NoUselessRenameRule {
/**
* Disallow renaming import, export, and destructured assignments to the same name.
*
* @see [no-useless-rename](https://eslint.org/docs/latest/rules/no-useless-rename)
*/
'no-useless-rename': NoUselessRenameRuleConfig;
}
/**
* Disallow redundant return statements.
*
* @see [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return)
*/
type NoUselessReturnRuleConfig = RuleConfig<[]>;
/**
* Disallow redundant return statements.
*
* @see [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return)
*/
interface NoUselessReturnRule {
/**
* Disallow redundant return statements.
*
* @see [no-useless-return](https://eslint.org/docs/latest/rules/no-useless-return)
*/
'no-useless-return': NoUselessReturnRuleConfig;
}
/**
* Require `let` or `const` instead of `var`.
*
* @see [no-var](https://eslint.org/docs/latest/rules/no-var)
*/
type NoVarRuleConfig = RuleConfig<[]>;
/**
* Require `let` or `const` instead of `var`.
*
* @see [no-var](https://eslint.org/docs/latest/rules/no-var)
*/
interface NoVarRule {
/**
* Require `let` or `const` instead of `var`.
*
* @see [no-var](https://eslint.org/docs/latest/rules/no-var)
*/
'no-var': NoVarRuleConfig;
}
/**
* Option.
*/
interface NoVoidOption {
allowAsStatement?: boolean;
}
/**
* Options.
*/
type NoVoidOptions = [NoVoidOption?];
/**
* Disallow `void` operators.
*
* @see [no-void](https://eslint.org/docs/latest/rules/no-void)
*/
type NoVoidRuleConfig = RuleConfig<NoVoidOptions>;
/**
* Disallow `void` operators.
*
* @see [no-void](https://eslint.org/docs/latest/rules/no-void)
*/
interface NoVoidRule {
/**
* Disallow `void` operators.
*
* @see [no-void](https://eslint.org/docs/latest/rules/no-void)
*/
'no-void': NoVoidRuleConfig;
}
/**
* Option.
*/
interface NoWarningCommentsOption {
terms?: string[];
location?: 'start' | 'anywhere';
/**
* @minItems 1
*/
decoration?: [string, ...string[]];
}
/**
* Options.
*/
type NoWarningCommentsOptions = [NoWarningCommentsOption?];
/**
* Disallow specified warning terms in comments.
*
* @see [no-warning-comments](https://eslint.org/docs/latest/rules/no-warning-comments)
*/
type NoWarningCommentsRuleConfig = RuleConfig<NoWarningCommentsOptions>;
/**
* Disallow specified warning terms in comments.
*
* @see [no-warning-comments](https://eslint.org/docs/latest/rules/no-warning-comments)
*/
interface NoWarningCommentsRule {
/**
* Disallow specified warning terms in comments.
*
* @see [no-warning-comments](https://eslint.org/docs/latest/rules/no-warning-comments)
*/
'no-warning-comments': NoWarningCommentsRuleConfig;
}
/**
* Disallow whitespace before properties.
*
* @see [no-whitespace-before-property](https://eslint.org/docs/latest/rules/no-whitespace-before-property)
*/
type NoWhitespaceBeforePropertyRuleConfig = RuleConfig<[]>;
/**
* Disallow whitespace before properties.
*
* @see [no-whitespace-before-property](https://eslint.org/docs/latest/rules/no-whitespace-before-property)
*/
interface NoWhitespaceBeforePropertyRule {
/**
* Disallow whitespace before properties.
*
* @see [no-whitespace-before-property](https://eslint.org/docs/latest/rules/no-whitespace-before-property)
*/
'no-whitespace-before-property': NoWhitespaceBeforePropertyRuleConfig;
}
/**
* Disallow `with` statements.
*
* @see [no-with](https://eslint.org/docs/latest/rules/no-with)
*/
type NoWithRuleConfig = RuleConfig<[]>;
/**
* Disallow `with` statements.
*
* @see [no-with](https://eslint.org/docs/latest/rules/no-with)
*/
interface NoWithRule {
/**
* Disallow `with` statements.
*
* @see [no-with](https://eslint.org/docs/latest/rules/no-with)
*/
'no-with': NoWithRuleConfig;
}
/**
* Config.
*/
interface NonblockStatementBodyPositionConfig {
overrides?: {
if?: 'beside' | 'below' | 'any';
else?: 'beside' | 'below' | 'any';
while?: 'beside' | 'below' | 'any';
do?: 'beside' | 'below' | 'any';
for?: 'beside' | 'below' | 'any';
};
}
/**
* Option.
*/
type NonblockStatementBodyPositionOption = 'beside' | 'below' | 'any';
/**
* Options.
*/
type NonblockStatementBodyPositionOptions = [
NonblockStatementBodyPositionOption?,
NonblockStatementBodyPositionConfig?,
];
/**
* Enforce the location of single-line statements.
*
* @see [nonblock-statement-body-position](https://eslint.org/docs/latest/rules/nonblock-statement-body-position)
*/
type NonblockStatementBodyPositionRuleConfig =
RuleConfig<NonblockStatementBodyPositionOptions>;
/**
* Enforce the location of single-line statements.
*
* @see [nonblock-statement-body-position](https://eslint.org/docs/latest/rules/nonblock-statement-body-position)
*/
interface NonblockStatementBodyPositionRule {
/**
* Enforce the location of single-line statements.
*
* @see [nonblock-statement-body-position](https://eslint.org/docs/latest/rules/nonblock-statement-body-position)
*/
'nonblock-statement-body-position': NonblockStatementBodyPositionRuleConfig;
}
/**
* Option.
*/
type ObjectCurlyNewlineOption$2 =
| (
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
}
)
| {
ObjectExpression?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ObjectPattern?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ImportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ExportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
};
/**
* Options.
*/
type ObjectCurlyNewlineOptions$2 = [ObjectCurlyNewlineOption$2?];
/**
* Enforce consistent line breaks after opening and before closing braces.
*
* @see [object-curly-newline](https://eslint.org/docs/latest/rules/object-curly-newline)
*/
type ObjectCurlyNewlineRuleConfig$2 =
RuleConfig<ObjectCurlyNewlineOptions$2>;
/**
* Enforce consistent line breaks after opening and before closing braces.
*
* @see [object-curly-newline](https://eslint.org/docs/latest/rules/object-curly-newline)
*/
interface ObjectCurlyNewlineRule$2 {
/**
* Enforce consistent line breaks after opening and before closing braces.
*
* @see [object-curly-newline](https://eslint.org/docs/latest/rules/object-curly-newline)
*/
'object-curly-newline': ObjectCurlyNewlineRuleConfig$2;
}
/**
* Config.
*/
interface ObjectCurlySpacingConfig$3 {
arraysInObjects?: boolean;
objectsInObjects?: boolean;
}
/**
* Option.
*/
type ObjectCurlySpacingOption$3 = 'always' | 'never';
/**
* Options.
*/
type ObjectCurlySpacingOptions$3 = [
ObjectCurlySpacingOption$3?,
ObjectCurlySpacingConfig$3?,
];
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://eslint.org/docs/latest/rules/object-curly-spacing)
*/
type ObjectCurlySpacingRuleConfig$3 =
RuleConfig<ObjectCurlySpacingOptions$3>;
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://eslint.org/docs/latest/rules/object-curly-spacing)
*/
interface ObjectCurlySpacingRule$3 {
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://eslint.org/docs/latest/rules/object-curly-spacing)
*/
'object-curly-spacing': ObjectCurlySpacingRuleConfig$3;
}
/**
* Option.
*/
interface ObjectPropertyNewlineOption$2 {
allowAllPropertiesOnSameLine?: boolean;
allowMultiplePropertiesPerLine?: boolean;
}
/**
* Options.
*/
type ObjectPropertyNewlineOptions$2 = [ObjectPropertyNewlineOption$2?];
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://eslint.org/docs/latest/rules/object-property-newline)
*/
type ObjectPropertyNewlineRuleConfig$2 =
RuleConfig<ObjectPropertyNewlineOptions$2>;
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://eslint.org/docs/latest/rules/object-property-newline)
*/
interface ObjectPropertyNewlineRule$2 {
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://eslint.org/docs/latest/rules/object-property-newline)
*/
'object-property-newline': ObjectPropertyNewlineRuleConfig$2;
}
/**
* Option.
*/
type ObjectShorthandOption$1 =
| []
| [
| 'always'
| 'methods'
| 'properties'
| 'never'
| 'consistent'
| 'consistent-as-needed',
]
| []
| ['always' | 'methods' | 'properties']
| [
'always' | 'methods' | 'properties',
{
avoidQuotes?: boolean;
},
]
| []
| ['always' | 'methods']
| [
'always' | 'methods',
{
ignoreConstructors?: boolean;
methodsIgnorePattern?: string;
avoidQuotes?: boolean;
avoidExplicitReturnArrows?: boolean;
},
];
/**
* Options.
*/
type ObjectShorthandOptions$1 = ObjectShorthandOption$1;
/**
* Require or disallow method and property shorthand syntax for object literals.
*
* @see [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)
*/
type ObjectShorthandRuleConfig$1 = RuleConfig<ObjectShorthandOptions$1>;
/**
* Require or disallow method and property shorthand syntax for object literals.
*
* @see [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)
*/
interface ObjectShorthandRule$1 {
/**
* Require or disallow method and property shorthand syntax for object literals.
*
* @see [object-shorthand](https://eslint.org/docs/latest/rules/object-shorthand)
*/
'object-shorthand': ObjectShorthandRuleConfig$1;
}
/**
* Option.
*/
type OneVarOption =
| ('always' | 'never' | 'consecutive')
| {
separateRequires?: boolean;
var?: 'always' | 'never' | 'consecutive';
let?: 'always' | 'never' | 'consecutive';
const?: 'always' | 'never' | 'consecutive';
}
| {
initialized?: 'always' | 'never' | 'consecutive';
uninitialized?: 'always' | 'never' | 'consecutive';
};
/**
* Options.
*/
type OneVarOptions = [OneVarOption?];
/**
* Enforce variables to be declared either together or separately in functions.
*
* @see [one-var](https://eslint.org/docs/latest/rules/one-var)
*/
type OneVarRuleConfig = RuleConfig<OneVarOptions>;
/**
* Enforce variables to be declared either together or separately in functions.
*
* @see [one-var](https://eslint.org/docs/latest/rules/one-var)
*/
interface OneVarRule {
/**
* Enforce variables to be declared either together or separately in functions.
*
* @see [one-var](https://eslint.org/docs/latest/rules/one-var)
*/
'one-var': OneVarRuleConfig;
}
/**
* Option.
*/
type OneVarDeclarationPerLineOption = 'always' | 'initializations';
/**
* Options.
*/
type OneVarDeclarationPerLineOptions = [OneVarDeclarationPerLineOption?];
/**
* Require or disallow newlines around variable declarations.
*
* @see [one-var-declaration-per-line](https://eslint.org/docs/latest/rules/one-var-declaration-per-line)
*/
type OneVarDeclarationPerLineRuleConfig =
RuleConfig<OneVarDeclarationPerLineOptions>;
/**
* Require or disallow newlines around variable declarations.
*
* @see [one-var-declaration-per-line](https://eslint.org/docs/latest/rules/one-var-declaration-per-line)
*/
interface OneVarDeclarationPerLineRule {
/**
* Require or disallow newlines around variable declarations.
*
* @see [one-var-declaration-per-line](https://eslint.org/docs/latest/rules/one-var-declaration-per-line)
*/
'one-var-declaration-per-line': OneVarDeclarationPerLineRuleConfig;
}
/**
* Option.
*/
type OperatorAssignmentOption = 'always' | 'never';
/**
* Options.
*/
type OperatorAssignmentOptions = [OperatorAssignmentOption?];
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
type OperatorAssignmentRuleConfig =
RuleConfig<OperatorAssignmentOptions>;
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
interface OperatorAssignmentRule {
/**
* Require or disallow assignment operator shorthand where possible.
*
* @see [operator-assignment](https://eslint.org/docs/latest/rules/operator-assignment)
*/
'operator-assignment': OperatorAssignmentRuleConfig;
}
/**
* Config.
*/
interface OperatorLinebreakConfig$1 {
overrides?: {
[k: string]: 'after' | 'before' | 'none' | 'ignore';
};
}
/**
* Option.
*/
type OperatorLinebreakOption$1 = 'after' | 'before' | 'none' | null;
/**
* Options.
*/
type OperatorLinebreakOptions$1 = [
OperatorLinebreakOption$1?,
OperatorLinebreakConfig$1?,
];
/**
* Enforce consistent linebreak style for operators.
*
* @see [operator-linebreak](https://eslint.org/docs/latest/rules/operator-linebreak)
*/
type OperatorLinebreakRuleConfig$1 = RuleConfig<OperatorLinebreakOptions$1>;
/**
* Enforce consistent linebreak style for operators.
*
* @see [operator-linebreak](https://eslint.org/docs/latest/rules/operator-linebreak)
*/
interface OperatorLinebreakRule$1 {
/**
* Enforce consistent linebreak style for operators.
*
* @see [operator-linebreak](https://eslint.org/docs/latest/rules/operator-linebreak)
*/
'operator-linebreak': OperatorLinebreakRuleConfig$1;
}
/**
* Config.
*/
interface PaddedBlocksConfig {
allowSingleLineBlocks?: boolean;
}
/**
* Option.
*/
type PaddedBlocksOption =
| ('always' | 'never')
| {
blocks?: 'always' | 'never';
switches?: 'always' | 'never';
classes?: 'always' | 'never';
};
/**
* Options.
*/
type PaddedBlocksOptions = [PaddedBlocksOption?, PaddedBlocksConfig?];
/**
* Require or disallow padding within blocks.
*
* @see [padded-blocks](https://eslint.org/docs/latest/rules/padded-blocks)
*/
type PaddedBlocksRuleConfig = RuleConfig<PaddedBlocksOptions>;
/**
* Require or disallow padding within blocks.
*
* @see [padded-blocks](https://eslint.org/docs/latest/rules/padded-blocks)
*/
interface PaddedBlocksRule {
/**
* Require or disallow padding within blocks.
*
* @see [padded-blocks](https://eslint.org/docs/latest/rules/padded-blocks)
*/
'padded-blocks': PaddedBlocksRuleConfig;
}
/**
* Option.
*/
type PaddingType$1 = 'any' | 'never' | 'always';
type StatementType$1 =
| (
| '*'
| 'block-like'
| 'cjs-export'
| 'cjs-import'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
)
| [
(
| '*'
| 'block-like'
| 'cjs-export'
| 'cjs-import'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
),
...(
| '*'
| 'block-like'
| 'cjs-export'
| 'cjs-import'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
)[],
];
type PaddingLineBetweenStatementsOption$1 = {
blankLine: PaddingType$1;
prev: StatementType$1;
next: StatementType$1;
}[];
/**
* Options.
*/
type PaddingLineBetweenStatementsOptions$1 =
PaddingLineBetweenStatementsOption$1;
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://eslint.org/docs/latest/rules/padding-line-between-statements)
*/
type PaddingLineBetweenStatementsRuleConfig$1 =
RuleConfig<PaddingLineBetweenStatementsOptions$1>;
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://eslint.org/docs/latest/rules/padding-line-between-statements)
*/
interface PaddingLineBetweenStatementsRule$1 {
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://eslint.org/docs/latest/rules/padding-line-between-statements)
*/
'padding-line-between-statements': PaddingLineBetweenStatementsRuleConfig$1;
}
/**
* Option.
*/
interface PreferArrowCallbackOption {
allowNamedFunctions?: boolean;
allowUnboundThis?: boolean;
}
/**
* Options.
*/
type PreferArrowCallbackOptions = [PreferArrowCallbackOption?];
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
type PreferArrowCallbackRuleConfig =
RuleConfig<PreferArrowCallbackOptions>;
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
interface PreferArrowCallbackRule {
/**
* Require using arrow functions for callbacks.
*
* @see [prefer-arrow-callback](https://eslint.org/docs/latest/rules/prefer-arrow-callback)
*/
'prefer-arrow-callback': PreferArrowCallbackRuleConfig;
}
/**
* Option.
*/
interface PreferConstOption {
destructuring?: 'any' | 'all';
ignoreReadBeforeAssign?: boolean;
}
/**
* Options.
*/
type PreferConstOptions = [PreferConstOption?];
/**
* Require `const` declarations for variables that are never reassigned after declared.
*
* @see [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)
*/
type PreferConstRuleConfig = RuleConfig<PreferConstOptions>;
/**
* Require `const` declarations for variables that are never reassigned after declared.
*
* @see [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)
*/
interface PreferConstRule {
/**
* Require `const` declarations for variables that are never reassigned after declared.
*
* @see [prefer-const](https://eslint.org/docs/latest/rules/prefer-const)
*/
'prefer-const': PreferConstRuleConfig;
}
/**
* Config.
*/
interface PreferDestructuringConfig {
enforceForRenamedProperties?: boolean;
}
/**
* Option.
*/
type PreferDestructuringOption =
| {
VariableDeclarator?: {
array?: boolean;
object?: boolean;
};
AssignmentExpression?: {
array?: boolean;
object?: boolean;
};
}
| {
array?: boolean;
object?: boolean;
};
/**
* Options.
*/
type PreferDestructuringOptions = [
PreferDestructuringOption?,
PreferDestructuringConfig?,
];
/**
* Require destructuring from arrays and/or objects.
*
* @see [prefer-destructuring](https://eslint.org/docs/latest/rules/prefer-destructuring)
*/
type PreferDestructuringRuleConfig =
RuleConfig<PreferDestructuringOptions>;
/**
* Require destructuring from arrays and/or objects.
*
* @see [prefer-destructuring](https://eslint.org/docs/latest/rules/prefer-destructuring)
*/
interface PreferDestructuringRule {
/**
* Require destructuring from arrays and/or objects.
*
* @see [prefer-destructuring](https://eslint.org/docs/latest/rules/prefer-destructuring)
*/
'prefer-destructuring': PreferDestructuringRuleConfig;
}
/**
* Disallow the use of `Math.pow` in favor of the `**` operator.
*
* @see [prefer-exponentiation-operator](https://eslint.org/docs/latest/rules/prefer-exponentiation-operator)
*/
type PreferExponentiationOperatorRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow the use of `Math.pow` in favor of the `**` operator.
*
* @see [prefer-exponentiation-operator](https://eslint.org/docs/latest/rules/prefer-exponentiation-operator)
*/
interface PreferExponentiationOperatorRule$1 {
/**
* Disallow the use of `Math.pow` in favor of the `**` operator.
*
* @see [prefer-exponentiation-operator](https://eslint.org/docs/latest/rules/prefer-exponentiation-operator)
*/
'prefer-exponentiation-operator': PreferExponentiationOperatorRuleConfig$1;
}
/**
* Enforce using named capture group in regular expression.
*
* @see [prefer-named-capture-group](https://eslint.org/docs/latest/rules/prefer-named-capture-group)
*/
type PreferNamedCaptureGroupRuleConfig = RuleConfig<[]>;
/**
* Enforce using named capture group in regular expression.
*
* @see [prefer-named-capture-group](https://eslint.org/docs/latest/rules/prefer-named-capture-group)
*/
interface PreferNamedCaptureGroupRule {
/**
* Enforce using named capture group in regular expression.
*
* @see [prefer-named-capture-group](https://eslint.org/docs/latest/rules/prefer-named-capture-group)
*/
'prefer-named-capture-group': PreferNamedCaptureGroupRuleConfig;
}
/**
* Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals.
*
* @see [prefer-numeric-literals](https://eslint.org/docs/latest/rules/prefer-numeric-literals)
*/
type PreferNumericLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals.
*
* @see [prefer-numeric-literals](https://eslint.org/docs/latest/rules/prefer-numeric-literals)
*/
interface PreferNumericLiteralsRule {
/**
* Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals.
*
* @see [prefer-numeric-literals](https://eslint.org/docs/latest/rules/prefer-numeric-literals)
*/
'prefer-numeric-literals': PreferNumericLiteralsRuleConfig;
}
/**
* Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`.
*
* @see [prefer-object-has-own](https://eslint.org/docs/latest/rules/prefer-object-has-own)
*/
type PreferObjectHasOwnRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`.
*
* @see [prefer-object-has-own](https://eslint.org/docs/latest/rules/prefer-object-has-own)
*/
interface PreferObjectHasOwnRule$1 {
/**
* Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`.
*
* @see [prefer-object-has-own](https://eslint.org/docs/latest/rules/prefer-object-has-own)
*/
'prefer-object-has-own': PreferObjectHasOwnRuleConfig$1;
}
/**
* Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.
*
* @see [prefer-object-spread](https://eslint.org/docs/latest/rules/prefer-object-spread)
*/
type PreferObjectSpreadRuleConfig = RuleConfig<[]>;
/**
* Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.
*
* @see [prefer-object-spread](https://eslint.org/docs/latest/rules/prefer-object-spread)
*/
interface PreferObjectSpreadRule {
/**
* Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead.
*
* @see [prefer-object-spread](https://eslint.org/docs/latest/rules/prefer-object-spread)
*/
'prefer-object-spread': PreferObjectSpreadRuleConfig;
}
/**
* Option.
*/
interface PreferPromiseRejectErrorsOption {
allowEmptyReject?: boolean;
}
/**
* Options.
*/
type PreferPromiseRejectErrorsOptions = [
PreferPromiseRejectErrorsOption?,
];
/**
* Require using Error objects as Promise rejection reasons.
*
* @see [prefer-promise-reject-errors](https://eslint.org/docs/latest/rules/prefer-promise-reject-errors)
*/
type PreferPromiseRejectErrorsRuleConfig =
RuleConfig<PreferPromiseRejectErrorsOptions>;
/**
* Require using Error objects as Promise rejection reasons.
*
* @see [prefer-promise-reject-errors](https://eslint.org/docs/latest/rules/prefer-promise-reject-errors)
*/
interface PreferPromiseRejectErrorsRule {
/**
* Require using Error objects as Promise rejection reasons.
*
* @see [prefer-promise-reject-errors](https://eslint.org/docs/latest/rules/prefer-promise-reject-errors)
*/
'prefer-promise-reject-errors': PreferPromiseRejectErrorsRuleConfig;
}
/**
* Option.
*/
interface PreferReflectOption {
exceptions?: (
| 'apply'
| 'call'
| 'delete'
| 'defineProperty'
| 'getOwnPropertyDescriptor'
| 'getPrototypeOf'
| 'setPrototypeOf'
| 'isExtensible'
| 'getOwnPropertyNames'
| 'preventExtensions'
)[];
}
/**
* Options.
*/
type PreferReflectOptions = [PreferReflectOption?];
/**
* Require `Reflect` methods where applicable.
*
* @deprecated
*
* @see [prefer-reflect](https://eslint.org/docs/latest/rules/prefer-reflect)
*/
type PreferReflectRuleConfig = RuleConfig<PreferReflectOptions>;
/**
* Require `Reflect` methods where applicable.
*
* @deprecated
*
* @see [prefer-reflect](https://eslint.org/docs/latest/rules/prefer-reflect)
*/
interface PreferReflectRule {
/**
* Require `Reflect` methods where applicable.
*
* @deprecated
*
* @see [prefer-reflect](https://eslint.org/docs/latest/rules/prefer-reflect)
*/
'prefer-reflect': PreferReflectRuleConfig;
}
/**
* Option.
*/
interface PreferRegexLiteralsOption {
disallowRedundantWrapping?: boolean;
}
/**
* Options.
*/
type PreferRegexLiteralsOptions = [PreferRegexLiteralsOption?];
/**
* Disallow use of the `RegExp` constructor in favor of regular expression literals.
*
* @see [prefer-regex-literals](https://eslint.org/docs/latest/rules/prefer-regex-literals)
*/
type PreferRegexLiteralsRuleConfig =
RuleConfig<PreferRegexLiteralsOptions>;
/**
* Disallow use of the `RegExp` constructor in favor of regular expression literals.
*
* @see [prefer-regex-literals](https://eslint.org/docs/latest/rules/prefer-regex-literals)
*/
interface PreferRegexLiteralsRule {
/**
* Disallow use of the `RegExp` constructor in favor of regular expression literals.
*
* @see [prefer-regex-literals](https://eslint.org/docs/latest/rules/prefer-regex-literals)
*/
'prefer-regex-literals': PreferRegexLiteralsRuleConfig;
}
/**
* Require rest parameters instead of `arguments`.
*
* @see [prefer-rest-params](https://eslint.org/docs/latest/rules/prefer-rest-params)
*/
type PreferRestParamsRuleConfig = RuleConfig<[]>;
/**
* Require rest parameters instead of `arguments`.
*
* @see [prefer-rest-params](https://eslint.org/docs/latest/rules/prefer-rest-params)
*/
interface PreferRestParamsRule {
/**
* Require rest parameters instead of `arguments`.
*
* @see [prefer-rest-params](https://eslint.org/docs/latest/rules/prefer-rest-params)
*/
'prefer-rest-params': PreferRestParamsRuleConfig;
}
/**
* Require spread operators instead of `.apply()`.
*
* @see [prefer-spread](https://eslint.org/docs/latest/rules/prefer-spread)
*/
type PreferSpreadRuleConfig$1 = RuleConfig<[]>;
/**
* Require spread operators instead of `.apply()`.
*
* @see [prefer-spread](https://eslint.org/docs/latest/rules/prefer-spread)
*/
interface PreferSpreadRule$1 {
/**
* Require spread operators instead of `.apply()`.
*
* @see [prefer-spread](https://eslint.org/docs/latest/rules/prefer-spread)
*/
'prefer-spread': PreferSpreadRuleConfig$1;
}
/**
* Require template literals instead of string concatenation.
*
* @see [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)
*/
type PreferTemplateRuleConfig$1 = RuleConfig<[]>;
/**
* Require template literals instead of string concatenation.
*
* @see [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)
*/
interface PreferTemplateRule$1 {
/**
* Require template literals instead of string concatenation.
*
* @see [prefer-template](https://eslint.org/docs/latest/rules/prefer-template)
*/
'prefer-template': PreferTemplateRuleConfig$1;
}
/**
* Option.
*/
type QuotePropsOption$2 =
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| [
'always' | 'as-needed' | 'consistent' | 'consistent-as-needed',
{
keywords?: boolean;
unnecessary?: boolean;
numbers?: boolean;
},
];
/**
* Options.
*/
type QuotePropsOptions$2 = QuotePropsOption$2;
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://eslint.org/docs/latest/rules/quote-props)
*/
type QuotePropsRuleConfig$2 = RuleConfig<QuotePropsOptions$2>;
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://eslint.org/docs/latest/rules/quote-props)
*/
interface QuotePropsRule$2 {
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://eslint.org/docs/latest/rules/quote-props)
*/
'quote-props': QuotePropsRuleConfig$2;
}
/**
* Config.
*/
type QuotesConfig$2 =
| 'avoid-escape'
| {
avoidEscape?: boolean;
allowTemplateLiterals?: boolean;
};
/**
* Option.
*/
type QuotesOption$3 = 'single' | 'double' | 'backtick';
/**
* Options.
*/
type QuotesOptions$3 = [QuotesOption$3?, QuotesConfig$2?];
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://eslint.org/docs/latest/rules/quotes)
*/
type QuotesRuleConfig$3 = RuleConfig<QuotesOptions$3>;
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://eslint.org/docs/latest/rules/quotes)
*/
interface QuotesRule$3 {
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://eslint.org/docs/latest/rules/quotes)
*/
quotes: QuotesRuleConfig$3;
}
/**
* Option.
*/
type RadixOption = 'always' | 'as-needed';
/**
* Options.
*/
type RadixOptions = [RadixOption?];
/**
* Enforce the consistent use of the radix argument when using `parseInt()`.
*
* @see [radix](https://eslint.org/docs/latest/rules/radix)
*/
type RadixRuleConfig = RuleConfig<RadixOptions>;
/**
* Enforce the consistent use of the radix argument when using `parseInt()`.
*
* @see [radix](https://eslint.org/docs/latest/rules/radix)
*/
interface RadixRule {
/**
* Enforce the consistent use of the radix argument when using `parseInt()`.
*
* @see [radix](https://eslint.org/docs/latest/rules/radix)
*/
radix: RadixRuleConfig;
}
/**
* Option.
*/
interface RequireAtomicUpdatesOption {
allowProperties?: boolean;
}
/**
* Options.
*/
type RequireAtomicUpdatesOptions = [RequireAtomicUpdatesOption?];
/**
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
*
* @see [require-atomic-updates](https://eslint.org/docs/latest/rules/require-atomic-updates)
*/
type RequireAtomicUpdatesRuleConfig =
RuleConfig<RequireAtomicUpdatesOptions>;
/**
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
*
* @see [require-atomic-updates](https://eslint.org/docs/latest/rules/require-atomic-updates)
*/
interface RequireAtomicUpdatesRule {
/**
* Disallow assignments that can lead to race conditions due to usage of `await` or `yield`.
*
* @see [require-atomic-updates](https://eslint.org/docs/latest/rules/require-atomic-updates)
*/
'require-atomic-updates': RequireAtomicUpdatesRuleConfig;
}
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://eslint.org/docs/latest/rules/require-await)
*/
type RequireAwaitRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://eslint.org/docs/latest/rules/require-await)
*/
interface RequireAwaitRule$1 {
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://eslint.org/docs/latest/rules/require-await)
*/
'require-await': RequireAwaitRuleConfig$1;
}
/**
* Option.
*/
interface RequireJsdocOption$1 {
require?: {
ClassDeclaration?: boolean;
MethodDefinition?: boolean;
FunctionDeclaration?: boolean;
ArrowFunctionExpression?: boolean;
FunctionExpression?: boolean;
};
}
/**
* Options.
*/
type RequireJsdocOptions$1 = [RequireJsdocOption$1?];
/**
* Require JSDoc comments.
*
* @deprecated
*
* @see [require-jsdoc](https://eslint.org/docs/latest/rules/require-jsdoc)
*/
type RequireJsdocRuleConfig$1 = RuleConfig<RequireJsdocOptions$1>;
/**
* Require JSDoc comments.
*
* @deprecated
*
* @see [require-jsdoc](https://eslint.org/docs/latest/rules/require-jsdoc)
*/
interface RequireJsdocRule$1 {
/**
* Require JSDoc comments.
*
* @deprecated
*
* @see [require-jsdoc](https://eslint.org/docs/latest/rules/require-jsdoc)
*/
'require-jsdoc': RequireJsdocRuleConfig$1;
}
/**
* Enforce the use of `u` or `v` flag on RegExp.
*
* @see [require-unicode-regexp](https://eslint.org/docs/latest/rules/require-unicode-regexp)
*/
type RequireUnicodeRegexpRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `u` or `v` flag on RegExp.
*
* @see [require-unicode-regexp](https://eslint.org/docs/latest/rules/require-unicode-regexp)
*/
interface RequireUnicodeRegexpRule {
/**
* Enforce the use of `u` or `v` flag on RegExp.
*
* @see [require-unicode-regexp](https://eslint.org/docs/latest/rules/require-unicode-regexp)
*/
'require-unicode-regexp': RequireUnicodeRegexpRuleConfig;
}
/**
* Require generator functions to contain `yield`.
*
* @see [require-yield](https://eslint.org/docs/latest/rules/require-yield)
*/
type RequireYieldRuleConfig = RuleConfig<[]>;
/**
* Require generator functions to contain `yield`.
*
* @see [require-yield](https://eslint.org/docs/latest/rules/require-yield)
*/
interface RequireYieldRule {
/**
* Require generator functions to contain `yield`.
*
* @see [require-yield](https://eslint.org/docs/latest/rules/require-yield)
*/
'require-yield': RequireYieldRuleConfig;
}
/**
* Option.
*/
type RestSpreadSpacingOption = 'always' | 'never';
/**
* Options.
*/
type RestSpreadSpacingOptions = [RestSpreadSpacingOption?];
/**
* Enforce spacing between rest and spread operators and their expressions.
*
* @see [rest-spread-spacing](https://eslint.org/docs/latest/rules/rest-spread-spacing)
*/
type RestSpreadSpacingRuleConfig = RuleConfig<RestSpreadSpacingOptions>;
/**
* Enforce spacing between rest and spread operators and their expressions.
*
* @see [rest-spread-spacing](https://eslint.org/docs/latest/rules/rest-spread-spacing)
*/
interface RestSpreadSpacingRule {
/**
* Enforce spacing between rest and spread operators and their expressions.
*
* @see [rest-spread-spacing](https://eslint.org/docs/latest/rules/rest-spread-spacing)
*/
'rest-spread-spacing': RestSpreadSpacingRuleConfig;
}
/**
* Option.
*/
type SemiOption$1 =
| []
| ['never']
| [
'never',
{
beforeStatementContinuationChars?: 'always' | 'any' | 'never';
},
]
| []
| ['always']
| [
'always',
{
omitLastInOneLineBlock?: boolean;
omitLastInOneLineClassBody?: boolean;
},
];
/**
* Options.
*/
type SemiOptions$1 = SemiOption$1;
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://eslint.org/docs/latest/rules/semi)
*/
type SemiRuleConfig$1 = RuleConfig<SemiOptions$1>;
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://eslint.org/docs/latest/rules/semi)
*/
interface SemiRule$1 {
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://eslint.org/docs/latest/rules/semi)
*/
semi: SemiRuleConfig$1;
}
/**
* Option.
*/
interface SemiSpacingOption {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type SemiSpacingOptions = [SemiSpacingOption?];
/**
* Enforce consistent spacing before and after semicolons.
*
* @see [semi-spacing](https://eslint.org/docs/latest/rules/semi-spacing)
*/
type SemiSpacingRuleConfig = RuleConfig<SemiSpacingOptions>;
/**
* Enforce consistent spacing before and after semicolons.
*
* @see [semi-spacing](https://eslint.org/docs/latest/rules/semi-spacing)
*/
interface SemiSpacingRule {
/**
* Enforce consistent spacing before and after semicolons.
*
* @see [semi-spacing](https://eslint.org/docs/latest/rules/semi-spacing)
*/
'semi-spacing': SemiSpacingRuleConfig;
}
/**
* Option.
*/
type SemiStyleOption = 'last' | 'first';
/**
* Options.
*/
type SemiStyleOptions = [SemiStyleOption?];
/**
* Enforce location of semicolons.
*
* @see [semi-style](https://eslint.org/docs/latest/rules/semi-style)
*/
type SemiStyleRuleConfig = RuleConfig<SemiStyleOptions>;
/**
* Enforce location of semicolons.
*
* @see [semi-style](https://eslint.org/docs/latest/rules/semi-style)
*/
interface SemiStyleRule {
/**
* Enforce location of semicolons.
*
* @see [semi-style](https://eslint.org/docs/latest/rules/semi-style)
*/
'semi-style': SemiStyleRuleConfig;
}
/**
* Option.
*/
interface SortImportsOption {
ignoreCase?: boolean;
/**
* @minItems 4
* @maxItems 4
*/
memberSyntaxSortOrder?: [
'none' | 'all' | 'multiple' | 'single',
'none' | 'all' | 'multiple' | 'single',
'none' | 'all' | 'multiple' | 'single',
'none' | 'all' | 'multiple' | 'single',
];
ignoreDeclarationSort?: boolean;
ignoreMemberSort?: boolean;
allowSeparatedGroups?: boolean;
}
/**
* Options.
*/
type SortImportsOptions = [SortImportsOption?];
/**
* Enforce sorted import declarations within modules.
*
* @see [sort-imports](https://eslint.org/docs/latest/rules/sort-imports)
*/
type SortImportsRuleConfig = RuleConfig<SortImportsOptions>;
/**
* Enforce sorted import declarations within modules.
*
* @see [sort-imports](https://eslint.org/docs/latest/rules/sort-imports)
*/
interface SortImportsRule {
/**
* Enforce sorted import declarations within modules.
*
* @see [sort-imports](https://eslint.org/docs/latest/rules/sort-imports)
*/
'sort-imports': SortImportsRuleConfig;
}
/**
* Config.
*/
interface SortKeysConfig$1 {
caseSensitive?: boolean;
natural?: boolean;
minKeys?: number;
allowLineSeparatedGroups?: boolean;
}
/**
* Option.
*/
type SortKeysOption$3 = 'asc' | 'desc';
/**
* Options.
*/
type SortKeysOptions$3 = [SortKeysOption$3?, SortKeysConfig$1?];
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://eslint.org/docs/latest/rules/sort-keys)
*/
type SortKeysRuleConfig$3 = RuleConfig<SortKeysOptions$3>;
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://eslint.org/docs/latest/rules/sort-keys)
*/
interface SortKeysRule$3 {
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://eslint.org/docs/latest/rules/sort-keys)
*/
'sort-keys': SortKeysRuleConfig$3;
}
/**
* Option.
*/
interface SortVarsOption {
ignoreCase?: boolean;
}
/**
* Options.
*/
type SortVarsOptions = [SortVarsOption?];
/**
* Require variables within the same declaration block to be sorted.
*
* @see [sort-vars](https://eslint.org/docs/latest/rules/sort-vars)
*/
type SortVarsRuleConfig = RuleConfig<SortVarsOptions>;
/**
* Require variables within the same declaration block to be sorted.
*
* @see [sort-vars](https://eslint.org/docs/latest/rules/sort-vars)
*/
interface SortVarsRule {
/**
* Require variables within the same declaration block to be sorted.
*
* @see [sort-vars](https://eslint.org/docs/latest/rules/sort-vars)
*/
'sort-vars': SortVarsRuleConfig;
}
/**
* Option.
*/
type SpaceBeforeBlocksOption$1 =
| ('always' | 'never')
| {
keywords?: 'always' | 'never' | 'off';
functions?: 'always' | 'never' | 'off';
classes?: 'always' | 'never' | 'off';
};
/**
* Options.
*/
type SpaceBeforeBlocksOptions$1 = [SpaceBeforeBlocksOption$1?];
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://eslint.org/docs/latest/rules/space-before-blocks)
*/
type SpaceBeforeBlocksRuleConfig$1 = RuleConfig<SpaceBeforeBlocksOptions$1>;
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://eslint.org/docs/latest/rules/space-before-blocks)
*/
interface SpaceBeforeBlocksRule$1 {
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://eslint.org/docs/latest/rules/space-before-blocks)
*/
'space-before-blocks': SpaceBeforeBlocksRuleConfig$1;
}
/**
* Option.
*/
type SpaceBeforeFunctionParenOption$1 =
| ('always' | 'never')
| {
anonymous?: 'always' | 'never' | 'ignore';
named?: 'always' | 'never' | 'ignore';
asyncArrow?: 'always' | 'never' | 'ignore';
};
/**
* Options.
*/
type SpaceBeforeFunctionParenOptions$1 = [SpaceBeforeFunctionParenOption$1?];
/**
* Enforce consistent spacing before `function` definition opening parenthesis.
*
* @see [space-before-function-paren](https://eslint.org/docs/latest/rules/space-before-function-paren)
*/
type SpaceBeforeFunctionParenRuleConfig$1 =
RuleConfig<SpaceBeforeFunctionParenOptions$1>;
/**
* Enforce consistent spacing before `function` definition opening parenthesis.
*
* @see [space-before-function-paren](https://eslint.org/docs/latest/rules/space-before-function-paren)
*/
interface SpaceBeforeFunctionParenRule$1 {
/**
* Enforce consistent spacing before `function` definition opening parenthesis.
*
* @see [space-before-function-paren](https://eslint.org/docs/latest/rules/space-before-function-paren)
*/
'space-before-function-paren': SpaceBeforeFunctionParenRuleConfig$1;
}
/**
* Config.
*/
interface SpaceInParensConfig$1 {
exceptions?: ('{}' | '[]' | '()' | 'empty')[];
}
/**
* Option.
*/
type SpaceInParensOption$1 = 'always' | 'never';
/**
* Options.
*/
type SpaceInParensOptions$1 = [SpaceInParensOption$1?, SpaceInParensConfig$1?];
/**
* Enforce consistent spacing inside parentheses.
*
* @see [space-in-parens](https://eslint.org/docs/latest/rules/space-in-parens)
*/
type SpaceInParensRuleConfig$1 = RuleConfig<SpaceInParensOptions$1>;
/**
* Enforce consistent spacing inside parentheses.
*
* @see [space-in-parens](https://eslint.org/docs/latest/rules/space-in-parens)
*/
interface SpaceInParensRule$1 {
/**
* Enforce consistent spacing inside parentheses.
*
* @see [space-in-parens](https://eslint.org/docs/latest/rules/space-in-parens)
*/
'space-in-parens': SpaceInParensRuleConfig$1;
}
/**
* Option.
*/
interface SpaceInfixOpsOption$2 {
int32Hint?: boolean;
}
/**
* Options.
*/
type SpaceInfixOpsOptions$2 = [SpaceInfixOpsOption$2?];
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://eslint.org/docs/latest/rules/space-infix-ops)
*/
type SpaceInfixOpsRuleConfig$2 = RuleConfig<SpaceInfixOpsOptions$2>;
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://eslint.org/docs/latest/rules/space-infix-ops)
*/
interface SpaceInfixOpsRule$2 {
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://eslint.org/docs/latest/rules/space-infix-ops)
*/
'space-infix-ops': SpaceInfixOpsRuleConfig$2;
}
/**
* Option.
*/
interface SpaceUnaryOpsOption$2 {
words?: boolean;
nonwords?: boolean;
overrides?: {
[k: string]: boolean;
};
}
/**
* Options.
*/
type SpaceUnaryOpsOptions$2 = [SpaceUnaryOpsOption$2?];
/**
* Enforce consistent spacing before or after unary operators.
*
* @see [space-unary-ops](https://eslint.org/docs/latest/rules/space-unary-ops)
*/
type SpaceUnaryOpsRuleConfig$2 = RuleConfig<SpaceUnaryOpsOptions$2>;
/**
* Enforce consistent spacing before or after unary operators.
*
* @see [space-unary-ops](https://eslint.org/docs/latest/rules/space-unary-ops)
*/
interface SpaceUnaryOpsRule$2 {
/**
* Enforce consistent spacing before or after unary operators.
*
* @see [space-unary-ops](https://eslint.org/docs/latest/rules/space-unary-ops)
*/
'space-unary-ops': SpaceUnaryOpsRuleConfig$2;
}
/**
* Config.
*/
interface SpacedCommentConfig$1 {
exceptions?: string[];
markers?: string[];
line?: {
exceptions?: string[];
markers?: string[];
};
block?: {
exceptions?: string[];
markers?: string[];
balanced?: boolean;
};
}
/**
* Option.
*/
type SpacedCommentOption$1 = 'always' | 'never';
/**
* Options.
*/
type SpacedCommentOptions$1 = [SpacedCommentOption$1?, SpacedCommentConfig$1?];
/**
* Enforce consistent spacing after the `//` or `/*` in a comment.
*
* @see [spaced-comment](https://eslint.org/docs/latest/rules/spaced-comment)
*/
type SpacedCommentRuleConfig$1 = RuleConfig<SpacedCommentOptions$1>;
/**
* Enforce consistent spacing after the `//` or `/*` in a comment.
*
* @see [spaced-comment](https://eslint.org/docs/latest/rules/spaced-comment)
*/
interface SpacedCommentRule$1 {
/**
* Enforce consistent spacing after the `//` or `/*` in a comment.
*
* @see [spaced-comment](https://eslint.org/docs/latest/rules/spaced-comment)
*/
'spaced-comment': SpacedCommentRuleConfig$1;
}
/**
* Option.
*/
type StrictOption = 'never' | 'global' | 'function' | 'safe';
/**
* Options.
*/
type StrictOptions = [StrictOption?];
/**
* Require or disallow strict mode directives.
*
* @see [strict](https://eslint.org/docs/latest/rules/strict)
*/
type StrictRuleConfig = RuleConfig<StrictOptions>;
/**
* Require or disallow strict mode directives.
*
* @see [strict](https://eslint.org/docs/latest/rules/strict)
*/
interface StrictRule {
/**
* Require or disallow strict mode directives.
*
* @see [strict](https://eslint.org/docs/latest/rules/strict)
*/
strict: StrictRuleConfig;
}
/**
* Option.
*/
interface SwitchColonSpacingOption {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type SwitchColonSpacingOptions = [SwitchColonSpacingOption?];
/**
* Enforce spacing around colons of switch statements.
*
* @see [switch-colon-spacing](https://eslint.org/docs/latest/rules/switch-colon-spacing)
*/
type SwitchColonSpacingRuleConfig =
RuleConfig<SwitchColonSpacingOptions>;
/**
* Enforce spacing around colons of switch statements.
*
* @see [switch-colon-spacing](https://eslint.org/docs/latest/rules/switch-colon-spacing)
*/
interface SwitchColonSpacingRule {
/**
* Enforce spacing around colons of switch statements.
*
* @see [switch-colon-spacing](https://eslint.org/docs/latest/rules/switch-colon-spacing)
*/
'switch-colon-spacing': SwitchColonSpacingRuleConfig;
}
/**
* Require symbol descriptions.
*
* @see [symbol-description](https://eslint.org/docs/latest/rules/symbol-description)
*/
type SymbolDescriptionRuleConfig = RuleConfig<[]>;
/**
* Require symbol descriptions.
*
* @see [symbol-description](https://eslint.org/docs/latest/rules/symbol-description)
*/
interface SymbolDescriptionRule {
/**
* Require symbol descriptions.
*
* @see [symbol-description](https://eslint.org/docs/latest/rules/symbol-description)
*/
'symbol-description': SymbolDescriptionRuleConfig;
}
/**
* Option.
*/
type TemplateCurlySpacingOption$1 = 'always' | 'never';
/**
* Options.
*/
type TemplateCurlySpacingOptions$1 = [TemplateCurlySpacingOption$1?];
/**
* Require or disallow spacing around embedded expressions of template strings.
*
* @see [template-curly-spacing](https://eslint.org/docs/latest/rules/template-curly-spacing)
*/
type TemplateCurlySpacingRuleConfig$1 =
RuleConfig<TemplateCurlySpacingOptions$1>;
/**
* Require or disallow spacing around embedded expressions of template strings.
*
* @see [template-curly-spacing](https://eslint.org/docs/latest/rules/template-curly-spacing)
*/
interface TemplateCurlySpacingRule$1 {
/**
* Require or disallow spacing around embedded expressions of template strings.
*
* @see [template-curly-spacing](https://eslint.org/docs/latest/rules/template-curly-spacing)
*/
'template-curly-spacing': TemplateCurlySpacingRuleConfig$1;
}
/**
* Option.
*/
type TemplateTagSpacingOption = 'always' | 'never';
/**
* Options.
*/
type TemplateTagSpacingOptions = [TemplateTagSpacingOption?];
/**
* Require or disallow spacing between template tags and their literals.
*
* @see [template-tag-spacing](https://eslint.org/docs/latest/rules/template-tag-spacing)
*/
type TemplateTagSpacingRuleConfig =
RuleConfig<TemplateTagSpacingOptions>;
/**
* Require or disallow spacing between template tags and their literals.
*
* @see [template-tag-spacing](https://eslint.org/docs/latest/rules/template-tag-spacing)
*/
interface TemplateTagSpacingRule {
/**
* Require or disallow spacing between template tags and their literals.
*
* @see [template-tag-spacing](https://eslint.org/docs/latest/rules/template-tag-spacing)
*/
'template-tag-spacing': TemplateTagSpacingRuleConfig;
}
/**
* Option.
*/
type UnicodeBomOption = 'always' | 'never';
/**
* Options.
*/
type UnicodeBomOptions = [UnicodeBomOption?];
/**
* Require or disallow Unicode byte order mark (BOM).
*
* @see [unicode-bom](https://eslint.org/docs/latest/rules/unicode-bom)
*/
type UnicodeBomRuleConfig = RuleConfig<UnicodeBomOptions>;
/**
* Require or disallow Unicode byte order mark (BOM).
*
* @see [unicode-bom](https://eslint.org/docs/latest/rules/unicode-bom)
*/
interface UnicodeBomRule {
/**
* Require or disallow Unicode byte order mark (BOM).
*
* @see [unicode-bom](https://eslint.org/docs/latest/rules/unicode-bom)
*/
'unicode-bom': UnicodeBomRuleConfig;
}
/**
* Option.
*/
interface UseIsnanOption {
enforceForSwitchCase?: boolean;
enforceForIndexOf?: boolean;
}
/**
* Options.
*/
type UseIsnanOptions = [UseIsnanOption?];
/**
* Require calls to `isNaN()` when checking for `NaN`.
*
* @see [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)
*/
type UseIsnanRuleConfig = RuleConfig<UseIsnanOptions>;
/**
* Require calls to `isNaN()` when checking for `NaN`.
*
* @see [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)
*/
interface UseIsnanRule {
/**
* Require calls to `isNaN()` when checking for `NaN`.
*
* @see [use-isnan](https://eslint.org/docs/latest/rules/use-isnan)
*/
'use-isnan': UseIsnanRuleConfig;
}
/**
* Option.
*/
interface ValidJsdocOption {
prefer?: {
[k: string]: string;
};
preferType?: {
[k: string]: string;
};
requireReturn?: boolean;
requireParamDescription?: boolean;
requireReturnDescription?: boolean;
matchDescription?: string;
requireReturnType?: boolean;
requireParamType?: boolean;
}
/**
* Options.
*/
type ValidJsdocOptions = [ValidJsdocOption?];
/**
* Enforce valid JSDoc comments.
*
* @deprecated
*
* @see [valid-jsdoc](https://eslint.org/docs/latest/rules/valid-jsdoc)
*/
type ValidJsdocRuleConfig = RuleConfig<ValidJsdocOptions>;
/**
* Enforce valid JSDoc comments.
*
* @deprecated
*
* @see [valid-jsdoc](https://eslint.org/docs/latest/rules/valid-jsdoc)
*/
interface ValidJsdocRule {
/**
* Enforce valid JSDoc comments.
*
* @deprecated
*
* @see [valid-jsdoc](https://eslint.org/docs/latest/rules/valid-jsdoc)
*/
'valid-jsdoc': ValidJsdocRuleConfig;
}
/**
* Option.
*/
interface ValidTypeofOption {
requireStringLiterals?: boolean;
}
/**
* Options.
*/
type ValidTypeofOptions = [ValidTypeofOption?];
/**
* Enforce comparing `typeof` expressions against valid strings.
*
* @see [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)
*/
type ValidTypeofRuleConfig = RuleConfig<ValidTypeofOptions>;
/**
* Enforce comparing `typeof` expressions against valid strings.
*
* @see [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)
*/
interface ValidTypeofRule {
/**
* Enforce comparing `typeof` expressions against valid strings.
*
* @see [valid-typeof](https://eslint.org/docs/latest/rules/valid-typeof)
*/
'valid-typeof': ValidTypeofRuleConfig;
}
/**
* Require `var` declarations be placed at the top of their containing scope.
*
* @see [vars-on-top](https://eslint.org/docs/latest/rules/vars-on-top)
*/
type VarsOnTopRuleConfig = RuleConfig<[]>;
/**
* Require `var` declarations be placed at the top of their containing scope.
*
* @see [vars-on-top](https://eslint.org/docs/latest/rules/vars-on-top)
*/
interface VarsOnTopRule {
/**
* Require `var` declarations be placed at the top of their containing scope.
*
* @see [vars-on-top](https://eslint.org/docs/latest/rules/vars-on-top)
*/
'vars-on-top': VarsOnTopRuleConfig;
}
/**
* Config.
*/
interface WrapIifeConfig {
functionPrototypeMethods?: boolean;
}
/**
* Option.
*/
type WrapIifeOption = 'outside' | 'inside' | 'any';
/**
* Options.
*/
type WrapIifeOptions = [WrapIifeOption?, WrapIifeConfig?];
/**
* Require parentheses around immediate `function` invocations.
*
* @see [wrap-iife](https://eslint.org/docs/latest/rules/wrap-iife)
*/
type WrapIifeRuleConfig = RuleConfig<WrapIifeOptions>;
/**
* Require parentheses around immediate `function` invocations.
*
* @see [wrap-iife](https://eslint.org/docs/latest/rules/wrap-iife)
*/
interface WrapIifeRule {
/**
* Require parentheses around immediate `function` invocations.
*
* @see [wrap-iife](https://eslint.org/docs/latest/rules/wrap-iife)
*/
'wrap-iife': WrapIifeRuleConfig;
}
/**
* Require parenthesis around regex literals.
*
* @see [wrap-regex](https://eslint.org/docs/latest/rules/wrap-regex)
*/
type WrapRegexRuleConfig = RuleConfig<[]>;
/**
* Require parenthesis around regex literals.
*
* @see [wrap-regex](https://eslint.org/docs/latest/rules/wrap-regex)
*/
interface WrapRegexRule {
/**
* Require parenthesis around regex literals.
*
* @see [wrap-regex](https://eslint.org/docs/latest/rules/wrap-regex)
*/
'wrap-regex': WrapRegexRuleConfig;
}
/**
* Option.
*/
type YieldStarSpacingOption =
| ('before' | 'after' | 'both' | 'neither')
| {
before?: boolean;
after?: boolean;
};
/**
* Options.
*/
type YieldStarSpacingOptions = [YieldStarSpacingOption?];
/**
* Require or disallow spacing around the `*` in `yield*` expressions.
*
* @see [yield-star-spacing](https://eslint.org/docs/latest/rules/yield-star-spacing)
*/
type YieldStarSpacingRuleConfig = RuleConfig<YieldStarSpacingOptions>;
/**
* Require or disallow spacing around the `*` in `yield*` expressions.
*
* @see [yield-star-spacing](https://eslint.org/docs/latest/rules/yield-star-spacing)
*/
interface YieldStarSpacingRule {
/**
* Require or disallow spacing around the `*` in `yield*` expressions.
*
* @see [yield-star-spacing](https://eslint.org/docs/latest/rules/yield-star-spacing)
*/
'yield-star-spacing': YieldStarSpacingRuleConfig;
}
/**
* Config.
*/
interface YodaConfig {
exceptRange?: boolean;
onlyEquality?: boolean;
}
/**
* Option.
*/
type YodaOption = 'always' | 'never';
/**
* Options.
*/
type YodaOptions = [YodaOption?, YodaConfig?];
/**
* Require or disallow "Yoda" conditions.
*
* @see [yoda](https://eslint.org/docs/latest/rules/yoda)
*/
type YodaRuleConfig = RuleConfig<YodaOptions>;
/**
* Require or disallow "Yoda" conditions.
*
* @see [yoda](https://eslint.org/docs/latest/rules/yoda)
*/
interface YodaRule {
/**
* Require or disallow "Yoda" conditions.
*
* @see [yoda](https://eslint.org/docs/latest/rules/yoda)
*/
yoda: YodaRuleConfig;
}
/**
* All Eslint rules.
*/
type EslintRules = AccessorPairsRule &
ArrayBracketNewlineRule$2 &
ArrayBracketSpacingRule$2 &
ArrayCallbackReturnRule &
ArrayElementNewlineRule$2 &
ArrowBodyStyleRule &
ArrowParensRule &
ArrowSpacingRule$1 &
BlockScopedVarRule &
BlockSpacingRule$2 &
BraceStyleRule$2 &
CallbackReturnRule$2 &
CamelcaseRule$1 &
CapitalizedCommentsRule &
ClassMethodsUseThisRule$1 &
CommaDangleRule$3 &
CommaSpacingRule$2 &
CommaStyleRule$2 &
ComplexityRule &
ComputedPropertySpacingRule &
ConsistentReturnRule &
ConsistentThisRule &
ConstructorSuperRule &
CurlyRule &
DefaultCaseRule &
DefaultCaseLastRule &
DefaultParamLastRule$1 &
DotLocationRule$1 &
DotNotationRule$2 &
EolLastRule &
EqeqeqRule$1 &
ForDirectionRule &
FuncCallSpacingRule$2 &
FuncNameMatchingRule &
FuncNamesRule &
FuncStyleRule &
FunctionCallArgumentNewlineRule &
FunctionParenNewlineRule &
GeneratorStarSpacingRule &
GetterReturnRule &
GlobalRequireRule$2 &
GroupedAccessorPairsRule &
GuardForInRule &
HandleCallbackErrRule$2 &
IdBlacklistRule &
IdDenylistRule &
IdLengthRule &
IdMatchRule &
ImplicitArrowLinebreakRule &
IndentRule$3 &
IndentLegacyRule &
InitDeclarationsRule$1 &
JsxQuotesRule &
KeySpacingRule$4 &
KeywordSpacingRule$2 &
LineCommentPositionRule &
LinebreakStyleRule &
LinesAroundCommentRule$1 &
LinesAroundDirectiveRule &
LinesBetweenClassMembersRule$1 &
LogicalAssignmentOperatorsRule &
MaxClassesPerFileRule &
MaxDepthRule &
MaxLenRule$1 &
MaxLinesRule &
MaxLinesPerFunctionRule &
MaxNestedCallbacksRule &
MaxParamsRule &
MaxStatementsRule &
MaxStatementsPerLineRule &
MultilineCommentStyleRule &
MultilineTernaryRule$1 &
NewCapRule &
NewParensRule &
NewlineAfterVarRule &
NewlineBeforeReturnRule &
NewlinePerChainedCallRule &
NoAlertRule &
NoArrayConstructorRule$1 &
NoAsyncPromiseExecutorRule &
NoAwaitInLoopRule &
NoBitwiseRule &
NoBufferConstructorRule &
NoCallerRule &
NoCaseDeclarationsRule &
NoCatchShadowRule &
NoClassAssignRule &
NoCompareNegZeroRule &
NoCondAssignRule &
NoConfusingArrowRule &
NoConsoleRule$1 &
NoConstAssignRule &
NoConstantBinaryExpressionRule &
NoConstantConditionRule$1 &
NoConstructorReturnRule &
NoContinueRule &
NoControlRegexRule &
NoDebuggerRule &
NoDeleteVarRule &
NoDivRegexRule &
NoDupeArgsRule &
NoDupeClassMembersRule$1 &
NoDupeElseIfRule &
NoDupeKeysRule$2 &
NoDuplicateCaseRule &
NoDuplicateImportsRule &
NoElseReturnRule &
NoEmptyRule &
NoEmptyCharacterClassRule &
NoEmptyFunctionRule$1 &
NoEmptyPatternRule$1 &
NoEmptyStaticBlockRule &
NoEqNullRule &
NoEvalRule &
NoExAssignRule &
NoExtendNativeRule &
NoExtraBindRule &
NoExtraBooleanCastRule &
NoExtraLabelRule &
NoExtraParensRule$2 &
NoExtraSemiRule$1 &
NoFallthroughRule &
NoFloatingDecimalRule$1 &
NoFuncAssignRule &
NoGlobalAssignRule &
NoImplicitCoercionRule &
NoImplicitGlobalsRule &
NoImpliedEvalRule$1 &
NoImportAssignRule &
NoInlineCommentsRule &
NoInnerDeclarationsRule &
NoInvalidRegexpRule &
NoInvalidThisRule$1 &
NoIrregularWhitespaceRule$3 &
NoIteratorRule &
NoLabelVarRule &
NoLabelsRule &
NoLoneBlocksRule &
NoLonelyIfRule$1 &
NoLoopFuncRule$1 &
NoLossOfPrecisionRule$2 &
NoMagicNumbersRule$1 &
NoMisleadingCharacterClassRule &
NoMixedOperatorsRule &
NoMixedRequiresRule$2 &
NoMixedSpacesAndTabsRule &
NoMultiAssignRule &
NoMultiSpacesRule$1 &
NoMultiStrRule$1 &
NoMultipleEmptyLinesRule$1 &
NoNativeReassignRule &
NoNegatedConditionRule$1 &
NoNegatedInLhsRule &
NoNestedTernaryRule$1 &
NoNewRule &
NoNewFuncRule &
NoNewNativeNonconstructorRule &
NoNewObjectRule &
NoNewRequireRule$2 &
NoNewSymbolRule &
NoNewWrappersRule &
NoNonoctalDecimalEscapeRule &
NoObjCallsRule &
NoObjectConstructorRule &
NoOctalRule$1 &
NoOctalEscapeRule$1 &
NoParamReassignRule &
NoPathConcatRule$2 &
NoPlusplusRule &
NoProcessEnvRule$2 &
NoProcessExitRule$3 &
NoPromiseExecutorReturnRule &
NoProtoRule &
NoPrototypeBuiltinsRule &
NoRedeclareRule$1 &
NoRegexSpacesRule &
NoRestrictedExportsRule &
NoRestrictedGlobalsRule &
NoRestrictedImportsRule$1 &
NoRestrictedModulesRule &
NoRestrictedPropertiesRule &
NoRestrictedSyntaxRule$2 &
NoReturnAssignRule &
NoReturnAwaitRule &
NoScriptUrlRule &
NoSelfAssignRule &
NoSelfCompareRule &
NoSequencesRule &
NoSetterReturnRule &
NoShadowRule$1 &
NoShadowRestrictedNamesRule &
NoSpacedFuncRule &
NoSparseArraysRule$2 &
NoSyncRule$2 &
NoTabsRule &
NoTemplateCurlyInStringRule &
NoTernaryRule &
NoThisBeforeSuperRule &
NoThrowLiteralRule$1 &
NoTrailingSpacesRule &
NoUndefRule &
NoUndefInitRule &
NoUndefinedRule &
NoUnderscoreDangleRule &
NoUnexpectedMultilineRule &
NoUnmodifiedLoopConditionRule &
NoUnneededTernaryRule &
NoUnreachableRule &
NoUnreachableLoopRule &
NoUnsafeFinallyRule &
NoUnsafeNegationRule &
NoUnsafeOptionalChainingRule &
NoUnusedExpressionsRule$1 &
NoUnusedLabelsRule &
NoUnusedPrivateClassMembersRule &
NoUnusedVarsRule$2 &
NoUseBeforeDefineRule$1 &
NoUselessBackreferenceRule &
NoUselessCallRule &
NoUselessCatchRule$1 &
NoUselessComputedKeyRule &
NoUselessConcatRule$1 &
NoUselessConstructorRule$1 &
NoUselessEscapeRule$1 &
NoUselessRenameRule &
NoUselessReturnRule &
NoVarRule &
NoVoidRule &
NoWarningCommentsRule &
NoWhitespaceBeforePropertyRule &
NoWithRule &
NonblockStatementBodyPositionRule &
ObjectCurlyNewlineRule$2 &
ObjectCurlySpacingRule$3 &
ObjectPropertyNewlineRule$2 &
ObjectShorthandRule$1 &
OneVarRule &
OneVarDeclarationPerLineRule &
OperatorAssignmentRule &
OperatorLinebreakRule$1 &
PaddedBlocksRule &
PaddingLineBetweenStatementsRule$1 &
PreferArrowCallbackRule &
PreferConstRule &
PreferDestructuringRule &
PreferExponentiationOperatorRule$1 &
PreferNamedCaptureGroupRule &
PreferNumericLiteralsRule &
PreferObjectHasOwnRule$1 &
PreferObjectSpreadRule &
PreferPromiseRejectErrorsRule &
PreferReflectRule &
PreferRegexLiteralsRule &
PreferRestParamsRule &
PreferSpreadRule$1 &
PreferTemplateRule$1 &
QuotePropsRule$2 &
QuotesRule$3 &
RadixRule &
RequireAtomicUpdatesRule &
RequireAwaitRule$1 &
RequireJsdocRule$1 &
RequireUnicodeRegexpRule &
RequireYieldRule &
RestSpreadSpacingRule &
SemiRule$1 &
SemiSpacingRule &
SemiStyleRule &
SortImportsRule &
SortKeysRule$3 &
SortVarsRule &
SpaceBeforeBlocksRule$1 &
SpaceBeforeFunctionParenRule$1 &
SpaceInParensRule$1 &
SpaceInfixOpsRule$2 &
SpaceUnaryOpsRule$2 &
SpacedCommentRule$1 &
StrictRule &
SwitchColonSpacingRule &
SymbolDescriptionRule &
TemplateCurlySpacingRule$1 &
TemplateTagSpacingRule &
UnicodeBomRule &
UseIsnanRule &
ValidJsdocRule &
ValidTypeofRule &
VarsOnTopRule &
WrapIifeRule &
WrapRegexRule &
YieldStarSpacingRule &
YodaRule;
/**
* Option.
*/
interface DisableEnablePairOption {
allowWholeFile?: boolean;
}
/**
* Options.
*/
type DisableEnablePairOptions = [DisableEnablePairOption?];
/**
* Require a `eslint-enable` comment for every `eslint-disable` comment.
*
* @see [disable-enable-pair](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html)
*/
type DisableEnablePairRuleConfig = RuleConfig<DisableEnablePairOptions>;
/**
* Require a `eslint-enable` comment for every `eslint-disable` comment.
*
* @see [disable-enable-pair](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html)
*/
interface DisableEnablePairRule {
/**
* Require a `eslint-enable` comment for every `eslint-disable` comment.
*
* @see [disable-enable-pair](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/disable-enable-pair.html)
*/
'eslint-comments/disable-enable-pair': DisableEnablePairRuleConfig;
}
/**
* Disallow a `eslint-enable` comment for multiple `eslint-disable` comments.
*
* @see [no-aggregating-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html)
*/
type NoAggregatingEnableRuleConfig = RuleConfig<[]>;
/**
* Disallow a `eslint-enable` comment for multiple `eslint-disable` comments.
*
* @see [no-aggregating-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html)
*/
interface NoAggregatingEnableRule {
/**
* Disallow a `eslint-enable` comment for multiple `eslint-disable` comments.
*
* @see [no-aggregating-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-aggregating-enable.html)
*/
'eslint-comments/no-aggregating-enable': NoAggregatingEnableRuleConfig;
}
/**
* Disallow duplicate `eslint-disable` comments.
*
* @see [no-duplicate-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html)
*/
type NoDuplicateDisableRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate `eslint-disable` comments.
*
* @see [no-duplicate-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html)
*/
interface NoDuplicateDisableRule {
/**
* Disallow duplicate `eslint-disable` comments.
*
* @see [no-duplicate-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-duplicate-disable.html)
*/
'eslint-comments/no-duplicate-disable': NoDuplicateDisableRuleConfig;
}
/**
* Option.
*/
type NoRestrictedDisableOption = string[];
/**
* Options.
*/
type NoRestrictedDisableOptions = NoRestrictedDisableOption;
/**
* Disallow `eslint-disable` comments about specific rules.
*
* @see [no-restricted-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html)
*/
type NoRestrictedDisableRuleConfig =
RuleConfig<NoRestrictedDisableOptions>;
/**
* Disallow `eslint-disable` comments about specific rules.
*
* @see [no-restricted-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html)
*/
interface NoRestrictedDisableRule {
/**
* Disallow `eslint-disable` comments about specific rules.
*
* @see [no-restricted-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-restricted-disable.html)
*/
'eslint-comments/no-restricted-disable': NoRestrictedDisableRuleConfig;
}
/**
* Disallow `eslint-disable` comments without rule names.
*
* @see [no-unlimited-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html)
*/
type NoUnlimitedDisableRuleConfig = RuleConfig<[]>;
/**
* Disallow `eslint-disable` comments without rule names.
*
* @see [no-unlimited-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html)
*/
interface NoUnlimitedDisableRule {
/**
* Disallow `eslint-disable` comments without rule names.
*
* @see [no-unlimited-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unlimited-disable.html)
*/
'eslint-comments/no-unlimited-disable': NoUnlimitedDisableRuleConfig;
}
/**
* Disallow unused `eslint-disable` comments.
*
* @see [no-unused-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html)
*/
type NoUnusedDisableRuleConfig = RuleConfig<[]>;
/**
* Disallow unused `eslint-disable` comments.
*
* @see [no-unused-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html)
*/
interface NoUnusedDisableRule {
/**
* Disallow unused `eslint-disable` comments.
*
* @see [no-unused-disable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html)
*/
'eslint-comments/no-unused-disable': NoUnusedDisableRuleConfig;
}
/**
* Disallow unused `eslint-enable` comments.
*
* @see [no-unused-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html)
*/
type NoUnusedEnableRuleConfig = RuleConfig<[]>;
/**
* Disallow unused `eslint-enable` comments.
*
* @see [no-unused-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html)
*/
interface NoUnusedEnableRule {
/**
* Disallow unused `eslint-enable` comments.
*
* @see [no-unused-enable](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-unused-enable.html)
*/
'eslint-comments/no-unused-enable': NoUnusedEnableRuleConfig;
}
/**
* Option.
*/
interface NoUseOption {
allow?: (
| 'eslint'
| 'eslint-disable'
| 'eslint-disable-line'
| 'eslint-disable-next-line'
| 'eslint-enable'
| 'eslint-env'
| 'exported'
| 'global'
| 'globals'
)[];
}
/**
* Options.
*/
type NoUseOptions = [NoUseOption?];
/**
* Disallow ESLint directive-comments.
*
* @see [no-use](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-use.html)
*/
type NoUseRuleConfig = RuleConfig<NoUseOptions>;
/**
* Disallow ESLint directive-comments.
*
* @see [no-use](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-use.html)
*/
interface NoUseRule {
/**
* Disallow ESLint directive-comments.
*
* @see [no-use](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/no-use.html)
*/
'eslint-comments/no-use': NoUseRuleConfig;
}
/**
* Option.
*/
interface RequireDescriptionOption$2 {
ignore?: (
| 'eslint'
| 'eslint-disable'
| 'eslint-disable-line'
| 'eslint-disable-next-line'
| 'eslint-enable'
| 'eslint-env'
| 'exported'
| 'global'
| 'globals'
)[];
}
/**
* Options.
*/
type RequireDescriptionOptions$2 = [RequireDescriptionOption$2?];
/**
* Require include descriptions in ESLint directive-comments.
*
* @see [require-description](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html)
*/
type RequireDescriptionRuleConfig$2 =
RuleConfig<RequireDescriptionOptions$2>;
/**
* Require include descriptions in ESLint directive-comments.
*
* @see [require-description](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html)
*/
interface RequireDescriptionRule$2 {
/**
* Require include descriptions in ESLint directive-comments.
*
* @see [require-description](https://mysticatea.github.io/eslint-plugin-eslint-comments/rules/require-description.html)
*/
'eslint-comments/require-description': RequireDescriptionRuleConfig$2;
}
/**
* All EslintComments rules.
*/
type EslintCommentsRules = DisableEnablePairRule &
NoAggregatingEnableRule &
NoDuplicateDisableRule &
NoRestrictedDisableRule &
NoUnlimitedDisableRule &
NoUnusedDisableRule &
NoUnusedEnableRule &
NoUseRule &
RequireDescriptionRule$2;
/**
* Option.
*/
/**
* @minItems 1
* @maxItems 1
*/
type AlphabetizeOption = [
{
/**
* Fields of `type`, `interface`, and `input`.
*
* @minItems 1
*/
fields?: [
(
| 'ObjectTypeDefinition'
| 'InterfaceTypeDefinition'
| 'InputObjectTypeDefinition'
),
...(
| 'ObjectTypeDefinition'
| 'InterfaceTypeDefinition'
| 'InputObjectTypeDefinition'
)[],
];
/**
* Values of `enum`.
*
* @minItems 1
*/
values?: ['EnumTypeDefinition', ...'EnumTypeDefinition'[]];
/**
* Selections of `fragment` and operations `query`, `mutation` and `subscription`.
*
* @minItems 1
*/
selections?: [
'OperationDefinition' | 'FragmentDefinition',
...('OperationDefinition' | 'FragmentDefinition')[],
];
/**
* Variables of operations `query`, `mutation` and `subscription`.
*
* @minItems 1
*/
variables?: ['OperationDefinition', ...'OperationDefinition'[]];
/**
* Arguments of fields and directives.
*
* @minItems 1
*/
arguments?: [
'FieldDefinition' | 'Field' | 'DirectiveDefinition' | 'Directive',
...('FieldDefinition' | 'Field' | 'DirectiveDefinition' | 'Directive')[],
];
/**
* Definitions – `type`, `interface`, `enum`, `scalar`, `input`, `union` and `directive`.
*/
definitions?: boolean;
/**
* Custom order group. Example: `['id', '*', 'createdAt', 'updatedAt']` where `*` says for everything else.
*
* @minItems 2
*/
groups?: [string, string, ...string[]];
},
];
/**
* Options.
*/
type AlphabetizeOptions = AlphabetizeOption;
/**
* Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more.
*
* @see [alphabetize](https://the-guild.dev/graphql/eslint/rules/alphabetize)
*/
type AlphabetizeRuleConfig = RuleConfig<AlphabetizeOptions>;
/**
* Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more.
*
* @see [alphabetize](https://the-guild.dev/graphql/eslint/rules/alphabetize)
*/
interface AlphabetizeRule {
/**
* Enforce arrange in alphabetical order for type fields, enum values, input object fields, operation selections and more.
*
* @see [alphabetize](https://the-guild.dev/graphql/eslint/rules/alphabetize)
*/
'@graphql-eslint/alphabetize': AlphabetizeRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type DescriptionStyleOption =
| []
| [
{
style?: 'block' | 'inline';
},
];
/**
* Options.
*/
type DescriptionStyleOptions = DescriptionStyleOption;
/**
* Require all comments to follow the same style (either block or inline).
*
* @see [description-style](https://the-guild.dev/graphql/eslint/rules/description-style)
*/
type DescriptionStyleRuleConfig = RuleConfig<DescriptionStyleOptions>;
/**
* Require all comments to follow the same style (either block or inline).
*
* @see [description-style](https://the-guild.dev/graphql/eslint/rules/description-style)
*/
interface DescriptionStyleRule {
/**
* Require all comments to follow the same style (either block or inline).
*
* @see [description-style](https://the-guild.dev/graphql/eslint/rules/description-style)
*/
'@graphql-eslint/description-style': DescriptionStyleRuleConfig;
}
/**
* A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [executable-definitions](https://the-guild.dev/graphql/eslint/rules/executable-definitions)
*/
type ExecutableDefinitionsRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [executable-definitions](https://the-guild.dev/graphql/eslint/rules/executable-definitions)
*/
interface ExecutableDefinitionsRule {
/**
* A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [executable-definitions](https://the-guild.dev/graphql/eslint/rules/executable-definitions)
*/
'@graphql-eslint/executable-definitions': ExecutableDefinitionsRuleConfig;
}
/**
* A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fields-on-correct-type](https://the-guild.dev/graphql/eslint/rules/fields-on-correct-type)
*/
type FieldsOnCorrectTypeRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fields-on-correct-type](https://the-guild.dev/graphql/eslint/rules/fields-on-correct-type)
*/
interface FieldsOnCorrectTypeRule {
/**
* A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as `__typename`.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fields-on-correct-type](https://the-guild.dev/graphql/eslint/rules/fields-on-correct-type)
*/
'@graphql-eslint/fields-on-correct-type': FieldsOnCorrectTypeRuleConfig;
}
/**
* Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fragments-on-composite-type](https://the-guild.dev/graphql/eslint/rules/fragments-on-composite-type)
*/
type FragmentsOnCompositeTypeRuleConfig = RuleConfig<[]>;
/**
* Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fragments-on-composite-type](https://the-guild.dev/graphql/eslint/rules/fragments-on-composite-type)
*/
interface FragmentsOnCompositeTypeRule {
/**
* Fragments use a type condition to determine if they apply, since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [fragments-on-composite-type](https://the-guild.dev/graphql/eslint/rules/fragments-on-composite-type)
*/
'@graphql-eslint/fragments-on-composite-type': FragmentsOnCompositeTypeRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type InputNameOption =
| []
| [
{
/**
* Check that the input type name follows the convention \<mutationName>Input
*/
checkInputType?: boolean;
/**
* Allow for case discrepancies in the input type name
*/
caseSensitiveInputType?: boolean;
/**
* Apply the rule to Queries
*/
checkQueries?: boolean;
/**
* Apply the rule to Mutations
*/
checkMutations?: boolean;
},
];
/**
* Options.
*/
type InputNameOptions = InputNameOption;
/**
* Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".
Using the same name for all input parameters will make your schemas easier to consume and more predictable. Using the same name as mutation for InputType will make it easier to find mutations that InputType belongs to.
*
* @see [input-name](https://the-guild.dev/graphql/eslint/rules/input-name)
*/
type InputNameRuleConfig = RuleConfig<InputNameOptions>;
/**
* Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".
Using the same name for all input parameters will make your schemas easier to consume and more predictable. Using the same name as mutation for InputType will make it easier to find mutations that InputType belongs to.
*
* @see [input-name](https://the-guild.dev/graphql/eslint/rules/input-name)
*/
interface InputNameRule {
/**
* Require mutation argument to be always called "input" and input type to be called Mutation name + "Input".
Using the same name for all input parameters will make your schemas easier to consume and more predictable. Using the same name as mutation for InputType will make it easier to find mutations that InputType belongs to.
*
* @see [input-name](https://the-guild.dev/graphql/eslint/rules/input-name)
*/
'@graphql-eslint/input-name': InputNameRuleConfig;
}
/**
* A GraphQL field is only valid if all supplied arguments are defined by that field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-argument-names](https://the-guild.dev/graphql/eslint/rules/known-argument-names)
*/
type KnownArgumentNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL field is only valid if all supplied arguments are defined by that field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-argument-names](https://the-guild.dev/graphql/eslint/rules/known-argument-names)
*/
interface KnownArgumentNamesRule {
/**
* A GraphQL field is only valid if all supplied arguments are defined by that field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-argument-names](https://the-guild.dev/graphql/eslint/rules/known-argument-names)
*/
'@graphql-eslint/known-argument-names': KnownArgumentNamesRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type KnownDirectivesOption =
| []
| [
{
/**
* @minItems 1
*/
ignoreClientDirectives: [string, ...string[]];
},
];
/**
* Options.
*/
type KnownDirectivesOptions = KnownDirectivesOption;
/**
* A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-directives](https://the-guild.dev/graphql/eslint/rules/known-directives)
*/
type KnownDirectivesRuleConfig = RuleConfig<KnownDirectivesOptions>;
/**
* A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-directives](https://the-guild.dev/graphql/eslint/rules/known-directives)
*/
interface KnownDirectivesRule {
/**
* A GraphQL document is only valid if all `@directive`s are known by the schema and legally positioned.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-directives](https://the-guild.dev/graphql/eslint/rules/known-directives)
*/
'@graphql-eslint/known-directives': KnownDirectivesRuleConfig;
}
/**
* A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-fragment-names](https://the-guild.dev/graphql/eslint/rules/known-fragment-names)
*/
type KnownFragmentNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-fragment-names](https://the-guild.dev/graphql/eslint/rules/known-fragment-names)
*/
interface KnownFragmentNamesRule {
/**
* A GraphQL document is only valid if all `...Fragment` fragment spreads refer to fragments defined in the same document.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-fragment-names](https://the-guild.dev/graphql/eslint/rules/known-fragment-names)
*/
'@graphql-eslint/known-fragment-names': KnownFragmentNamesRuleConfig;
}
/**
* A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-type-names](https://the-guild.dev/graphql/eslint/rules/known-type-names)
*/
type KnownTypeNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-type-names](https://the-guild.dev/graphql/eslint/rules/known-type-names)
*/
interface KnownTypeNamesRule {
/**
* A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [known-type-names](https://the-guild.dev/graphql/eslint/rules/known-type-names)
*/
'@graphql-eslint/known-type-names': KnownTypeNamesRuleConfig;
}
/**
* A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-anonymous-operation](https://the-guild.dev/graphql/eslint/rules/lone-anonymous-operation)
*/
type LoneAnonymousOperationRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-anonymous-operation](https://the-guild.dev/graphql/eslint/rules/lone-anonymous-operation)
*/
interface LoneAnonymousOperationRule {
/**
* A GraphQL document that contains an anonymous operation (the `query` short-hand) is only valid if it contains only that one operation definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-anonymous-operation](https://the-guild.dev/graphql/eslint/rules/lone-anonymous-operation)
*/
'@graphql-eslint/lone-anonymous-operation': LoneAnonymousOperationRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type LoneExecutableDefinitionOption =
| []
| [
{
/**
* Allow certain definitions to be placed alongside others.
*
* @minItems 1
* @maxItems 3
*/
ignore?:
| ['fragment' | 'query' | 'mutation' | 'subscription']
| [
'fragment' | 'query' | 'mutation' | 'subscription',
'fragment' | 'query' | 'mutation' | 'subscription',
]
| [
'fragment' | 'query' | 'mutation' | 'subscription',
'fragment' | 'query' | 'mutation' | 'subscription',
'fragment' | 'query' | 'mutation' | 'subscription',
];
},
];
/**
* Options.
*/
type LoneExecutableDefinitionOptions = LoneExecutableDefinitionOption;
/**
* Require queries, mutations, subscriptions or fragments to be located in separate files.
*
* @see [lone-executable-definition](https://the-guild.dev/graphql/eslint/rules/lone-executable-definition)
*/
type LoneExecutableDefinitionRuleConfig =
RuleConfig<LoneExecutableDefinitionOptions>;
/**
* Require queries, mutations, subscriptions or fragments to be located in separate files.
*
* @see [lone-executable-definition](https://the-guild.dev/graphql/eslint/rules/lone-executable-definition)
*/
interface LoneExecutableDefinitionRule {
/**
* Require queries, mutations, subscriptions or fragments to be located in separate files.
*
* @see [lone-executable-definition](https://the-guild.dev/graphql/eslint/rules/lone-executable-definition)
*/
'@graphql-eslint/lone-executable-definition': LoneExecutableDefinitionRuleConfig;
}
/**
* A GraphQL document is only valid if it contains only one schema definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-schema-definition](https://the-guild.dev/graphql/eslint/rules/lone-schema-definition)
*/
type LoneSchemaDefinitionRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if it contains only one schema definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-schema-definition](https://the-guild.dev/graphql/eslint/rules/lone-schema-definition)
*/
interface LoneSchemaDefinitionRule {
/**
* A GraphQL document is only valid if it contains only one schema definition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [lone-schema-definition](https://the-guild.dev/graphql/eslint/rules/lone-schema-definition)
*/
'@graphql-eslint/lone-schema-definition': LoneSchemaDefinitionRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
* @maxItems 1
*/
type MatchDocumentFilenameOption = [
{
fileExtension?: '.gql' | '.graphql';
query?: AsString$2 | AsObject$1;
mutation?: AsString$2 | AsObject$1;
subscription?: AsString$2 | AsObject$1;
fragment?: AsString$2 | AsObject$1;
},
];
/**
* One of: `camelCase`, `PascalCase`, `snake_case`, `UPPER_CASE`, `kebab-case`, `matchDocumentStyle`
*/
type AsString$2 =
| 'camelCase'
| 'PascalCase'
| 'snake_case'
| 'UPPER_CASE'
| 'kebab-case'
| 'matchDocumentStyle';
interface AsObject$1 {
style?:
| 'camelCase'
| 'PascalCase'
| 'snake_case'
| 'UPPER_CASE'
| 'kebab-case'
| 'matchDocumentStyle';
suffix?: string;
prefix?: string;
}
/**
* Options.
*/
type MatchDocumentFilenameOptions = MatchDocumentFilenameOption;
/**
* This rule allows you to enforce that the file name should match the operation name.
*
* @see [match-document-filename](https://the-guild.dev/graphql/eslint/rules/match-document-filename)
*/
type MatchDocumentFilenameRuleConfig =
RuleConfig<MatchDocumentFilenameOptions>;
/**
* This rule allows you to enforce that the file name should match the operation name.
*
* @see [match-document-filename](https://the-guild.dev/graphql/eslint/rules/match-document-filename)
*/
interface MatchDocumentFilenameRule {
/**
* This rule allows you to enforce that the file name should match the operation name.
*
* @see [match-document-filename](https://the-guild.dev/graphql/eslint/rules/match-document-filename)
*/
'@graphql-eslint/match-document-filename': MatchDocumentFilenameRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type NamingConventionOption$1 =
| []
| [
{
/**
* Includes:
* - `ObjectTypeDefinition`
* - `InterfaceTypeDefinition`
* - `EnumTypeDefinition`
* - `ScalarTypeDefinition`
* - `InputObjectTypeDefinition`
* - `UnionTypeDefinition`
*/
types?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#Argument).
*/
Argument?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#DirectiveDefinition).
*/
DirectiveDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#EnumTypeDefinition).
*/
EnumTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#EnumValueDefinition).
*/
EnumValueDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#FieldDefinition).
*/
FieldDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#FragmentDefinition).
*/
FragmentDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InputObjectTypeDefinition).
*/
InputObjectTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InputValueDefinition).
*/
InputValueDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InterfaceTypeDefinition).
*/
InterfaceTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#ObjectTypeDefinition).
*/
ObjectTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#OperationDefinition).
*/
OperationDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#ScalarTypeDefinition).
*/
ScalarTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#UnionTypeDefinition).
*/
UnionTypeDefinition?: AsString$1 | AsObject;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#VariableDefinition).
*/
VariableDefinition?: AsString$1 | AsObject;
allowLeadingUnderscore?: boolean;
allowTrailingUnderscore?: boolean;
} & {
[k: string]: AsString$1 | AsObject;
},
];
/**
* One of: `camelCase`, `PascalCase`, `snake_case`, `UPPER_CASE`
*/
type AsString$1 = 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
interface AsObject {
style?: 'camelCase' | 'PascalCase' | 'snake_case' | 'UPPER_CASE';
prefix?: string;
suffix?: string;
/**
* @minItems 1
*/
forbiddenPrefixes?: [string, ...string[]];
/**
* @minItems 1
*/
forbiddenSuffixes?: [string, ...string[]];
/**
* @minItems 1
*/
requiredPrefixes?: [string, ...string[]];
/**
* @minItems 1
*/
requiredSuffixes?: [string, ...string[]];
/**
* Option to skip validation of some words, e.g. acronyms
*/
ignorePattern?: string;
}
/**
* Options.
*/
type NamingConventionOptions$1 = NamingConventionOption$1;
/**
* Require names to follow specified conventions.
*
* @see [naming-convention](https://the-guild.dev/graphql/eslint/rules/naming-convention)
*/
type NamingConventionRuleConfig$1 = RuleConfig<NamingConventionOptions$1>;
/**
* Require names to follow specified conventions.
*
* @see [naming-convention](https://the-guild.dev/graphql/eslint/rules/naming-convention)
*/
interface NamingConventionRule$1 {
/**
* Require names to follow specified conventions.
*
* @see [naming-convention](https://the-guild.dev/graphql/eslint/rules/naming-convention)
*/
'@graphql-eslint/naming-convention': NamingConventionRuleConfig$1;
}
/**
* Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.
*
* @see [no-anonymous-operations](https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations)
*/
type NoAnonymousOperationsRuleConfig = RuleConfig<[]>;
/**
* Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.
*
* @see [no-anonymous-operations](https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations)
*/
interface NoAnonymousOperationsRule {
/**
* Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.
*
* @see [no-anonymous-operations](https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations)
*/
'@graphql-eslint/no-anonymous-operations': NoAnonymousOperationsRuleConfig;
}
/**
* Disallow case-insensitive enum values duplicates.
*
* @see [no-case-insensitive-enum-values-duplicates](https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates)
*/
type NoCaseInsensitiveEnumValuesDuplicatesRuleConfig = RuleConfig<[]>;
/**
* Disallow case-insensitive enum values duplicates.
*
* @see [no-case-insensitive-enum-values-duplicates](https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates)
*/
interface NoCaseInsensitiveEnumValuesDuplicatesRule {
/**
* Disallow case-insensitive enum values duplicates.
*
* @see [no-case-insensitive-enum-values-duplicates](https://the-guild.dev/graphql/eslint/rules/no-case-insensitive-enum-values-duplicates)
*/
'@graphql-eslint/no-case-insensitive-enum-values-duplicates': NoCaseInsensitiveEnumValuesDuplicatesRuleConfig;
}
/**
* Enforce that deprecated fields or enum values are not in use by operations.
*
* @see [no-deprecated](https://the-guild.dev/graphql/eslint/rules/no-deprecated)
*/
type NoDeprecatedRuleConfig$2 = RuleConfig<[]>;
/**
* Enforce that deprecated fields or enum values are not in use by operations.
*
* @see [no-deprecated](https://the-guild.dev/graphql/eslint/rules/no-deprecated)
*/
interface NoDeprecatedRule$2 {
/**
* Enforce that deprecated fields or enum values are not in use by operations.
*
* @see [no-deprecated](https://the-guild.dev/graphql/eslint/rules/no-deprecated)
*/
'@graphql-eslint/no-deprecated': NoDeprecatedRuleConfig$2;
}
/**
* Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.
*
* @see [no-duplicate-fields](https://the-guild.dev/graphql/eslint/rules/no-duplicate-fields)
*/
type NoDuplicateFieldsRuleConfig = RuleConfig<[]>;
/**
* Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.
*
* @see [no-duplicate-fields](https://the-guild.dev/graphql/eslint/rules/no-duplicate-fields)
*/
interface NoDuplicateFieldsRule {
/**
* Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.
*
* @see [no-duplicate-fields](https://the-guild.dev/graphql/eslint/rules/no-duplicate-fields)
*/
'@graphql-eslint/no-duplicate-fields': NoDuplicateFieldsRuleConfig;
}
/**
* A GraphQL fragment is only valid when it does not have cycles in fragments usage.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-fragment-cycles](https://the-guild.dev/graphql/eslint/rules/no-fragment-cycles)
*/
type NoFragmentCyclesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL fragment is only valid when it does not have cycles in fragments usage.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-fragment-cycles](https://the-guild.dev/graphql/eslint/rules/no-fragment-cycles)
*/
interface NoFragmentCyclesRule {
/**
* A GraphQL fragment is only valid when it does not have cycles in fragments usage.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-fragment-cycles](https://the-guild.dev/graphql/eslint/rules/no-fragment-cycles)
*/
'@graphql-eslint/no-fragment-cycles': NoFragmentCyclesRuleConfig;
}
/**
* Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.
Allows to use hashtag for comments, as long as it's not attached to an AST definition.
*
* @see [no-hashtag-description](https://the-guild.dev/graphql/eslint/rules/no-hashtag-description)
*/
type NoHashtagDescriptionRuleConfig = RuleConfig<[]>;
/**
* Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.
Allows to use hashtag for comments, as long as it's not attached to an AST definition.
*
* @see [no-hashtag-description](https://the-guild.dev/graphql/eslint/rules/no-hashtag-description)
*/
interface NoHashtagDescriptionRule {
/**
* Requires to use `"""` or `"` for adding a GraphQL description instead of `#`.
Allows to use hashtag for comments, as long as it's not attached to an AST definition.
*
* @see [no-hashtag-description](https://the-guild.dev/graphql/eslint/rules/no-hashtag-description)
*/
'@graphql-eslint/no-hashtag-description': NoHashtagDescriptionRuleConfig;
}
/**
* Disallow fragments that are used only in one place.
*
* @see [no-one-place-fragments](https://the-guild.dev/graphql/eslint/rules/no-one-place-fragments)
*/
type NoOnePlaceFragmentsRuleConfig = RuleConfig<[]>;
/**
* Disallow fragments that are used only in one place.
*
* @see [no-one-place-fragments](https://the-guild.dev/graphql/eslint/rules/no-one-place-fragments)
*/
interface NoOnePlaceFragmentsRule {
/**
* Disallow fragments that are used only in one place.
*
* @see [no-one-place-fragments](https://the-guild.dev/graphql/eslint/rules/no-one-place-fragments)
*/
'@graphql-eslint/no-one-place-fragments': NoOnePlaceFragmentsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
* @maxItems 1
*/
type NoRootTypeOption = [
{
/**
* @minItems 1
*/
disallow: ['mutation' | 'subscription', ...('mutation' | 'subscription')[]];
},
];
/**
* Options.
*/
type NoRootTypeOptions = NoRootTypeOption;
/**
* Disallow using root types `mutation` and/or `subscription`.
*
* @see [no-root-type](https://the-guild.dev/graphql/eslint/rules/no-root-type)
*/
type NoRootTypeRuleConfig = RuleConfig<NoRootTypeOptions>;
/**
* Disallow using root types `mutation` and/or `subscription`.
*
* @see [no-root-type](https://the-guild.dev/graphql/eslint/rules/no-root-type)
*/
interface NoRootTypeRule {
/**
* Disallow using root types `mutation` and/or `subscription`.
*
* @see [no-root-type](https://the-guild.dev/graphql/eslint/rules/no-root-type)
*/
'@graphql-eslint/no-root-type': NoRootTypeRuleConfig;
}
/**
* Avoid scalar result type on mutation type to make sure to return a valid state.
*
* @see [no-scalar-result-type-on-mutation](https://the-guild.dev/graphql/eslint/rules/no-scalar-result-type-on-mutation)
*/
type NoScalarResultTypeOnMutationRuleConfig = RuleConfig<[]>;
/**
* Avoid scalar result type on mutation type to make sure to return a valid state.
*
* @see [no-scalar-result-type-on-mutation](https://the-guild.dev/graphql/eslint/rules/no-scalar-result-type-on-mutation)
*/
interface NoScalarResultTypeOnMutationRule {
/**
* Avoid scalar result type on mutation type to make sure to return a valid state.
*
* @see [no-scalar-result-type-on-mutation](https://the-guild.dev/graphql/eslint/rules/no-scalar-result-type-on-mutation)
*/
'@graphql-eslint/no-scalar-result-type-on-mutation': NoScalarResultTypeOnMutationRuleConfig;
}
/**
* Enforces users to avoid using the type name in a field name while defining your schema.
*
* @see [no-typename-prefix](https://the-guild.dev/graphql/eslint/rules/no-typename-prefix)
*/
type NoTypenamePrefixRuleConfig = RuleConfig<[]>;
/**
* Enforces users to avoid using the type name in a field name while defining your schema.
*
* @see [no-typename-prefix](https://the-guild.dev/graphql/eslint/rules/no-typename-prefix)
*/
interface NoTypenamePrefixRule {
/**
* Enforces users to avoid using the type name in a field name while defining your schema.
*
* @see [no-typename-prefix](https://the-guild.dev/graphql/eslint/rules/no-typename-prefix)
*/
'@graphql-eslint/no-typename-prefix': NoTypenamePrefixRuleConfig;
}
/**
* A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-undefined-variables](https://the-guild.dev/graphql/eslint/rules/no-undefined-variables)
*/
type NoUndefinedVariablesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-undefined-variables](https://the-guild.dev/graphql/eslint/rules/no-undefined-variables)
*/
interface NoUndefinedVariablesRule {
/**
* A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-undefined-variables](https://the-guild.dev/graphql/eslint/rules/no-undefined-variables)
*/
'@graphql-eslint/no-undefined-variables': NoUndefinedVariablesRuleConfig;
}
/**
* Requires all types to be reachable at some level by root level fields.
*
* @see [no-unreachable-types](https://the-guild.dev/graphql/eslint/rules/no-unreachable-types)
*/
type NoUnreachableTypesRuleConfig = RuleConfig<[]>;
/**
* Requires all types to be reachable at some level by root level fields.
*
* @see [no-unreachable-types](https://the-guild.dev/graphql/eslint/rules/no-unreachable-types)
*/
interface NoUnreachableTypesRule {
/**
* Requires all types to be reachable at some level by root level fields.
*
* @see [no-unreachable-types](https://the-guild.dev/graphql/eslint/rules/no-unreachable-types)
*/
'@graphql-eslint/no-unreachable-types': NoUnreachableTypesRuleConfig;
}
/**
* Requires all fields to be used at some level by siblings operations.
*
* @see [no-unused-fields](https://the-guild.dev/graphql/eslint/rules/no-unused-fields)
*/
type NoUnusedFieldsRuleConfig = RuleConfig<[]>;
/**
* Requires all fields to be used at some level by siblings operations.
*
* @see [no-unused-fields](https://the-guild.dev/graphql/eslint/rules/no-unused-fields)
*/
interface NoUnusedFieldsRule {
/**
* Requires all fields to be used at some level by siblings operations.
*
* @see [no-unused-fields](https://the-guild.dev/graphql/eslint/rules/no-unused-fields)
*/
'@graphql-eslint/no-unused-fields': NoUnusedFieldsRuleConfig;
}
/**
* A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-fragments](https://the-guild.dev/graphql/eslint/rules/no-unused-fragments)
*/
type NoUnusedFragmentsRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-fragments](https://the-guild.dev/graphql/eslint/rules/no-unused-fragments)
*/
interface NoUnusedFragmentsRule {
/**
* A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-fragments](https://the-guild.dev/graphql/eslint/rules/no-unused-fragments)
*/
'@graphql-eslint/no-unused-fragments': NoUnusedFragmentsRuleConfig;
}
/**
* A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-variables](https://the-guild.dev/graphql/eslint/rules/no-unused-variables)
*/
type NoUnusedVariablesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-variables](https://the-guild.dev/graphql/eslint/rules/no-unused-variables)
*/
interface NoUnusedVariablesRule {
/**
* A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [no-unused-variables](https://the-guild.dev/graphql/eslint/rules/no-unused-variables)
*/
'@graphql-eslint/no-unused-variables': NoUnusedVariablesRuleConfig;
}
/**
* A GraphQL subscription is valid only if it contains a single root field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [one-field-subscriptions](https://the-guild.dev/graphql/eslint/rules/one-field-subscriptions)
*/
type OneFieldSubscriptionsRuleConfig = RuleConfig<[]>;
/**
* A GraphQL subscription is valid only if it contains a single root field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [one-field-subscriptions](https://the-guild.dev/graphql/eslint/rules/one-field-subscriptions)
*/
interface OneFieldSubscriptionsRule {
/**
* A GraphQL subscription is valid only if it contains a single root field.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [one-field-subscriptions](https://the-guild.dev/graphql/eslint/rules/one-field-subscriptions)
*/
'@graphql-eslint/one-field-subscriptions': OneFieldSubscriptionsRuleConfig;
}
/**
* A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [overlapping-fields-can-be-merged](https://the-guild.dev/graphql/eslint/rules/overlapping-fields-can-be-merged)
*/
type OverlappingFieldsCanBeMergedRuleConfig = RuleConfig<[]>;
/**
* A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [overlapping-fields-can-be-merged](https://the-guild.dev/graphql/eslint/rules/overlapping-fields-can-be-merged)
*/
interface OverlappingFieldsCanBeMergedRule {
/**
* A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [overlapping-fields-can-be-merged](https://the-guild.dev/graphql/eslint/rules/overlapping-fields-can-be-merged)
*/
'@graphql-eslint/overlapping-fields-can-be-merged': OverlappingFieldsCanBeMergedRuleConfig;
}
/**
* A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-fragment-spread](https://the-guild.dev/graphql/eslint/rules/possible-fragment-spread)
*/
type PossibleFragmentSpreadRuleConfig = RuleConfig<[]>;
/**
* A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-fragment-spread](https://the-guild.dev/graphql/eslint/rules/possible-fragment-spread)
*/
interface PossibleFragmentSpreadRule {
/**
* A fragment spread is only valid if the type condition could ever possibly be true: if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-fragment-spread](https://the-guild.dev/graphql/eslint/rules/possible-fragment-spread)
*/
'@graphql-eslint/possible-fragment-spread': PossibleFragmentSpreadRuleConfig;
}
/**
* A type extension is only valid if the type is defined and has the same kind.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-type-extension](https://the-guild.dev/graphql/eslint/rules/possible-type-extension)
*/
type PossibleTypeExtensionRuleConfig = RuleConfig<[]>;
/**
* A type extension is only valid if the type is defined and has the same kind.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-type-extension](https://the-guild.dev/graphql/eslint/rules/possible-type-extension)
*/
interface PossibleTypeExtensionRule {
/**
* A type extension is only valid if the type is defined and has the same kind.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [possible-type-extension](https://the-guild.dev/graphql/eslint/rules/possible-type-extension)
*/
'@graphql-eslint/possible-type-extension': PossibleTypeExtensionRuleConfig;
}
/**
* A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [provided-required-arguments](https://the-guild.dev/graphql/eslint/rules/provided-required-arguments)
*/
type ProvidedRequiredArgumentsRuleConfig = RuleConfig<[]>;
/**
* A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [provided-required-arguments](https://the-guild.dev/graphql/eslint/rules/provided-required-arguments)
*/
interface ProvidedRequiredArgumentsRule {
/**
* A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [provided-required-arguments](https://the-guild.dev/graphql/eslint/rules/provided-required-arguments)
*/
'@graphql-eslint/provided-required-arguments': ProvidedRequiredArgumentsRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type RelayArgumentsOption =
| []
| [
{
/**
* Enforce including both forward and backward pagination arguments
*/
includeBoth?: boolean;
},
];
/**
* Options.
*/
type RelayArgumentsOptions = RelayArgumentsOption;
/**
* Set of rules to follow Relay specification for Arguments.
- A field that returns a Connection type must include forward pagination arguments (`first` and `after`), backward pagination arguments (`last` and `before`), or both
Forward pagination arguments
- `first` takes a non-negative integer
- `after` takes the Cursor type
Backward pagination arguments
- `last` takes a non-negative integer
- `before` takes the Cursor type.
*
* @see [relay-arguments](https://the-guild.dev/graphql/eslint/rules/relay-arguments)
*/
type RelayArgumentsRuleConfig = RuleConfig<RelayArgumentsOptions>;
/**
* Set of rules to follow Relay specification for Arguments.
- A field that returns a Connection type must include forward pagination arguments (`first` and `after`), backward pagination arguments (`last` and `before`), or both
Forward pagination arguments
- `first` takes a non-negative integer
- `after` takes the Cursor type
Backward pagination arguments
- `last` takes a non-negative integer
- `before` takes the Cursor type.
*
* @see [relay-arguments](https://the-guild.dev/graphql/eslint/rules/relay-arguments)
*/
interface RelayArgumentsRule {
/**
* Set of rules to follow Relay specification for Arguments.
- A field that returns a Connection type must include forward pagination arguments (`first` and `after`), backward pagination arguments (`last` and `before`), or both
Forward pagination arguments
- `first` takes a non-negative integer
- `after` takes the Cursor type
Backward pagination arguments
- `last` takes a non-negative integer
- `before` takes the Cursor type.
*
* @see [relay-arguments](https://the-guild.dev/graphql/eslint/rules/relay-arguments)
*/
'@graphql-eslint/relay-arguments': RelayArgumentsRuleConfig;
}
/**
* Set of rules to follow Relay specification for Connection types.
- Any type whose name ends in "Connection" is considered by spec to be a `Connection type`
- Connection type must be an Object type
- Connection type must contain a field `edges` that return a list type that wraps an edge type
- Connection type must contain a field `pageInfo` that return a non-null `PageInfo` Object type.
*
* @see [relay-connection-types](https://the-guild.dev/graphql/eslint/rules/relay-connection-types)
*/
type RelayConnectionTypesRuleConfig = RuleConfig<[]>;
/**
* Set of rules to follow Relay specification for Connection types.
- Any type whose name ends in "Connection" is considered by spec to be a `Connection type`
- Connection type must be an Object type
- Connection type must contain a field `edges` that return a list type that wraps an edge type
- Connection type must contain a field `pageInfo` that return a non-null `PageInfo` Object type.
*
* @see [relay-connection-types](https://the-guild.dev/graphql/eslint/rules/relay-connection-types)
*/
interface RelayConnectionTypesRule {
/**
* Set of rules to follow Relay specification for Connection types.
- Any type whose name ends in "Connection" is considered by spec to be a `Connection type`
- Connection type must be an Object type
- Connection type must contain a field `edges` that return a list type that wraps an edge type
- Connection type must contain a field `pageInfo` that return a non-null `PageInfo` Object type.
*
* @see [relay-connection-types](https://the-guild.dev/graphql/eslint/rules/relay-connection-types)
*/
'@graphql-eslint/relay-connection-types': RelayConnectionTypesRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type RelayEdgeTypesOption =
| []
| [
{
/**
* Edge type name must end in "Edge".
*/
withEdgeSuffix?: boolean;
/**
* Edge type's field `node` must implement `Node` interface.
*/
shouldImplementNode?: boolean;
/**
* A list type should only wrap an edge type.
*/
listTypeCanWrapOnlyEdgeType?: boolean;
},
];
/**
* Options.
*/
type RelayEdgeTypesOptions = RelayEdgeTypesOption;
/**
* Set of rules to follow Relay specification for Edge types.
- A type that is returned in list form by a connection type's `edges` field is considered by this spec to be an Edge type
- Edge type must be an Object type
- Edge type must contain a field `node` that return either Scalar, Enum, Object, Interface, Union, or a non-null wrapper around one of those types. Notably, this field cannot return a list
- Edge type must contain a field `cursor` that return either String, Scalar, or a non-null wrapper around one of those types
- Edge type name must end in "Edge" _(optional)_
- Edge type's field `node` must implement `Node` interface _(optional)_
- A list type should only wrap an edge type _(optional)_.
*
* @see [relay-edge-types](https://the-guild.dev/graphql/eslint/rules/relay-edge-types)
*/
type RelayEdgeTypesRuleConfig = RuleConfig<RelayEdgeTypesOptions>;
/**
* Set of rules to follow Relay specification for Edge types.
- A type that is returned in list form by a connection type's `edges` field is considered by this spec to be an Edge type
- Edge type must be an Object type
- Edge type must contain a field `node` that return either Scalar, Enum, Object, Interface, Union, or a non-null wrapper around one of those types. Notably, this field cannot return a list
- Edge type must contain a field `cursor` that return either String, Scalar, or a non-null wrapper around one of those types
- Edge type name must end in "Edge" _(optional)_
- Edge type's field `node` must implement `Node` interface _(optional)_
- A list type should only wrap an edge type _(optional)_.
*
* @see [relay-edge-types](https://the-guild.dev/graphql/eslint/rules/relay-edge-types)
*/
interface RelayEdgeTypesRule {
/**
* Set of rules to follow Relay specification for Edge types.
- A type that is returned in list form by a connection type's `edges` field is considered by this spec to be an Edge type
- Edge type must be an Object type
- Edge type must contain a field `node` that return either Scalar, Enum, Object, Interface, Union, or a non-null wrapper around one of those types. Notably, this field cannot return a list
- Edge type must contain a field `cursor` that return either String, Scalar, or a non-null wrapper around one of those types
- Edge type name must end in "Edge" _(optional)_
- Edge type's field `node` must implement `Node` interface _(optional)_
- A list type should only wrap an edge type _(optional)_.
*
* @see [relay-edge-types](https://the-guild.dev/graphql/eslint/rules/relay-edge-types)
*/
'@graphql-eslint/relay-edge-types': RelayEdgeTypesRuleConfig;
}
/**
* Set of rules to follow Relay specification for `PageInfo` object.
- `PageInfo` must be an Object type
- `PageInfo` must contain fields `hasPreviousPage` and `hasNextPage`, that return non-null Boolean
- `PageInfo` must contain fields `startCursor` and `endCursor`, that return either String or Scalar, which can be null if there are no results.
*
* @see [relay-page-info](https://the-guild.dev/graphql/eslint/rules/relay-page-info)
*/
type RelayPageInfoRuleConfig = RuleConfig<[]>;
/**
* Set of rules to follow Relay specification for `PageInfo` object.
- `PageInfo` must be an Object type
- `PageInfo` must contain fields `hasPreviousPage` and `hasNextPage`, that return non-null Boolean
- `PageInfo` must contain fields `startCursor` and `endCursor`, that return either String or Scalar, which can be null if there are no results.
*
* @see [relay-page-info](https://the-guild.dev/graphql/eslint/rules/relay-page-info)
*/
interface RelayPageInfoRule {
/**
* Set of rules to follow Relay specification for `PageInfo` object.
- `PageInfo` must be an Object type
- `PageInfo` must contain fields `hasPreviousPage` and `hasNextPage`, that return non-null Boolean
- `PageInfo` must contain fields `startCursor` and `endCursor`, that return either String or Scalar, which can be null if there are no results.
*
* @see [relay-page-info](https://the-guild.dev/graphql/eslint/rules/relay-page-info)
*/
'@graphql-eslint/relay-page-info': RelayPageInfoRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type RequireDeprecationDateOption =
| []
| [
{
argumentName?: string;
},
];
/**
* Options.
*/
type RequireDeprecationDateOptions = RequireDeprecationDateOption;
/**
* Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.
*
* @see [require-deprecation-date](https://the-guild.dev/graphql/eslint/rules/require-deprecation-date)
*/
type RequireDeprecationDateRuleConfig =
RuleConfig<RequireDeprecationDateOptions>;
/**
* Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.
*
* @see [require-deprecation-date](https://the-guild.dev/graphql/eslint/rules/require-deprecation-date)
*/
interface RequireDeprecationDateRule {
/**
* Require deletion date on `@deprecated` directive. Suggest removing deprecated things after deprecated date.
*
* @see [require-deprecation-date](https://the-guild.dev/graphql/eslint/rules/require-deprecation-date)
*/
'@graphql-eslint/require-deprecation-date': RequireDeprecationDateRuleConfig;
}
/**
* Require all deprecation directives to specify a reason.
*
* @see [require-deprecation-reason](https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason)
*/
type RequireDeprecationReasonRuleConfig = RuleConfig<[]>;
/**
* Require all deprecation directives to specify a reason.
*
* @see [require-deprecation-reason](https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason)
*/
interface RequireDeprecationReasonRule {
/**
* Require all deprecation directives to specify a reason.
*
* @see [require-deprecation-reason](https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason)
*/
'@graphql-eslint/require-deprecation-reason': RequireDeprecationReasonRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
* @maxItems 1
*/
type RequireDescriptionOption$1 = [
{
/**
* Includes:
* - `ObjectTypeDefinition`
* - `InterfaceTypeDefinition`
* - `EnumTypeDefinition`
* - `ScalarTypeDefinition`
* - `InputObjectTypeDefinition`
* - `UnionTypeDefinition`
*/
types?: boolean;
/**
* Definitions within `Query`, `Mutation`, and `Subscription` root types.
*/
rootField?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#DirectiveDefinition).
*/
DirectiveDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#EnumTypeDefinition).
*/
EnumTypeDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#EnumValueDefinition).
*/
EnumValueDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#FieldDefinition).
*/
FieldDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InputObjectTypeDefinition).
*/
InputObjectTypeDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InputValueDefinition).
*/
InputValueDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#InterfaceTypeDefinition).
*/
InterfaceTypeDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#ObjectTypeDefinition).
*/
ObjectTypeDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#OperationDefinition).
* > You must use only comment syntax `#` and not description syntax `"""` or `"`.
*/
OperationDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#ScalarTypeDefinition).
*/
ScalarTypeDefinition?: boolean;
/**
* Read more about this kind on [spec.graphql.org](https://spec.graphql.org/October2021/#UnionTypeDefinition).
*/
UnionTypeDefinition?: boolean;
},
];
/**
* Options.
*/
type RequireDescriptionOptions$1 = RequireDescriptionOption$1;
/**
* Enforce descriptions in type definitions and operations.
*
* @see [require-description](https://the-guild.dev/graphql/eslint/rules/require-description)
*/
type RequireDescriptionRuleConfig$1 =
RuleConfig<RequireDescriptionOptions$1>;
/**
* Enforce descriptions in type definitions and operations.
*
* @see [require-description](https://the-guild.dev/graphql/eslint/rules/require-description)
*/
interface RequireDescriptionRule$1 {
/**
* Enforce descriptions in type definitions and operations.
*
* @see [require-description](https://the-guild.dev/graphql/eslint/rules/require-description)
*/
'@graphql-eslint/require-description': RequireDescriptionRuleConfig$1;
}
/**
* Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.
> Currently, no errors are reported for result type `union`, `interface` and `scalar`.
*
* @see [require-field-of-type-query-in-mutation-result](https://the-guild.dev/graphql/eslint/rules/require-field-of-type-query-in-mutation-result)
*/
type RequireFieldOfTypeQueryInMutationResultRuleConfig = RuleConfig<[]>;
/**
* Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.
> Currently, no errors are reported for result type `union`, `interface` and `scalar`.
*
* @see [require-field-of-type-query-in-mutation-result](https://the-guild.dev/graphql/eslint/rules/require-field-of-type-query-in-mutation-result)
*/
interface RequireFieldOfTypeQueryInMutationResultRule {
/**
* Allow the client in one round-trip not only to call mutation but also to get a wagon of data to update their application.
> Currently, no errors are reported for result type `union`, `interface` and `scalar`.
*
* @see [require-field-of-type-query-in-mutation-result](https://the-guild.dev/graphql/eslint/rules/require-field-of-type-query-in-mutation-result)
*/
'@graphql-eslint/require-field-of-type-query-in-mutation-result': RequireFieldOfTypeQueryInMutationResultRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type RequireIdWhenAvailableOption =
| []
| [
{
fieldName?: AsString | AsArray;
},
];
type AsString = string;
/**
* @minItems 1
*/
type AsArray = [string, ...string[]];
/**
* Options.
*/
type RequireIdWhenAvailableOptions = RequireIdWhenAvailableOption;
/**
* Enforce selecting specific fields when they are available on the GraphQL type.
*
* @see [require-id-when-available](https://the-guild.dev/graphql/eslint/rules/require-id-when-available)
*/
type RequireIdWhenAvailableRuleConfig =
RuleConfig<RequireIdWhenAvailableOptions>;
/**
* Enforce selecting specific fields when they are available on the GraphQL type.
*
* @see [require-id-when-available](https://the-guild.dev/graphql/eslint/rules/require-id-when-available)
*/
interface RequireIdWhenAvailableRule {
/**
* Enforce selecting specific fields when they are available on the GraphQL type.
*
* @see [require-id-when-available](https://the-guild.dev/graphql/eslint/rules/require-id-when-available)
*/
'@graphql-eslint/require-id-when-available': RequireIdWhenAvailableRuleConfig;
}
/**
* Require fragments to be imported via an import expression.
*
* @see [require-import-fragment](https://the-guild.dev/graphql/eslint/rules/require-import-fragment)
*/
type RequireImportFragmentRuleConfig = RuleConfig<[]>;
/**
* Require fragments to be imported via an import expression.
*
* @see [require-import-fragment](https://the-guild.dev/graphql/eslint/rules/require-import-fragment)
*/
interface RequireImportFragmentRule {
/**
* Require fragments to be imported via an import expression.
*
* @see [require-import-fragment](https://the-guild.dev/graphql/eslint/rules/require-import-fragment)
*/
'@graphql-eslint/require-import-fragment': RequireImportFragmentRuleConfig;
}
/**
* Require `input` or `type` fields to be non-nullable with `@oneOf` directive.
*
* @see [require-nullable-fields-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-nullable-fields-with-oneof)
*/
type RequireNullableFieldsWithOneofRuleConfig = RuleConfig<[]>;
/**
* Require `input` or `type` fields to be non-nullable with `@oneOf` directive.
*
* @see [require-nullable-fields-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-nullable-fields-with-oneof)
*/
interface RequireNullableFieldsWithOneofRule {
/**
* Require `input` or `type` fields to be non-nullable with `@oneOf` directive.
*
* @see [require-nullable-fields-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-nullable-fields-with-oneof)
*/
'@graphql-eslint/require-nullable-fields-with-oneof': RequireNullableFieldsWithOneofRuleConfig;
}
/**
* Require nullable fields in root types.
*
* @see [require-nullable-result-in-root](https://the-guild.dev/graphql/eslint/rules/require-nullable-result-in-root)
*/
type RequireNullableResultInRootRuleConfig = RuleConfig<[]>;
/**
* Require nullable fields in root types.
*
* @see [require-nullable-result-in-root](https://the-guild.dev/graphql/eslint/rules/require-nullable-result-in-root)
*/
interface RequireNullableResultInRootRule {
/**
* Require nullable fields in root types.
*
* @see [require-nullable-result-in-root](https://the-guild.dev/graphql/eslint/rules/require-nullable-result-in-root)
*/
'@graphql-eslint/require-nullable-result-in-root': RequireNullableResultInRootRuleConfig;
}
/**
* Enforce types with `@oneOf` directive have `error` and `ok` fields.
*
* @see [require-type-pattern-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-type-pattern-with-oneof)
*/
type RequireTypePatternWithOneofRuleConfig = RuleConfig<[]>;
/**
* Enforce types with `@oneOf` directive have `error` and `ok` fields.
*
* @see [require-type-pattern-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-type-pattern-with-oneof)
*/
interface RequireTypePatternWithOneofRule {
/**
* Enforce types with `@oneOf` directive have `error` and `ok` fields.
*
* @see [require-type-pattern-with-oneof](https://the-guild.dev/graphql/eslint/rules/require-type-pattern-with-oneof)
*/
'@graphql-eslint/require-type-pattern-with-oneof': RequireTypePatternWithOneofRuleConfig;
}
/**
* A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [scalar-leafs](https://the-guild.dev/graphql/eslint/rules/scalar-leafs)
*/
type ScalarLeafsRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [scalar-leafs](https://the-guild.dev/graphql/eslint/rules/scalar-leafs)
*/
interface ScalarLeafsRule {
/**
* A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [scalar-leafs](https://the-guild.dev/graphql/eslint/rules/scalar-leafs)
*/
'@graphql-eslint/scalar-leafs': ScalarLeafsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
* @maxItems 1
*/
type SelectionSetDepthOption = [
{
maxDepth: number;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
},
];
/**
* Options.
*/
type SelectionSetDepthOptions = SelectionSetDepthOption;
/**
* Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).
*
* @see [selection-set-depth](https://the-guild.dev/graphql/eslint/rules/selection-set-depth)
*/
type SelectionSetDepthRuleConfig = RuleConfig<SelectionSetDepthOptions>;
/**
* Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).
*
* @see [selection-set-depth](https://the-guild.dev/graphql/eslint/rules/selection-set-depth)
*/
interface SelectionSetDepthRule {
/**
* Limit the complexity of the GraphQL operations solely by their depth. Based on [graphql-depth-limit](https://npmjs.com/package/graphql-depth-limit).
*
* @see [selection-set-depth](https://the-guild.dev/graphql/eslint/rules/selection-set-depth)
*/
'@graphql-eslint/selection-set-depth': SelectionSetDepthRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type StrictIdInTypesOption =
| []
| [
{
/**
* @minItems 1
*/
acceptedIdNames?: [string, ...string[]];
/**
* @minItems 1
*/
acceptedIdTypes?: [string, ...string[]];
exceptions?: {
/**
* This is used to exclude types with names that match one of the specified values.
*
* @minItems 1
*/
types?: [string, ...string[]];
/**
* This is used to exclude types with names with suffixes that match one of the specified values.
*
* @minItems 1
*/
suffixes?: [string, ...string[]];
};
},
];
/**
* Options.
*/
type StrictIdInTypesOptions = StrictIdInTypesOption;
/**
* Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers.
*
* @see [strict-id-in-types](https://the-guild.dev/graphql/eslint/rules/strict-id-in-types)
*/
type StrictIdInTypesRuleConfig = RuleConfig<StrictIdInTypesOptions>;
/**
* Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers.
*
* @see [strict-id-in-types](https://the-guild.dev/graphql/eslint/rules/strict-id-in-types)
*/
interface StrictIdInTypesRule {
/**
* Requires output types to have one unique identifier unless they do not have a logical one. Exceptions can be used to ignore output types that do not have unique identifiers.
*
* @see [strict-id-in-types](https://the-guild.dev/graphql/eslint/rules/strict-id-in-types)
*/
'@graphql-eslint/strict-id-in-types': StrictIdInTypesRuleConfig;
}
/**
* A GraphQL field or directive is only valid if all supplied arguments are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-argument-names](https://the-guild.dev/graphql/eslint/rules/unique-argument-names)
*/
type UniqueArgumentNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL field or directive is only valid if all supplied arguments are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-argument-names](https://the-guild.dev/graphql/eslint/rules/unique-argument-names)
*/
interface UniqueArgumentNamesRule {
/**
* A GraphQL field or directive is only valid if all supplied arguments are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-argument-names](https://the-guild.dev/graphql/eslint/rules/unique-argument-names)
*/
'@graphql-eslint/unique-argument-names': UniqueArgumentNamesRuleConfig;
}
/**
* A GraphQL document is only valid if all defined directives have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names](https://the-guild.dev/graphql/eslint/rules/unique-directive-names)
*/
type UniqueDirectiveNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all defined directives have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names](https://the-guild.dev/graphql/eslint/rules/unique-directive-names)
*/
interface UniqueDirectiveNamesRule {
/**
* A GraphQL document is only valid if all defined directives have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names](https://the-guild.dev/graphql/eslint/rules/unique-directive-names)
*/
'@graphql-eslint/unique-directive-names': UniqueDirectiveNamesRuleConfig;
}
/**
* A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names-per-location](https://the-guild.dev/graphql/eslint/rules/unique-directive-names-per-location)
*/
type UniqueDirectiveNamesPerLocationRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names-per-location](https://the-guild.dev/graphql/eslint/rules/unique-directive-names-per-location)
*/
interface UniqueDirectiveNamesPerLocationRule {
/**
* A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-directive-names-per-location](https://the-guild.dev/graphql/eslint/rules/unique-directive-names-per-location)
*/
'@graphql-eslint/unique-directive-names-per-location': UniqueDirectiveNamesPerLocationRuleConfig;
}
/**
* A GraphQL enum type is only valid if all its values are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-enum-value-names](https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names)
*/
type UniqueEnumValueNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL enum type is only valid if all its values are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-enum-value-names](https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names)
*/
interface UniqueEnumValueNamesRule {
/**
* A GraphQL enum type is only valid if all its values are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-enum-value-names](https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names)
*/
'@graphql-eslint/unique-enum-value-names': UniqueEnumValueNamesRuleConfig;
}
/**
* A GraphQL complex type is only valid if all its fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-field-definition-names](https://the-guild.dev/graphql/eslint/rules/unique-field-definition-names)
*/
type UniqueFieldDefinitionNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL complex type is only valid if all its fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-field-definition-names](https://the-guild.dev/graphql/eslint/rules/unique-field-definition-names)
*/
interface UniqueFieldDefinitionNamesRule {
/**
* A GraphQL complex type is only valid if all its fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-field-definition-names](https://the-guild.dev/graphql/eslint/rules/unique-field-definition-names)
*/
'@graphql-eslint/unique-field-definition-names': UniqueFieldDefinitionNamesRuleConfig;
}
/**
* Enforce unique fragment names across your project.
*
* @see [unique-fragment-name](https://the-guild.dev/graphql/eslint/rules/unique-fragment-name)
*/
type UniqueFragmentNameRuleConfig = RuleConfig<[]>;
/**
* Enforce unique fragment names across your project.
*
* @see [unique-fragment-name](https://the-guild.dev/graphql/eslint/rules/unique-fragment-name)
*/
interface UniqueFragmentNameRule {
/**
* Enforce unique fragment names across your project.
*
* @see [unique-fragment-name](https://the-guild.dev/graphql/eslint/rules/unique-fragment-name)
*/
'@graphql-eslint/unique-fragment-name': UniqueFragmentNameRuleConfig;
}
/**
* A GraphQL input object value is only valid if all supplied fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-input-field-names](https://the-guild.dev/graphql/eslint/rules/unique-input-field-names)
*/
type UniqueInputFieldNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL input object value is only valid if all supplied fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-input-field-names](https://the-guild.dev/graphql/eslint/rules/unique-input-field-names)
*/
interface UniqueInputFieldNamesRule {
/**
* A GraphQL input object value is only valid if all supplied fields are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-input-field-names](https://the-guild.dev/graphql/eslint/rules/unique-input-field-names)
*/
'@graphql-eslint/unique-input-field-names': UniqueInputFieldNamesRuleConfig;
}
/**
* Enforce unique operation names across your project.
*
* @see [unique-operation-name](https://the-guild.dev/graphql/eslint/rules/unique-operation-name)
*/
type UniqueOperationNameRuleConfig = RuleConfig<[]>;
/**
* Enforce unique operation names across your project.
*
* @see [unique-operation-name](https://the-guild.dev/graphql/eslint/rules/unique-operation-name)
*/
interface UniqueOperationNameRule {
/**
* Enforce unique operation names across your project.
*
* @see [unique-operation-name](https://the-guild.dev/graphql/eslint/rules/unique-operation-name)
*/
'@graphql-eslint/unique-operation-name': UniqueOperationNameRuleConfig;
}
/**
* A GraphQL document is only valid if it has only one type per operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-operation-types](https://the-guild.dev/graphql/eslint/rules/unique-operation-types)
*/
type UniqueOperationTypesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if it has only one type per operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-operation-types](https://the-guild.dev/graphql/eslint/rules/unique-operation-types)
*/
interface UniqueOperationTypesRule {
/**
* A GraphQL document is only valid if it has only one type per operation.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-operation-types](https://the-guild.dev/graphql/eslint/rules/unique-operation-types)
*/
'@graphql-eslint/unique-operation-types': UniqueOperationTypesRuleConfig;
}
/**
* A GraphQL document is only valid if all defined types have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-type-names](https://the-guild.dev/graphql/eslint/rules/unique-type-names)
*/
type UniqueTypeNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all defined types have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-type-names](https://the-guild.dev/graphql/eslint/rules/unique-type-names)
*/
interface UniqueTypeNamesRule {
/**
* A GraphQL document is only valid if all defined types have unique names.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-type-names](https://the-guild.dev/graphql/eslint/rules/unique-type-names)
*/
'@graphql-eslint/unique-type-names': UniqueTypeNamesRuleConfig;
}
/**
* A GraphQL operation is only valid if all its variables are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-variable-names](https://the-guild.dev/graphql/eslint/rules/unique-variable-names)
*/
type UniqueVariableNamesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL operation is only valid if all its variables are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-variable-names](https://the-guild.dev/graphql/eslint/rules/unique-variable-names)
*/
interface UniqueVariableNamesRule {
/**
* A GraphQL operation is only valid if all its variables are uniquely named.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [unique-variable-names](https://the-guild.dev/graphql/eslint/rules/unique-variable-names)
*/
'@graphql-eslint/unique-variable-names': UniqueVariableNamesRuleConfig;
}
/**
* A GraphQL document is only valid if all value literals are of the type expected at their position.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [value-literals-of-correct-type](https://the-guild.dev/graphql/eslint/rules/value-literals-of-correct-type)
*/
type ValueLiteralsOfCorrectTypeRuleConfig = RuleConfig<[]>;
/**
* A GraphQL document is only valid if all value literals are of the type expected at their position.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [value-literals-of-correct-type](https://the-guild.dev/graphql/eslint/rules/value-literals-of-correct-type)
*/
interface ValueLiteralsOfCorrectTypeRule {
/**
* A GraphQL document is only valid if all value literals are of the type expected at their position.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [value-literals-of-correct-type](https://the-guild.dev/graphql/eslint/rules/value-literals-of-correct-type)
*/
'@graphql-eslint/value-literals-of-correct-type': ValueLiteralsOfCorrectTypeRuleConfig;
}
/**
* A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-are-input-types](https://the-guild.dev/graphql/eslint/rules/variables-are-input-types)
*/
type VariablesAreInputTypesRuleConfig = RuleConfig<[]>;
/**
* A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-are-input-types](https://the-guild.dev/graphql/eslint/rules/variables-are-input-types)
*/
interface VariablesAreInputTypesRule {
/**
* A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-are-input-types](https://the-guild.dev/graphql/eslint/rules/variables-are-input-types)
*/
'@graphql-eslint/variables-are-input-types': VariablesAreInputTypesRuleConfig;
}
/**
* Variables passed to field arguments conform to type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-in-allowed-position](https://the-guild.dev/graphql/eslint/rules/variables-in-allowed-position)
*/
type VariablesInAllowedPositionRuleConfig = RuleConfig<[]>;
/**
* Variables passed to field arguments conform to type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-in-allowed-position](https://the-guild.dev/graphql/eslint/rules/variables-in-allowed-position)
*/
interface VariablesInAllowedPositionRule {
/**
* Variables passed to field arguments conform to type.
> This rule is a wrapper around a `graphql-js` validation function.
*
* @see [variables-in-allowed-position](https://the-guild.dev/graphql/eslint/rules/variables-in-allowed-position)
*/
'@graphql-eslint/variables-in-allowed-position': VariablesInAllowedPositionRuleConfig;
}
/**
* All GraphQL rules.
*/
type GraphQLRules = ExecutableDefinitionsRule &
FieldsOnCorrectTypeRule &
FragmentsOnCompositeTypeRule &
KnownArgumentNamesRule &
KnownDirectivesRule &
KnownFragmentNamesRule &
KnownTypeNamesRule &
LoneAnonymousOperationRule &
LoneSchemaDefinitionRule &
NoFragmentCyclesRule &
NoUndefinedVariablesRule &
NoUnusedFragmentsRule &
NoUnusedVariablesRule &
OverlappingFieldsCanBeMergedRule &
PossibleFragmentSpreadRule &
PossibleTypeExtensionRule &
ProvidedRequiredArgumentsRule &
ScalarLeafsRule &
OneFieldSubscriptionsRule &
UniqueArgumentNamesRule &
UniqueDirectiveNamesRule &
UniqueDirectiveNamesPerLocationRule &
UniqueEnumValueNamesRule &
UniqueFieldDefinitionNamesRule &
UniqueInputFieldNamesRule &
UniqueOperationTypesRule &
UniqueTypeNamesRule &
UniqueVariableNamesRule &
ValueLiteralsOfCorrectTypeRule &
VariablesAreInputTypesRule &
VariablesInAllowedPositionRule &
AlphabetizeRule &
DescriptionStyleRule &
InputNameRule &
LoneExecutableDefinitionRule &
MatchDocumentFilenameRule &
NamingConventionRule$1 &
NoAnonymousOperationsRule &
NoCaseInsensitiveEnumValuesDuplicatesRule &
NoDeprecatedRule$2 &
NoDuplicateFieldsRule &
NoHashtagDescriptionRule &
NoOnePlaceFragmentsRule &
NoRootTypeRule &
NoScalarResultTypeOnMutationRule &
NoTypenamePrefixRule &
NoUnreachableTypesRule &
NoUnusedFieldsRule &
RelayArgumentsRule &
RelayConnectionTypesRule &
RelayEdgeTypesRule &
RelayPageInfoRule &
RequireDeprecationDateRule &
RequireDeprecationReasonRule &
RequireDescriptionRule$1 &
RequireFieldOfTypeQueryInMutationResultRule &
RequireIdWhenAvailableRule &
RequireImportFragmentRule &
RequireNullableFieldsWithOneofRule &
RequireNullableResultInRootRule &
RequireTypePatternWithOneofRule &
SelectionSetDepthRule &
StrictIdInTypesRule &
UniqueFragmentNameRule &
UniqueOperationNameRule;
/**
* Option.
*/
type ConsistentTypeSpecifierStyleOption =
| 'prefer-inline'
| 'prefer-top-level';
/**
* Options.
*/
type ConsistentTypeSpecifierStyleOptions = [
ConsistentTypeSpecifierStyleOption?,
];
/**
* Enforce or ban the use of inline type-only markers for named imports.
*
* @see [consistent-type-specifier-style](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/consistent-type-specifier-style.md)
*/
type ConsistentTypeSpecifierStyleRuleConfig =
RuleConfig<ConsistentTypeSpecifierStyleOptions>;
/**
* Enforce or ban the use of inline type-only markers for named imports.
*
* @see [consistent-type-specifier-style](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/consistent-type-specifier-style.md)
*/
interface ConsistentTypeSpecifierStyleRule {
/**
* Enforce or ban the use of inline type-only markers for named imports.
*
* @see [consistent-type-specifier-style](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/consistent-type-specifier-style.md)
*/
'import/consistent-type-specifier-style': ConsistentTypeSpecifierStyleRuleConfig;
}
/**
* Ensure a default export is present, given a default import.
*
* @see [default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/default.md)
*/
type DefaultRuleConfig = RuleConfig<[]>;
/**
* Ensure a default export is present, given a default import.
*
* @see [default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/default.md)
*/
interface DefaultRule {
/**
* Ensure a default export is present, given a default import.
*
* @see [default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/default.md)
*/
'import/default': DefaultRuleConfig;
}
/**
* Option.
*/
interface DynamicImportChunknameOption {
importFunctions?: string[];
webpackChunknameFormat?: string;
[k: string]: any;
}
/**
* Options.
*/
type DynamicImportChunknameOptions = [DynamicImportChunknameOption?];
/**
* Enforce a leading comment with the webpackChunkName for dynamic imports.
*
* @see [dynamic-import-chunkname](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/dynamic-import-chunkname.md)
*/
type DynamicImportChunknameRuleConfig =
RuleConfig<DynamicImportChunknameOptions>;
/**
* Enforce a leading comment with the webpackChunkName for dynamic imports.
*
* @see [dynamic-import-chunkname](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/dynamic-import-chunkname.md)
*/
interface DynamicImportChunknameRule {
/**
* Enforce a leading comment with the webpackChunkName for dynamic imports.
*
* @see [dynamic-import-chunkname](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/dynamic-import-chunkname.md)
*/
'import/dynamic-import-chunkname': DynamicImportChunknameRuleConfig;
}
/**
* Forbid any invalid exports, i.e. re-export of the same name.
*
* @see [export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/export.md)
*/
type ExportRuleConfig = RuleConfig<[]>;
/**
* Forbid any invalid exports, i.e. re-export of the same name.
*
* @see [export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/export.md)
*/
interface ExportRule {
/**
* Forbid any invalid exports, i.e. re-export of the same name.
*
* @see [export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/export.md)
*/
'import/export': ExportRuleConfig;
}
/**
* Ensure all exports appear after other statements.
*
* @see [exports-last](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/exports-last.md)
*/
type ExportsLastRuleConfig = RuleConfig<[]>;
/**
* Ensure all exports appear after other statements.
*
* @see [exports-last](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/exports-last.md)
*/
interface ExportsLastRule {
/**
* Ensure all exports appear after other statements.
*
* @see [exports-last](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/exports-last.md)
*/
'import/exports-last': ExportsLastRuleConfig;
}
/**
* Option.
*/
type ExtensionsOption =
| []
| ['always' | 'ignorePackages' | 'never']
| []
| ['always' | 'ignorePackages' | 'never']
| [
'always' | 'ignorePackages' | 'never',
{
pattern?: {
/**
*/
[k: string]: 'always' | 'ignorePackages' | 'never';
};
ignorePackages?: boolean;
[k: string]: any;
},
]
| []
| [
{
pattern?: {
/**
*/
[k: string]: 'always' | 'ignorePackages' | 'never';
};
ignorePackages?: boolean;
[k: string]: any;
},
]
| []
| [
{
/**
*/
[k: string]: 'always' | 'ignorePackages' | 'never';
},
]
| []
| ['always' | 'ignorePackages' | 'never']
| [
'always' | 'ignorePackages' | 'never',
{
/**
*/
[k: string]: 'always' | 'ignorePackages' | 'never';
},
];
/**
* Options.
*/
type ExtensionsOptions = ExtensionsOption;
/**
* Ensure consistent use of file extension within the import path.
*
* @see [extensions](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/extensions.md)
*/
type ExtensionsRuleConfig = RuleConfig<ExtensionsOptions>;
/**
* Ensure consistent use of file extension within the import path.
*
* @see [extensions](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/extensions.md)
*/
interface ExtensionsRule {
/**
* Ensure consistent use of file extension within the import path.
*
* @see [extensions](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/extensions.md)
*/
'import/extensions': ExtensionsRuleConfig;
}
/**
* Option.
*/
type FirstOption = 'absolute-first' | 'disable-absolute-first';
/**
* Options.
*/
type FirstOptions = [FirstOption?];
/**
* Ensure all imports appear before other statements.
*
* @see [first](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/first.md)
*/
type FirstRuleConfig = RuleConfig<FirstOptions>;
/**
* Ensure all imports appear before other statements.
*
* @see [first](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/first.md)
*/
interface FirstRule {
/**
* Ensure all imports appear before other statements.
*
* @see [first](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/first.md)
*/
'import/first': FirstRuleConfig;
}
/**
* Prefer named exports to be grouped together in a single export declaration.
*
* @see [group-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/group-exports.md)
*/
type GroupExportsRuleConfig = RuleConfig<[]>;
/**
* Prefer named exports to be grouped together in a single export declaration.
*
* @see [group-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/group-exports.md)
*/
interface GroupExportsRule {
/**
* Prefer named exports to be grouped together in a single export declaration.
*
* @see [group-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/group-exports.md)
*/
'import/group-exports': GroupExportsRuleConfig;
}
/**
* Option.
*/
type ImportsFirstOption = 'absolute-first' | 'disable-absolute-first';
/**
* Options.
*/
type ImportsFirstOptions = [ImportsFirstOption?];
/**
* Replaced by `import/first`.
*
* @deprecated
*
* @see [imports-first](https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md)
*/
type ImportsFirstRuleConfig = RuleConfig<ImportsFirstOptions>;
/**
* Replaced by `import/first`.
*
* @deprecated
*
* @see [imports-first](https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md)
*/
interface ImportsFirstRule {
/**
* Replaced by `import/first`.
*
* @deprecated
*
* @see [imports-first](https://github.com/import-js/eslint-plugin-import/blob/7b25c1cb95ee18acc1531002fd343e1e6031f9ed/docs/rules/imports-first.md)
*/
'import/imports-first': ImportsFirstRuleConfig;
}
/**
* Option.
*/
interface MaxDependenciesOption {
max?: number;
ignoreTypeImports?: boolean;
}
/**
* Options.
*/
type MaxDependenciesOptions = [MaxDependenciesOption?];
/**
* Enforce the maximum number of dependencies a module can have.
*
* @see [max-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/max-dependencies.md)
*/
type MaxDependenciesRuleConfig = RuleConfig<MaxDependenciesOptions>;
/**
* Enforce the maximum number of dependencies a module can have.
*
* @see [max-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/max-dependencies.md)
*/
interface MaxDependenciesRule {
/**
* Enforce the maximum number of dependencies a module can have.
*
* @see [max-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/max-dependencies.md)
*/
'import/max-dependencies': MaxDependenciesRuleConfig;
}
/**
* Option.
*/
interface NamedOption {
commonjs?: boolean;
}
/**
* Options.
*/
type NamedOptions = [NamedOption?];
/**
* Ensure named imports correspond to a named export in the remote file.
*
* @see [named](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/named.md)
*/
type NamedRuleConfig = RuleConfig<NamedOptions>;
/**
* Ensure named imports correspond to a named export in the remote file.
*
* @see [named](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/named.md)
*/
interface NamedRule {
/**
* Ensure named imports correspond to a named export in the remote file.
*
* @see [named](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/named.md)
*/
'import/named': NamedRuleConfig;
}
/**
* Option.
*/
interface NamespaceOption {
/**
* If `false`, will report computed (and thus, un-lintable) references to namespace members.
*/
allowComputed?: boolean;
}
/**
* Options.
*/
type NamespaceOptions = [NamespaceOption?];
/**
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
*
* @see [namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/namespace.md)
*/
type NamespaceRuleConfig = RuleConfig<NamespaceOptions>;
/**
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
*
* @see [namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/namespace.md)
*/
interface NamespaceRule {
/**
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
*
* @see [namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/namespace.md)
*/
'import/namespace': NamespaceRuleConfig;
}
/**
* Option.
*/
interface NewlineAfterImportOption {
count?: number;
considerComments?: boolean;
}
/**
* Options.
*/
type NewlineAfterImportOptions = [NewlineAfterImportOption?];
/**
* Enforce a newline after import statements.
*
* @see [newline-after-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/newline-after-import.md)
*/
type NewlineAfterImportRuleConfig =
RuleConfig<NewlineAfterImportOptions>;
/**
* Enforce a newline after import statements.
*
* @see [newline-after-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/newline-after-import.md)
*/
interface NewlineAfterImportRule {
/**
* Enforce a newline after import statements.
*
* @see [newline-after-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/newline-after-import.md)
*/
'import/newline-after-import': NewlineAfterImportRuleConfig;
}
/**
* Option.
*/
interface NoAbsolutePathOption {
commonjs?: boolean;
amd?: boolean;
esmodule?: boolean;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
}
/**
* Options.
*/
type NoAbsolutePathOptions = [NoAbsolutePathOption?];
/**
* Forbid import of modules using absolute paths.
*
* @see [no-absolute-path](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-absolute-path.md)
*/
type NoAbsolutePathRuleConfig = RuleConfig<NoAbsolutePathOptions>;
/**
* Forbid import of modules using absolute paths.
*
* @see [no-absolute-path](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-absolute-path.md)
*/
interface NoAbsolutePathRule {
/**
* Forbid import of modules using absolute paths.
*
* @see [no-absolute-path](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-absolute-path.md)
*/
'import/no-absolute-path': NoAbsolutePathRuleConfig;
}
/**
* Forbid AMD `require` and `define` calls.
*
* @see [no-amd](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-amd.md)
*/
type NoAmdRuleConfig = RuleConfig<[]>;
/**
* Forbid AMD `require` and `define` calls.
*
* @see [no-amd](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-amd.md)
*/
interface NoAmdRule {
/**
* Forbid AMD `require` and `define` calls.
*
* @see [no-amd](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-amd.md)
*/
'import/no-amd': NoAmdRuleConfig;
}
/**
* Option.
*/
interface NoAnonymousDefaultExportOption {
/**
* If `false`, will report default export of an array
*/
allowArray?: boolean;
/**
* If `false`, will report default export of an arrow function
*/
allowArrowFunction?: boolean;
/**
* If `false`, will report default export of a function call
*/
allowCallExpression?: boolean;
/**
* If `false`, will report default export of an anonymous class
*/
allowAnonymousClass?: boolean;
/**
* If `false`, will report default export of an anonymous function
*/
allowAnonymousFunction?: boolean;
/**
* If `false`, will report default export of a literal
*/
allowLiteral?: boolean;
/**
* If `false`, will report default export of an object expression
*/
allowObject?: boolean;
/**
* If `false`, will report default export of a class instantiation
*/
allowNew?: boolean;
}
/**
* Options.
*/
type NoAnonymousDefaultExportOptions = [NoAnonymousDefaultExportOption?];
/**
* Forbid anonymous values as default exports.
*
* @see [no-anonymous-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-anonymous-default-export.md)
*/
type NoAnonymousDefaultExportRuleConfig =
RuleConfig<NoAnonymousDefaultExportOptions>;
/**
* Forbid anonymous values as default exports.
*
* @see [no-anonymous-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-anonymous-default-export.md)
*/
interface NoAnonymousDefaultExportRule {
/**
* Forbid anonymous values as default exports.
*
* @see [no-anonymous-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-anonymous-default-export.md)
*/
'import/no-anonymous-default-export': NoAnonymousDefaultExportRuleConfig;
}
/**
* Option.
*/
type NoCommonjsOption =
| []
| ['allow-primitive-modules']
| []
| [
{
allowPrimitiveModules?: boolean;
allowRequire?: boolean;
allowConditionalRequire?: boolean;
},
];
/**
* Options.
*/
type NoCommonjsOptions = NoCommonjsOption;
/**
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
*
* @see [no-commonjs](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-commonjs.md)
*/
type NoCommonjsRuleConfig = RuleConfig<NoCommonjsOptions>;
/**
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
*
* @see [no-commonjs](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-commonjs.md)
*/
interface NoCommonjsRule {
/**
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
*
* @see [no-commonjs](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-commonjs.md)
*/
'import/no-commonjs': NoCommonjsRuleConfig;
}
/**
* Option.
*/
interface NoCycleOption {
commonjs?: boolean;
amd?: boolean;
esmodule?: boolean;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
maxDepth?: number | '∞';
/**
* ignore external modules
*/
ignoreExternal?: boolean;
/**
* Allow cyclic dependency if there is at least one dynamic import in the chain
*/
allowUnsafeDynamicCyclicDependency?: boolean;
}
/**
* Options.
*/
type NoCycleOptions = [NoCycleOption?];
/**
* Forbid a module from importing a module with a dependency path back to itself.
*
* @see [no-cycle](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-cycle.md)
*/
type NoCycleRuleConfig = RuleConfig<NoCycleOptions>;
/**
* Forbid a module from importing a module with a dependency path back to itself.
*
* @see [no-cycle](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-cycle.md)
*/
interface NoCycleRule {
/**
* Forbid a module from importing a module with a dependency path back to itself.
*
* @see [no-cycle](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-cycle.md)
*/
'import/no-cycle': NoCycleRuleConfig;
}
/**
* Forbid default exports.
*
* @see [no-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-default-export.md)
*/
type NoDefaultExportRuleConfig = RuleConfig<[]>;
/**
* Forbid default exports.
*
* @see [no-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-default-export.md)
*/
interface NoDefaultExportRule {
/**
* Forbid default exports.
*
* @see [no-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-default-export.md)
*/
'import/no-default-export': NoDefaultExportRuleConfig;
}
/**
* Forbid imported names marked with `@deprecated` documentation tag.
*
* @see [no-deprecated](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-deprecated.md)
*/
type NoDeprecatedRuleConfig$1 = RuleConfig<[]>;
/**
* Forbid imported names marked with `@deprecated` documentation tag.
*
* @see [no-deprecated](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-deprecated.md)
*/
interface NoDeprecatedRule$1 {
/**
* Forbid imported names marked with `@deprecated` documentation tag.
*
* @see [no-deprecated](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-deprecated.md)
*/
'import/no-deprecated': NoDeprecatedRuleConfig$1;
}
/**
* Option.
*/
interface NoDuplicatesOption {
considerQueryString?: boolean;
'prefer-inline'?: boolean;
}
/**
* Options.
*/
type NoDuplicatesOptions = [NoDuplicatesOption?];
/**
* Forbid repeated import of the same module in multiple places.
*
* @see [no-duplicates](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-duplicates.md)
*/
type NoDuplicatesRuleConfig = RuleConfig<NoDuplicatesOptions>;
/**
* Forbid repeated import of the same module in multiple places.
*
* @see [no-duplicates](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-duplicates.md)
*/
interface NoDuplicatesRule {
/**
* Forbid repeated import of the same module in multiple places.
*
* @see [no-duplicates](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-duplicates.md)
*/
'import/no-duplicates': NoDuplicatesRuleConfig;
}
/**
* Option.
*/
interface NoDynamicRequireOption {
esmodule?: boolean;
}
/**
* Options.
*/
type NoDynamicRequireOptions = [NoDynamicRequireOption?];
/**
* Forbid `require()` calls with expressions.
*
* @see [no-dynamic-require](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-dynamic-require.md)
*/
type NoDynamicRequireRuleConfig = RuleConfig<NoDynamicRequireOptions>;
/**
* Forbid `require()` calls with expressions.
*
* @see [no-dynamic-require](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-dynamic-require.md)
*/
interface NoDynamicRequireRule {
/**
* Forbid `require()` calls with expressions.
*
* @see [no-dynamic-require](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-dynamic-require.md)
*/
'import/no-dynamic-require': NoDynamicRequireRuleConfig;
}
/**
* Forbid empty named import blocks.
*
* @see [no-empty-named-blocks](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-empty-named-blocks.md)
*/
type NoEmptyNamedBlocksRuleConfig = RuleConfig<[]>;
/**
* Forbid empty named import blocks.
*
* @see [no-empty-named-blocks](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-empty-named-blocks.md)
*/
interface NoEmptyNamedBlocksRule {
/**
* Forbid empty named import blocks.
*
* @see [no-empty-named-blocks](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-empty-named-blocks.md)
*/
'import/no-empty-named-blocks': NoEmptyNamedBlocksRuleConfig;
}
/**
* Option.
*/
interface NoExtraneousDependenciesOption {
devDependencies?: boolean | any[];
optionalDependencies?: boolean | any[];
peerDependencies?: boolean | any[];
bundledDependencies?: boolean | any[];
packageDir?: string | any[];
includeInternal?: boolean;
includeTypes?: boolean;
}
/**
* Options.
*/
type NoExtraneousDependenciesOptions = [NoExtraneousDependenciesOption?];
/**
* Forbid the use of extraneous packages.
*
* @see [no-extraneous-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-extraneous-dependencies.md)
*/
type NoExtraneousDependenciesRuleConfig =
RuleConfig<NoExtraneousDependenciesOptions>;
/**
* Forbid the use of extraneous packages.
*
* @see [no-extraneous-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-extraneous-dependencies.md)
*/
interface NoExtraneousDependenciesRule {
/**
* Forbid the use of extraneous packages.
*
* @see [no-extraneous-dependencies](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-extraneous-dependencies.md)
*/
'import/no-extraneous-dependencies': NoExtraneousDependenciesRuleConfig;
}
/**
* Option.
*/
interface NoImportModuleExportsOption {
exceptions?: any[];
}
/**
* Options.
*/
type NoImportModuleExportsOptions = [NoImportModuleExportsOption?];
/**
* Forbid import statements with CommonJS module.exports.
*
*/
type NoImportModuleExportsRuleConfig =
RuleConfig<NoImportModuleExportsOptions>;
/**
* Forbid import statements with CommonJS module.exports.
*
*/
interface NoImportModuleExportsRule {
/**
* Forbid import statements with CommonJS module.exports.
*
*/
'import/no-import-module-exports': NoImportModuleExportsRuleConfig;
}
/**
* Option.
*/
type NoInternalModulesOption =
| {
allow?: string[];
}
| {
forbid?: string[];
};
/**
* Options.
*/
type NoInternalModulesOptions = [NoInternalModulesOption?];
/**
* Forbid importing the submodules of other modules.
*
* @see [no-internal-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-internal-modules.md)
*/
type NoInternalModulesRuleConfig = RuleConfig<NoInternalModulesOptions>;
/**
* Forbid importing the submodules of other modules.
*
* @see [no-internal-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-internal-modules.md)
*/
interface NoInternalModulesRule {
/**
* Forbid importing the submodules of other modules.
*
* @see [no-internal-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-internal-modules.md)
*/
'import/no-internal-modules': NoInternalModulesRuleConfig;
}
/**
* Forbid the use of mutable exports with `var` or `let`.
*
* @see [no-mutable-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-mutable-exports.md)
*/
type NoMutableExportsRuleConfig = RuleConfig<[]>;
/**
* Forbid the use of mutable exports with `var` or `let`.
*
* @see [no-mutable-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-mutable-exports.md)
*/
interface NoMutableExportsRule {
/**
* Forbid the use of mutable exports with `var` or `let`.
*
* @see [no-mutable-exports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-mutable-exports.md)
*/
'import/no-mutable-exports': NoMutableExportsRuleConfig;
}
/**
* Forbid use of exported name as identifier of default export.
*
* @see [no-named-as-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default.md)
*/
type NoNamedAsDefaultRuleConfig = RuleConfig<[]>;
/**
* Forbid use of exported name as identifier of default export.
*
* @see [no-named-as-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default.md)
*/
interface NoNamedAsDefaultRule {
/**
* Forbid use of exported name as identifier of default export.
*
* @see [no-named-as-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default.md)
*/
'import/no-named-as-default': NoNamedAsDefaultRuleConfig;
}
/**
* Forbid use of exported name as property of default export.
*
* @see [no-named-as-default-member](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default-member.md)
*/
type NoNamedAsDefaultMemberRuleConfig = RuleConfig<[]>;
/**
* Forbid use of exported name as property of default export.
*
* @see [no-named-as-default-member](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default-member.md)
*/
interface NoNamedAsDefaultMemberRule {
/**
* Forbid use of exported name as property of default export.
*
* @see [no-named-as-default-member](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-as-default-member.md)
*/
'import/no-named-as-default-member': NoNamedAsDefaultMemberRuleConfig;
}
/**
* Forbid named default exports.
*
* @see [no-named-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-default.md)
*/
type NoNamedDefaultRuleConfig = RuleConfig<[]>;
/**
* Forbid named default exports.
*
* @see [no-named-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-default.md)
*/
interface NoNamedDefaultRule {
/**
* Forbid named default exports.
*
* @see [no-named-default](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-default.md)
*/
'import/no-named-default': NoNamedDefaultRuleConfig;
}
/**
* Forbid named exports.
*
* @see [no-named-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-export.md)
*/
type NoNamedExportRuleConfig = RuleConfig<[]>;
/**
* Forbid named exports.
*
* @see [no-named-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-export.md)
*/
interface NoNamedExportRule {
/**
* Forbid named exports.
*
* @see [no-named-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-named-export.md)
*/
'import/no-named-export': NoNamedExportRuleConfig;
}
/**
* Option.
*/
interface NoNamespaceOption$1 {
ignore?: string[];
[k: string]: any;
}
/**
* Options.
*/
type NoNamespaceOptions$1 = [NoNamespaceOption$1?];
/**
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
*
* @see [no-namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-namespace.md)
*/
type NoNamespaceRuleConfig$2 = RuleConfig<NoNamespaceOptions$1>;
/**
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
*
* @see [no-namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-namespace.md)
*/
interface NoNamespaceRule$2 {
/**
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
*
* @see [no-namespace](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-namespace.md)
*/
'import/no-namespace': NoNamespaceRuleConfig$2;
}
/**
* Option.
*/
interface NoNodejsModulesOption {
allow?: string[];
}
/**
* Options.
*/
type NoNodejsModulesOptions = [NoNodejsModulesOption?];
/**
* Forbid Node.js builtin modules.
*
* @see [no-nodejs-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-nodejs-modules.md)
*/
type NoNodejsModulesRuleConfig = RuleConfig<NoNodejsModulesOptions>;
/**
* Forbid Node.js builtin modules.
*
* @see [no-nodejs-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-nodejs-modules.md)
*/
interface NoNodejsModulesRule {
/**
* Forbid Node.js builtin modules.
*
* @see [no-nodejs-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-nodejs-modules.md)
*/
'import/no-nodejs-modules': NoNodejsModulesRuleConfig;
}
/**
* Option.
*/
interface NoRelativePackagesOption {
commonjs?: boolean;
amd?: boolean;
esmodule?: boolean;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
}
/**
* Options.
*/
type NoRelativePackagesOptions = [NoRelativePackagesOption?];
/**
* Forbid importing packages through relative paths.
*
* @see [no-relative-packages](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-packages.md)
*/
type NoRelativePackagesRuleConfig =
RuleConfig<NoRelativePackagesOptions>;
/**
* Forbid importing packages through relative paths.
*
* @see [no-relative-packages](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-packages.md)
*/
interface NoRelativePackagesRule {
/**
* Forbid importing packages through relative paths.
*
* @see [no-relative-packages](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-packages.md)
*/
'import/no-relative-packages': NoRelativePackagesRuleConfig;
}
/**
* Option.
*/
interface NoRelativeParentImportsOption {
commonjs?: boolean;
amd?: boolean;
esmodule?: boolean;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
}
/**
* Options.
*/
type NoRelativeParentImportsOptions = [NoRelativeParentImportsOption?];
/**
* Forbid importing modules from parent directories.
*
* @see [no-relative-parent-imports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-parent-imports.md)
*/
type NoRelativeParentImportsRuleConfig =
RuleConfig<NoRelativeParentImportsOptions>;
/**
* Forbid importing modules from parent directories.
*
* @see [no-relative-parent-imports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-parent-imports.md)
*/
interface NoRelativeParentImportsRule {
/**
* Forbid importing modules from parent directories.
*
* @see [no-relative-parent-imports](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-relative-parent-imports.md)
*/
'import/no-relative-parent-imports': NoRelativeParentImportsRuleConfig;
}
/**
* Option.
*/
interface NoRestrictedPathsOption {
/**
* @minItems 1
*/
zones?: [
{
target?: string | string[];
from?: string | string[];
except?: string[];
message?: string;
},
...{
target?: string | string[];
from?: string | string[];
except?: string[];
message?: string;
}[],
];
basePath?: string;
}
/**
* Options.
*/
type NoRestrictedPathsOptions = [NoRestrictedPathsOption?];
/**
* Enforce which files can be imported in a given folder.
*
* @see [no-restricted-paths](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-restricted-paths.md)
*/
type NoRestrictedPathsRuleConfig = RuleConfig<NoRestrictedPathsOptions>;
/**
* Enforce which files can be imported in a given folder.
*
* @see [no-restricted-paths](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-restricted-paths.md)
*/
interface NoRestrictedPathsRule {
/**
* Enforce which files can be imported in a given folder.
*
* @see [no-restricted-paths](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-restricted-paths.md)
*/
'import/no-restricted-paths': NoRestrictedPathsRuleConfig;
}
/**
* Forbid a module from importing itself.
*
* @see [no-self-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-self-import.md)
*/
type NoSelfImportRuleConfig = RuleConfig<[]>;
/**
* Forbid a module from importing itself.
*
* @see [no-self-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-self-import.md)
*/
interface NoSelfImportRule {
/**
* Forbid a module from importing itself.
*
* @see [no-self-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-self-import.md)
*/
'import/no-self-import': NoSelfImportRuleConfig;
}
/**
* Option.
*/
interface NoUnassignedImportOption {
devDependencies?: boolean | any[];
optionalDependencies?: boolean | any[];
peerDependencies?: boolean | any[];
allow?: string[];
}
/**
* Options.
*/
type NoUnassignedImportOptions = [NoUnassignedImportOption?];
/**
* Forbid unassigned imports.
*
* @see [no-unassigned-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unassigned-import.md)
*/
type NoUnassignedImportRuleConfig =
RuleConfig<NoUnassignedImportOptions>;
/**
* Forbid unassigned imports.
*
* @see [no-unassigned-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unassigned-import.md)
*/
interface NoUnassignedImportRule {
/**
* Forbid unassigned imports.
*
* @see [no-unassigned-import](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unassigned-import.md)
*/
'import/no-unassigned-import': NoUnassignedImportRuleConfig;
}
/**
* Option.
*/
interface NoUnresolvedOption {
commonjs?: boolean;
amd?: boolean;
esmodule?: boolean;
/**
* @minItems 1
*/
ignore?: [string, ...string[]];
caseSensitive?: boolean;
caseSensitiveStrict?: boolean;
}
/**
* Options.
*/
type NoUnresolvedOptions = [NoUnresolvedOption?];
/**
* Ensure imports point to a file/module that can be resolved.
*
* @see [no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unresolved.md)
*/
type NoUnresolvedRuleConfig = RuleConfig<NoUnresolvedOptions>;
/**
* Ensure imports point to a file/module that can be resolved.
*
* @see [no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unresolved.md)
*/
interface NoUnresolvedRule {
/**
* Ensure imports point to a file/module that can be resolved.
*
* @see [no-unresolved](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unresolved.md)
*/
'import/no-unresolved': NoUnresolvedRuleConfig;
}
/**
* Option.
*/
type NoUnusedModulesOption = (
| {
unusedExports: true;
src?: {
[k: string]: any;
};
[k: string]: any;
}
| {
missingExports: true;
[k: string]: any;
}
) & {
/**
* files/paths to be analyzed (only for unused exports)
*/
src?: string[];
/**
* files/paths for which unused exports will not be reported (e.g module entry points)
*/
ignoreExports?: string[];
/**
* report modules without any exports
*/
missingExports?: boolean;
/**
* report exports without any usage
*/
unusedExports?: boolean;
[k: string]: any;
};
/**
* Options.
*/
type NoUnusedModulesOptions = [NoUnusedModulesOption?];
/**
* Forbid modules without exports, or exports without matching import in another module.
*
* @see [no-unused-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unused-modules.md)
*/
type NoUnusedModulesRuleConfig = RuleConfig<NoUnusedModulesOptions>;
/**
* Forbid modules without exports, or exports without matching import in another module.
*
* @see [no-unused-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unused-modules.md)
*/
interface NoUnusedModulesRule {
/**
* Forbid modules without exports, or exports without matching import in another module.
*
* @see [no-unused-modules](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-unused-modules.md)
*/
'import/no-unused-modules': NoUnusedModulesRuleConfig;
}
/**
* Option.
*/
interface NoUselessPathSegmentsOption {
commonjs?: boolean;
noUselessIndex?: boolean;
}
/**
* Options.
*/
type NoUselessPathSegmentsOptions = [NoUselessPathSegmentsOption?];
/**
* Forbid unnecessary path segments in import and require statements.
*
* @see [no-useless-path-segments](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-useless-path-segments.md)
*/
type NoUselessPathSegmentsRuleConfig =
RuleConfig<NoUselessPathSegmentsOptions>;
/**
* Forbid unnecessary path segments in import and require statements.
*
* @see [no-useless-path-segments](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-useless-path-segments.md)
*/
interface NoUselessPathSegmentsRule {
/**
* Forbid unnecessary path segments in import and require statements.
*
* @see [no-useless-path-segments](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-useless-path-segments.md)
*/
'import/no-useless-path-segments': NoUselessPathSegmentsRuleConfig;
}
/**
* Forbid webpack loader syntax in imports.
*
* @see [no-webpack-loader-syntax](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-webpack-loader-syntax.md)
*/
type NoWebpackLoaderSyntaxRuleConfig = RuleConfig<[]>;
/**
* Forbid webpack loader syntax in imports.
*
* @see [no-webpack-loader-syntax](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-webpack-loader-syntax.md)
*/
interface NoWebpackLoaderSyntaxRule {
/**
* Forbid webpack loader syntax in imports.
*
* @see [no-webpack-loader-syntax](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/no-webpack-loader-syntax.md)
*/
'import/no-webpack-loader-syntax': NoWebpackLoaderSyntaxRuleConfig;
}
/**
* Option.
*/
interface OrderOption {
groups?: any[];
pathGroupsExcludedImportTypes?: any[];
distinctGroup?: boolean;
pathGroups?: {
pattern: string;
patternOptions?: {
[k: string]: any;
};
group:
| 'builtin'
| 'external'
| 'internal'
| 'unknown'
| 'parent'
| 'sibling'
| 'index'
| 'object'
| 'type';
position?: 'after' | 'before';
}[];
'newlines-between'?:
| 'ignore'
| 'always'
| 'always-and-inside-groups'
| 'never';
alphabetize?: {
caseInsensitive?: boolean;
order?: 'ignore' | 'asc' | 'desc';
orderImportKind?: 'ignore' | 'asc' | 'desc';
};
warnOnUnassignedImports?: boolean;
}
/**
* Options.
*/
type OrderOptions$1 = [OrderOption?];
/**
* Enforce a convention in module import order.
*
* @see [order](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/order.md)
*/
type OrderRuleConfig = RuleConfig<OrderOptions$1>;
/**
* Enforce a convention in module import order.
*
* @see [order](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/order.md)
*/
interface OrderRule {
/**
* Enforce a convention in module import order.
*
* @see [order](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/order.md)
*/
'import/order': OrderRuleConfig;
}
/**
* Option.
*/
interface PreferDefaultExportOption {
target?: 'single' | 'any';
}
/**
* Options.
*/
type PreferDefaultExportOptions = [PreferDefaultExportOption?];
/**
* Prefer a default export if module exports a single name or multiple names.
*
* @see [prefer-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/prefer-default-export.md)
*/
type PreferDefaultExportRuleConfig =
RuleConfig<PreferDefaultExportOptions>;
/**
* Prefer a default export if module exports a single name or multiple names.
*
* @see [prefer-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/prefer-default-export.md)
*/
interface PreferDefaultExportRule {
/**
* Prefer a default export if module exports a single name or multiple names.
*
* @see [prefer-default-export](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/prefer-default-export.md)
*/
'import/prefer-default-export': PreferDefaultExportRuleConfig;
}
/**
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
*
* @see [unambiguous](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/unambiguous.md)
*/
type UnambiguousRuleConfig = RuleConfig<[]>;
/**
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
*
* @see [unambiguous](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/unambiguous.md)
*/
interface UnambiguousRule {
/**
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
*
* @see [unambiguous](https://github.com/import-js/eslint-plugin-import/blob/v2.28.1/docs/rules/unambiguous.md)
*/
'import/unambiguous': UnambiguousRuleConfig;
}
/**
* All Import rules.
*/
type ImportRules = NoUnresolvedRule &
NamedRule &
DefaultRule &
NamespaceRule &
NoNamespaceRule$2 &
ExportRule &
NoMutableExportsRule &
ExtensionsRule &
NoRestrictedPathsRule &
NoInternalModulesRule &
GroupExportsRule &
NoRelativePackagesRule &
NoRelativeParentImportsRule &
ConsistentTypeSpecifierStyleRule &
NoSelfImportRule &
NoCycleRule &
NoNamedDefaultRule &
NoNamedAsDefaultRule &
NoNamedAsDefaultMemberRule &
NoAnonymousDefaultExportRule &
NoUnusedModulesRule &
NoCommonjsRule &
NoAmdRule &
NoDuplicatesRule &
FirstRule &
MaxDependenciesRule &
NoExtraneousDependenciesRule &
NoAbsolutePathRule &
NoNodejsModulesRule &
NoWebpackLoaderSyntaxRule &
OrderRule &
NewlineAfterImportRule &
PreferDefaultExportRule &
NoDefaultExportRule &
NoNamedExportRule &
NoDynamicRequireRule &
UnambiguousRule &
NoUnassignedImportRule &
NoUselessPathSegmentsRule &
DynamicImportChunknameRule &
NoImportModuleExportsRule &
NoEmptyNamedBlocksRule &
ExportsLastRule &
NoDeprecatedRule$1 &
ImportsFirstRule;
/**
* Checks that `@access` tags have a valid value.
*
* @see [check-access](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header)
*/
type CheckAccessRuleConfig = RuleConfig<[]>;
/**
* Checks that `@access` tags have a valid value.
*
* @see [check-access](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header)
*/
interface CheckAccessRule {
/**
* Checks that `@access` tags have a valid value.
*
* @see [check-access](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header)
*/
'jsdoc/check-access': CheckAccessRuleConfig;
}
/**
* Reports invalid alignment of JSDoc block asterisks.
*
* @see [check-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header)
*/
type CheckAlignmentRuleConfig = RuleConfig<[]>;
/**
* Reports invalid alignment of JSDoc block asterisks.
*
* @see [check-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header)
*/
interface CheckAlignmentRule {
/**
* Reports invalid alignment of JSDoc block asterisks.
*
* @see [check-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-alignment.md#repos-sticky-header)
*/
'jsdoc/check-alignment': CheckAlignmentRuleConfig;
}
/**
* Option.
*/
interface CheckExamplesOption {
allowInlineConfig?: boolean;
baseConfig?: {
[k: string]: any;
};
captionRequired?: boolean;
checkDefaults?: boolean;
checkEslintrc?: boolean;
checkParams?: boolean;
checkProperties?: boolean;
configFile?: string;
exampleCodeRegex?: string;
matchingFileName?: string;
matchingFileNameDefaults?: string;
matchingFileNameParams?: string;
matchingFileNameProperties?: string;
noDefaultExampleRules?: boolean;
paddedIndent?: number;
rejectExampleCodeRegex?: string;
reportUnusedDisableDirectives?: boolean;
}
/**
* Options.
*/
type CheckExamplesOptions = [CheckExamplesOption?];
/**
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
*
* @see [check-examples](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header)
*/
type CheckExamplesRuleConfig = RuleConfig<CheckExamplesOptions>;
/**
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
*
* @see [check-examples](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header)
*/
interface CheckExamplesRule {
/**
* Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules.
*
* @see [check-examples](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-examples.md#repos-sticky-header)
*/
'jsdoc/check-examples': CheckExamplesRuleConfig;
}
/**
* Option.
*/
interface CheckIndentationOption {
excludeTags?: string[];
}
/**
* Options.
*/
type CheckIndentationOptions = [CheckIndentationOption?];
/**
* Reports invalid padding inside JSDoc blocks.
*
* @see [check-indentation](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header)
*/
type CheckIndentationRuleConfig = RuleConfig<CheckIndentationOptions>;
/**
* Reports invalid padding inside JSDoc blocks.
*
* @see [check-indentation](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header)
*/
interface CheckIndentationRule {
/**
* Reports invalid padding inside JSDoc blocks.
*
* @see [check-indentation](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header)
*/
'jsdoc/check-indentation': CheckIndentationRuleConfig;
}
/**
* Config.
*/
interface CheckLineAlignmentConfig {
customSpacings?: {
postDelimiter?: number;
postHyphen?: number;
postName?: number;
postTag?: number;
postType?: number;
};
preserveMainDescriptionPostDelimiter?: boolean;
tags?: string[];
wrapIndent?: string;
}
/**
* Option.
*/
type CheckLineAlignmentOption = 'always' | 'never' | 'any';
/**
* Options.
*/
type CheckLineAlignmentOptions = [
CheckLineAlignmentOption?,
CheckLineAlignmentConfig?,
];
/**
* Reports invalid alignment of JSDoc block lines.
*
* @see [check-line-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header)
*/
type CheckLineAlignmentRuleConfig =
RuleConfig<CheckLineAlignmentOptions>;
/**
* Reports invalid alignment of JSDoc block lines.
*
* @see [check-line-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header)
*/
interface CheckLineAlignmentRule {
/**
* Reports invalid alignment of JSDoc block lines.
*
* @see [check-line-alignment](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-line-alignment.md#repos-sticky-header)
*/
'jsdoc/check-line-alignment': CheckLineAlignmentRuleConfig;
}
/**
* Option.
*/
interface CheckParamNamesOption {
allowExtraTrailingParamDocs?: boolean;
checkDestructured?: boolean;
checkRestProperty?: boolean;
checkTypesPattern?: string;
disableExtraPropertyReporting?: boolean;
enableFixer?: boolean;
useDefaultObjectProperties?: boolean;
}
/**
* Options.
*/
type CheckParamNamesOptions = [CheckParamNamesOption?];
/**
* Ensures that parameter names in JSDoc match those in the function declaration.
*
* @see [check-param-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header)
*/
type CheckParamNamesRuleConfig = RuleConfig<CheckParamNamesOptions>;
/**
* Ensures that parameter names in JSDoc match those in the function declaration.
*
* @see [check-param-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header)
*/
interface CheckParamNamesRule {
/**
* Ensures that parameter names in JSDoc match those in the function declaration.
*
* @see [check-param-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-param-names.md#repos-sticky-header)
*/
'jsdoc/check-param-names': CheckParamNamesRuleConfig;
}
/**
* Option.
*/
interface CheckPropertyNamesOption {
enableFixer?: boolean;
}
/**
* Options.
*/
type CheckPropertyNamesOptions = [CheckPropertyNamesOption?];
/**
* Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.
*
* @see [check-property-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md#repos-sticky-header)
*/
type CheckPropertyNamesRuleConfig =
RuleConfig<CheckPropertyNamesOptions>;
/**
* Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.
*
* @see [check-property-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md#repos-sticky-header)
*/
interface CheckPropertyNamesRule {
/**
* Ensures that property names in JSDoc are not duplicated on the same block and that nested properties have defined roots.
*
* @see [check-property-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-property-names.md#repos-sticky-header)
*/
'jsdoc/check-property-names': CheckPropertyNamesRuleConfig;
}
/**
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
*
* @see [check-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header)
*/
type CheckSyntaxRuleConfig = RuleConfig<[]>;
/**
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
*
* @see [check-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header)
*/
interface CheckSyntaxRule {
/**
* Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
*
* @see [check-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-syntax.md#repos-sticky-header)
*/
'jsdoc/check-syntax': CheckSyntaxRuleConfig;
}
/**
* Option.
*/
interface CheckTagNamesOption {
definedTags?: string[];
enableFixer?: boolean;
jsxTags?: boolean;
typed?: boolean;
}
/**
* Options.
*/
type CheckTagNamesOptions = [CheckTagNamesOption?];
/**
* Reports invalid block tag names.
*
* @see [check-tag-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header)
*/
type CheckTagNamesRuleConfig = RuleConfig<CheckTagNamesOptions>;
/**
* Reports invalid block tag names.
*
* @see [check-tag-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header)
*/
interface CheckTagNamesRule {
/**
* Reports invalid block tag names.
*
* @see [check-tag-names](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#repos-sticky-header)
*/
'jsdoc/check-tag-names': CheckTagNamesRuleConfig;
}
/**
* Option.
*/
interface CheckTypesOption {
exemptTagContexts?: {
tag?: string;
types?: boolean | string[];
}[];
noDefaults?: boolean;
unifyParentAndChildTypeChecks?: boolean;
}
/**
* Options.
*/
type CheckTypesOptions = [CheckTypesOption?];
/**
* Reports invalid types.
*
* @see [check-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header)
*/
type CheckTypesRuleConfig = RuleConfig<CheckTypesOptions>;
/**
* Reports invalid types.
*
* @see [check-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header)
*/
interface CheckTypesRule {
/**
* Reports invalid types.
*
* @see [check-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-types.md#repos-sticky-header)
*/
'jsdoc/check-types': CheckTypesRuleConfig;
}
/**
* Option.
*/
interface CheckValuesOption {
allowedAuthors?: string[];
allowedLicenses?: string[] | boolean;
licensePattern?: string;
numericOnlyVariation?: boolean;
}
/**
* Options.
*/
type CheckValuesOptions = [CheckValuesOption?];
/**
* This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`.
*
* @see [check-values](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header)
*/
type CheckValuesRuleConfig = RuleConfig<CheckValuesOptions>;
/**
* This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`.
*
* @see [check-values](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header)
*/
interface CheckValuesRule {
/**
* This rule checks the values for a handful of tags: `@version`, `@since`, `@license` and `@author`.
*
* @see [check-values](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-values.md#repos-sticky-header)
*/
'jsdoc/check-values': CheckValuesRuleConfig;
}
/**
* Option.
*/
interface EmptyTagsOption {
tags?: string[];
}
/**
* Options.
*/
type EmptyTagsOptions = [EmptyTagsOption?];
/**
* Expects specific tags to be empty of any content.
*
* @see [empty-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header)
*/
type EmptyTagsRuleConfig = RuleConfig<EmptyTagsOptions>;
/**
* Expects specific tags to be empty of any content.
*
* @see [empty-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header)
*/
interface EmptyTagsRule {
/**
* Expects specific tags to be empty of any content.
*
* @see [empty-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header)
*/
'jsdoc/empty-tags': EmptyTagsRuleConfig;
}
/**
* Option.
*/
interface ImplementsOnClassesOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
}
/**
* Options.
*/
type ImplementsOnClassesOptions = [ImplementsOnClassesOption?];
/**
* Reports an issue with any non-constructor function using `@implements`.
*
* @see [implements-on-classes](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header)
*/
type ImplementsOnClassesRuleConfig =
RuleConfig<ImplementsOnClassesOptions>;
/**
* Reports an issue with any non-constructor function using `@implements`.
*
* @see [implements-on-classes](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header)
*/
interface ImplementsOnClassesRule {
/**
* Reports an issue with any non-constructor function using `@implements`.
*
* @see [implements-on-classes](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header)
*/
'jsdoc/implements-on-classes': ImplementsOnClassesRuleConfig;
}
/**
* Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`.
*
* @see [imports-as-dependencies](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header)
*/
type ImportsAsDependenciesRuleConfig = RuleConfig<[]>;
/**
* Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`.
*
* @see [imports-as-dependencies](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header)
*/
interface ImportsAsDependenciesRule {
/**
* Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`.
*
* @see [imports-as-dependencies](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/imports-as-dependencies.md#repos-sticky-header)
*/
'jsdoc/imports-as-dependencies': ImportsAsDependenciesRuleConfig;
}
/**
* Option.
*/
interface InformativeDocsOption {
aliases?: {
/**
*/
[k: string]: string[];
};
excludedTags?: string[];
uselessWords?: string[];
}
/**
* Options.
*/
type InformativeDocsOptions = [InformativeDocsOption?];
/**
* This rule reports doc comments that only restate their attached name.
*
* @see [informative-docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header)
*/
type InformativeDocsRuleConfig = RuleConfig<InformativeDocsOptions>;
/**
* This rule reports doc comments that only restate their attached name.
*
* @see [informative-docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header)
*/
interface InformativeDocsRule {
/**
* This rule reports doc comments that only restate their attached name.
*
* @see [informative-docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header)
*/
'jsdoc/informative-docs': InformativeDocsRuleConfig;
}
/**
* Option.
*/
interface MatchDescriptionOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
mainDescription?:
| string
| boolean
| {
match?: string | boolean;
message?: string;
};
matchDescription?: string;
message?: string;
nonemptyTags?: boolean;
tags?: {
/**
*/
[k: string]:
| string
| true
| {
match?: string | true;
message?: string;
};
};
}
/**
* Options.
*/
type MatchDescriptionOptions = [MatchDescriptionOption?];
/**
* Enforces a regular expression pattern on descriptions.
*
* @see [match-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header)
*/
type MatchDescriptionRuleConfig = RuleConfig<MatchDescriptionOptions>;
/**
* Enforces a regular expression pattern on descriptions.
*
* @see [match-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header)
*/
interface MatchDescriptionRule {
/**
* Enforces a regular expression pattern on descriptions.
*
* @see [match-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header)
*/
'jsdoc/match-description': MatchDescriptionRuleConfig;
}
/**
* Option.
*/
interface MatchNameOption {
match: {
allowName?: string;
comment?: string;
context?: string;
disallowName?: string;
message?: string;
tags?: string[];
[k: string]: any;
}[];
}
/**
* Options.
*/
type MatchNameOptions = [MatchNameOption?];
/**
* Reports the name portion of a JSDoc tag if matching or not matching a given regular expression.
*
* @see [match-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-name.md#repos-sticky-header)
*/
type MatchNameRuleConfig = RuleConfig<MatchNameOptions>;
/**
* Reports the name portion of a JSDoc tag if matching or not matching a given regular expression.
*
* @see [match-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-name.md#repos-sticky-header)
*/
interface MatchNameRule {
/**
* Reports the name portion of a JSDoc tag if matching or not matching a given regular expression.
*
* @see [match-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-name.md#repos-sticky-header)
*/
'jsdoc/match-name': MatchNameRuleConfig;
}
/**
* Option.
*/
interface MultilineBlocksOption {
allowMultipleTags?: boolean;
minimumLengthForMultiline?: number;
multilineTags?: '*' | string[];
noFinalLineText?: boolean;
noMultilineBlocks?: boolean;
noSingleLineBlocks?: boolean;
noZeroLineText?: boolean;
singleLineTags?: string[];
}
/**
* Options.
*/
type MultilineBlocksOptions = [MultilineBlocksOption?];
/**
* Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks.
*
* @see [multiline-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header)
*/
type MultilineBlocksRuleConfig = RuleConfig<MultilineBlocksOptions>;
/**
* Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks.
*
* @see [multiline-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header)
*/
interface MultilineBlocksRule {
/**
* Controls how and whether jsdoc blocks can be expressed as single or multiple line blocks.
*
* @see [multiline-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/multiline-blocks.md#repos-sticky-header)
*/
'jsdoc/multiline-blocks': MultilineBlocksRuleConfig;
}
/**
* Option.
*/
interface NoBadBlocksOption {
ignore?: string[];
preventAllMultiAsteriskBlocks?: boolean;
}
/**
* Options.
*/
type NoBadBlocksOptions = [NoBadBlocksOption?];
/**
* This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.
*
* @see [no-bad-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header)
*/
type NoBadBlocksRuleConfig = RuleConfig<NoBadBlocksOptions>;
/**
* This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.
*
* @see [no-bad-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header)
*/
interface NoBadBlocksRule {
/**
* This rule checks for multi-line-style comments which fail to meet the criteria of a jsdoc block.
*
* @see [no-bad-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-bad-blocks.md#repos-sticky-header)
*/
'jsdoc/no-bad-blocks': NoBadBlocksRuleConfig;
}
/**
* Detects and removes extra lines of a blank block description.
*
* @see [no-blank-block-descriptions](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header)
*/
type NoBlankBlockDescriptionsRuleConfig = RuleConfig<[]>;
/**
* Detects and removes extra lines of a blank block description.
*
* @see [no-blank-block-descriptions](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header)
*/
interface NoBlankBlockDescriptionsRule {
/**
* Detects and removes extra lines of a blank block description.
*
* @see [no-blank-block-descriptions](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-block-descriptions.md#repos-sticky-header)
*/
'jsdoc/no-blank-block-descriptions': NoBlankBlockDescriptionsRuleConfig;
}
/**
* Option.
*/
interface NoBlankBlocksOption {
enableFixer?: boolean;
}
/**
* Options.
*/
type NoBlankBlocksOptions = [NoBlankBlocksOption?];
/**
* Removes empty blocks with nothing but possibly line breaks.
*
* @see [no-blank-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md#repos-sticky-header)
*/
type NoBlankBlocksRuleConfig = RuleConfig<NoBlankBlocksOptions>;
/**
* Removes empty blocks with nothing but possibly line breaks.
*
* @see [no-blank-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md#repos-sticky-header)
*/
interface NoBlankBlocksRule {
/**
* Removes empty blocks with nothing but possibly line breaks.
*
* @see [no-blank-blocks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-blank-blocks.md#repos-sticky-header)
*/
'jsdoc/no-blank-blocks': NoBlankBlocksRuleConfig;
}
/**
* Option.
*/
interface NoDefaultsOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
noOptionalParamNames?: boolean;
}
/**
* Options.
*/
type NoDefaultsOptions = [NoDefaultsOption?];
/**
* This rule reports defaults being used on the relevant portion of `@param` or `@default`.
*
* @see [no-defaults](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-defaults.md#repos-sticky-header)
*/
type NoDefaultsRuleConfig = RuleConfig<NoDefaultsOptions>;
/**
* This rule reports defaults being used on the relevant portion of `@param` or `@default`.
*
* @see [no-defaults](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-defaults.md#repos-sticky-header)
*/
interface NoDefaultsRule {
/**
* This rule reports defaults being used on the relevant portion of `@param` or `@default`.
*
* @see [no-defaults](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-defaults.md#repos-sticky-header)
*/
'jsdoc/no-defaults': NoDefaultsRuleConfig;
}
/**
* Option.
*/
interface NoMissingSyntaxOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
message?: string;
minimum?: number;
}
)[];
}
/**
* Options.
*/
type NoMissingSyntaxOptions = [NoMissingSyntaxOption?];
/**
* Reports when certain comment structures are always expected.
*
* @see [no-missing-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header)
*/
type NoMissingSyntaxRuleConfig = RuleConfig<NoMissingSyntaxOptions>;
/**
* Reports when certain comment structures are always expected.
*
* @see [no-missing-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header)
*/
interface NoMissingSyntaxRule {
/**
* Reports when certain comment structures are always expected.
*
* @see [no-missing-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-missing-syntax.md#repos-sticky-header)
*/
'jsdoc/no-missing-syntax': NoMissingSyntaxRuleConfig;
}
/**
* Option.
*/
interface NoMultiAsterisksOption {
allowWhitespace?: boolean;
preventAtEnd?: boolean;
preventAtMiddleLines?: boolean;
}
/**
* Options.
*/
type NoMultiAsterisksOptions = [NoMultiAsterisksOption?];
/**
*
* @see [no-multi-asterisks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md#repos-sticky-header)
*/
type NoMultiAsterisksRuleConfig = RuleConfig<NoMultiAsterisksOptions>;
/**
*
* @see [no-multi-asterisks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md#repos-sticky-header)
*/
interface NoMultiAsterisksRule {
/**
*
* @see [no-multi-asterisks](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md#repos-sticky-header)
*/
'jsdoc/no-multi-asterisks': NoMultiAsterisksRuleConfig;
}
/**
* Option.
*/
interface NoRestrictedSyntaxOption$1 {
contexts: (
| string
| {
comment?: string;
context?: string;
message?: string;
}
)[];
}
/**
* Options.
*/
type NoRestrictedSyntaxOptions$1 = [NoRestrictedSyntaxOption$1?];
/**
* Reports when certain comment structures are present.
*
* @see [no-restricted-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header)
*/
type NoRestrictedSyntaxRuleConfig$1 =
RuleConfig<NoRestrictedSyntaxOptions$1>;
/**
* Reports when certain comment structures are present.
*
* @see [no-restricted-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header)
*/
interface NoRestrictedSyntaxRule$1 {
/**
* Reports when certain comment structures are present.
*
* @see [no-restricted-syntax](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-restricted-syntax.md#repos-sticky-header)
*/
'jsdoc/no-restricted-syntax': NoRestrictedSyntaxRuleConfig$1;
}
/**
* Option.
*/
interface NoTypesOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
}
/**
* Options.
*/
type NoTypesOptions = [NoTypesOption?];
/**
* This rule reports types being used on `@param` or `@returns`.
*
* @see [no-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header)
*/
type NoTypesRuleConfig = RuleConfig<NoTypesOptions>;
/**
* This rule reports types being used on `@param` or `@returns`.
*
* @see [no-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header)
*/
interface NoTypesRule {
/**
* This rule reports types being used on `@param` or `@returns`.
*
* @see [no-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-types.md#repos-sticky-header)
*/
'jsdoc/no-types': NoTypesRuleConfig;
}
/**
* Option.
*/
interface NoUndefinedTypesOption {
definedTypes?: string[];
disableReporting?: boolean;
markVariablesAsUsed?: boolean;
}
/**
* Options.
*/
type NoUndefinedTypesOptions = [NoUndefinedTypesOption?];
/**
* Checks that types in jsdoc comments are defined.
*
* @see [no-undefined-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header)
*/
type NoUndefinedTypesRuleConfig = RuleConfig<NoUndefinedTypesOptions>;
/**
* Checks that types in jsdoc comments are defined.
*
* @see [no-undefined-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header)
*/
interface NoUndefinedTypesRule {
/**
* Checks that types in jsdoc comments are defined.
*
* @see [no-undefined-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header)
*/
'jsdoc/no-undefined-types': NoUndefinedTypesRuleConfig;
}
/**
* Config.
*/
interface RequireAsteriskPrefixConfig {
tags?: {
always?: string[];
any?: string[];
never?: string[];
[k: string]: any;
};
}
/**
* Option.
*/
type RequireAsteriskPrefixOption = 'always' | 'never' | 'any';
/**
* Options.
*/
type RequireAsteriskPrefixOptions = [
RequireAsteriskPrefixOption?,
RequireAsteriskPrefixConfig?,
];
/**
* Requires that each JSDoc line starts with an `*`.
*
* @see [require-asterisk-prefix](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header)
*/
type RequireAsteriskPrefixRuleConfig =
RuleConfig<RequireAsteriskPrefixOptions>;
/**
* Requires that each JSDoc line starts with an `*`.
*
* @see [require-asterisk-prefix](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header)
*/
interface RequireAsteriskPrefixRule {
/**
* Requires that each JSDoc line starts with an `*`.
*
* @see [require-asterisk-prefix](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-asterisk-prefix.md#repos-sticky-header)
*/
'jsdoc/require-asterisk-prefix': RequireAsteriskPrefixRuleConfig;
}
/**
* Option.
*/
interface RequireDescriptionOption {
checkConstructors?: boolean;
checkGetters?: boolean;
checkSetters?: boolean;
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
descriptionStyle?: 'body' | 'tag' | 'any';
exemptedBy?: string[];
}
/**
* Options.
*/
type RequireDescriptionOptions = [RequireDescriptionOption?];
/**
* Requires that all functions have a description.
*
* @see [require-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header)
*/
type RequireDescriptionRuleConfig =
RuleConfig<RequireDescriptionOptions>;
/**
* Requires that all functions have a description.
*
* @see [require-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header)
*/
interface RequireDescriptionRule {
/**
* Requires that all functions have a description.
*
* @see [require-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description.md#repos-sticky-header)
*/
'jsdoc/require-description': RequireDescriptionRuleConfig;
}
/**
* Option.
*/
interface RequireDescriptionCompleteSentenceOption {
abbreviations?: string[];
newlineBeforeCapsAssumesBadSentenceEnd?: boolean;
tags?: string[];
}
/**
* Options.
*/
type RequireDescriptionCompleteSentenceOptions = [
RequireDescriptionCompleteSentenceOption?,
];
/**
* Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.
*
* @see [require-description-complete-sentence](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header)
*/
type RequireDescriptionCompleteSentenceRuleConfig =
RuleConfig<RequireDescriptionCompleteSentenceOptions>;
/**
* Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.
*
* @see [require-description-complete-sentence](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header)
*/
interface RequireDescriptionCompleteSentenceRule {
/**
* Requires that block description, explicit `@description`, and `@param`/`@returns` tag descriptions are written in complete sentences.
*
* @see [require-description-complete-sentence](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-description-complete-sentence.md#repos-sticky-header)
*/
'jsdoc/require-description-complete-sentence': RequireDescriptionCompleteSentenceRuleConfig;
}
/**
* Option.
*/
interface RequireExampleOption {
checkConstructors?: boolean;
checkGetters?: boolean;
checkSetters?: boolean;
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
enableFixer?: boolean;
exemptedBy?: string[];
exemptNoArguments?: boolean;
}
/**
* Options.
*/
type RequireExampleOptions = [RequireExampleOption?];
/**
* Requires that all functions have examples.
*
* @see [require-example](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header)
*/
type RequireExampleRuleConfig = RuleConfig<RequireExampleOptions>;
/**
* Requires that all functions have examples.
*
* @see [require-example](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header)
*/
interface RequireExampleRule {
/**
* Requires that all functions have examples.
*
* @see [require-example](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-example.md#repos-sticky-header)
*/
'jsdoc/require-example': RequireExampleRuleConfig;
}
/**
* Option.
*/
interface RequireFileOverviewOption {
tags?: {
/**
*/
[k: string]: {
initialCommentsOnly?: boolean;
mustExist?: boolean;
preventDuplicates?: boolean;
};
};
}
/**
* Options.
*/
type RequireFileOverviewOptions = [RequireFileOverviewOption?];
/**
* Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.
*
* @see [require-file-overview](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-file-overview.md#repos-sticky-header)
*/
type RequireFileOverviewRuleConfig =
RuleConfig<RequireFileOverviewOptions>;
/**
* Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.
*
* @see [require-file-overview](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-file-overview.md#repos-sticky-header)
*/
interface RequireFileOverviewRule {
/**
* Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.
*
* @see [require-file-overview](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-file-overview.md#repos-sticky-header)
*/
'jsdoc/require-file-overview': RequireFileOverviewRuleConfig;
}
/**
* Config.
*/
interface RequireHyphenBeforeParamDescriptionConfig {
tags?:
| {
/**
*/
[k: string]: 'always' | 'never';
}
| 'any';
}
/**
* Option.
*/
type RequireHyphenBeforeParamDescriptionOption = 'always' | 'never';
/**
* Options.
*/
type RequireHyphenBeforeParamDescriptionOptions = [
RequireHyphenBeforeParamDescriptionOption?,
RequireHyphenBeforeParamDescriptionConfig?,
];
/**
* Requires a hyphen before the `@param` description.
*
* @see [require-hyphen-before-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header)
*/
type RequireHyphenBeforeParamDescriptionRuleConfig =
RuleConfig<RequireHyphenBeforeParamDescriptionOptions>;
/**
* Requires a hyphen before the `@param` description.
*
* @see [require-hyphen-before-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header)
*/
interface RequireHyphenBeforeParamDescriptionRule {
/**
* Requires a hyphen before the `@param` description.
*
* @see [require-hyphen-before-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-hyphen-before-param-description.md#repos-sticky-header)
*/
'jsdoc/require-hyphen-before-param-description': RequireHyphenBeforeParamDescriptionRuleConfig;
}
/**
* Option.
*/
interface RequireJsdocOption {
checkConstructors?: boolean;
checkGetters?: boolean | 'no-setter';
checkSetters?: boolean | 'no-getter';
contexts?: (
| string
| {
context?: string;
inlineCommentBlock?: boolean;
minLineCount?: number;
}
)[];
enableFixer?: boolean;
exemptEmptyConstructors?: boolean;
exemptEmptyFunctions?: boolean;
fixerMessage?: string;
minLineCount?: number;
publicOnly?:
| boolean
| {
ancestorsOnly?: boolean;
cjs?: boolean;
esm?: boolean;
window?: boolean;
};
require?: {
ArrowFunctionExpression?: boolean;
ClassDeclaration?: boolean;
ClassExpression?: boolean;
FunctionDeclaration?: boolean;
FunctionExpression?: boolean;
MethodDefinition?: boolean;
};
}
/**
* Options.
*/
type RequireJsdocOptions = [RequireJsdocOption?];
/**
* Require JSDoc comments.
*
* @see [require-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header)
*/
type RequireJsdocRuleConfig = RuleConfig<RequireJsdocOptions>;
/**
* Require JSDoc comments.
*
* @see [require-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header)
*/
interface RequireJsdocRule {
/**
* Require JSDoc comments.
*
* @see [require-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-jsdoc.md#repos-sticky-header)
*/
'jsdoc/require-jsdoc': RequireJsdocRuleConfig;
}
/**
* Option.
*/
interface RequireParamOption {
autoIncrementBase?: number;
checkConstructors?: boolean;
checkDestructured?: boolean;
checkDestructuredRoots?: boolean;
checkGetters?: boolean;
checkRestProperty?: boolean;
checkSetters?: boolean;
checkTypesPattern?: string;
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
enableFixer?: boolean;
enableRestElementFixer?: boolean;
enableRootFixer?: boolean;
exemptedBy?: string[];
unnamedRootBase?: string[];
useDefaultObjectProperties?: boolean;
}
/**
* Options.
*/
type RequireParamOptions = [RequireParamOption?];
/**
* Requires that all function parameters are documented.
*
* @see [require-param](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header)
*/
type RequireParamRuleConfig = RuleConfig<RequireParamOptions>;
/**
* Requires that all function parameters are documented.
*
* @see [require-param](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header)
*/
interface RequireParamRule {
/**
* Requires that all function parameters are documented.
*
* @see [require-param](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param.md#repos-sticky-header)
*/
'jsdoc/require-param': RequireParamRuleConfig;
}
/**
* Option.
*/
interface RequireParamDescriptionOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
defaultDestructuredRootDescription?: string;
setDefaultDestructuredRootDescription?: boolean;
}
/**
* Options.
*/
type RequireParamDescriptionOptions = [RequireParamDescriptionOption?];
/**
* Requires that each `@param` tag has a `description` value.
*
* @see [require-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header)
*/
type RequireParamDescriptionRuleConfig =
RuleConfig<RequireParamDescriptionOptions>;
/**
* Requires that each `@param` tag has a `description` value.
*
* @see [require-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header)
*/
interface RequireParamDescriptionRule {
/**
* Requires that each `@param` tag has a `description` value.
*
* @see [require-param-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-description.md#repos-sticky-header)
*/
'jsdoc/require-param-description': RequireParamDescriptionRuleConfig;
}
/**
* Option.
*/
interface RequireParamNameOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
}
/**
* Options.
*/
type RequireParamNameOptions = [RequireParamNameOption?];
/**
* Requires that all function parameters have names.
*
* @see [require-param-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header)
*/
type RequireParamNameRuleConfig = RuleConfig<RequireParamNameOptions>;
/**
* Requires that all function parameters have names.
*
* @see [require-param-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header)
*/
interface RequireParamNameRule {
/**
* Requires that all function parameters have names.
*
* @see [require-param-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-name.md#repos-sticky-header)
*/
'jsdoc/require-param-name': RequireParamNameRuleConfig;
}
/**
* Option.
*/
interface RequireParamTypeOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
defaultDestructuredRootType?: string;
setDefaultDestructuredRootType?: boolean;
}
/**
* Options.
*/
type RequireParamTypeOptions = [RequireParamTypeOption?];
/**
* Requires that each `@param` tag has a `type` value.
*
* @see [require-param-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header)
*/
type RequireParamTypeRuleConfig = RuleConfig<RequireParamTypeOptions>;
/**
* Requires that each `@param` tag has a `type` value.
*
* @see [require-param-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header)
*/
interface RequireParamTypeRule {
/**
* Requires that each `@param` tag has a `type` value.
*
* @see [require-param-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-param-type.md#repos-sticky-header)
*/
'jsdoc/require-param-type': RequireParamTypeRuleConfig;
}
/**
* Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.
*
* @see [require-property](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header)
*/
type RequirePropertyRuleConfig = RuleConfig<[]>;
/**
* Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.
*
* @see [require-property](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header)
*/
interface RequirePropertyRule {
/**
* Requires that all `@typedef` and `@namespace` tags have `@property` when their type is a plain `object`, `Object`, or `PlainObject`.
*
* @see [require-property](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property.md#repos-sticky-header)
*/
'jsdoc/require-property': RequirePropertyRuleConfig;
}
/**
* Requires that each `@property` tag has a `description` value.
*
* @see [require-property-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header)
*/
type RequirePropertyDescriptionRuleConfig = RuleConfig<[]>;
/**
* Requires that each `@property` tag has a `description` value.
*
* @see [require-property-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header)
*/
interface RequirePropertyDescriptionRule {
/**
* Requires that each `@property` tag has a `description` value.
*
* @see [require-property-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-description.md#repos-sticky-header)
*/
'jsdoc/require-property-description': RequirePropertyDescriptionRuleConfig;
}
/**
* Requires that all function `@property` tags have names.
*
* @see [require-property-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header)
*/
type RequirePropertyNameRuleConfig = RuleConfig<[]>;
/**
* Requires that all function `@property` tags have names.
*
* @see [require-property-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header)
*/
interface RequirePropertyNameRule {
/**
* Requires that all function `@property` tags have names.
*
* @see [require-property-name](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-name.md#repos-sticky-header)
*/
'jsdoc/require-property-name': RequirePropertyNameRuleConfig;
}
/**
* Requires that each `@property` tag has a `type` value.
*
* @see [require-property-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header)
*/
type RequirePropertyTypeRuleConfig = RuleConfig<[]>;
/**
* Requires that each `@property` tag has a `type` value.
*
* @see [require-property-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header)
*/
interface RequirePropertyTypeRule {
/**
* Requires that each `@property` tag has a `type` value.
*
* @see [require-property-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header)
*/
'jsdoc/require-property-type': RequirePropertyTypeRuleConfig;
}
/**
* Option.
*/
interface RequireReturnsOption {
checkConstructors?: boolean;
checkGetters?: boolean;
contexts?: (
| string
| {
comment?: string;
context?: string;
forceRequireReturn?: boolean;
}
)[];
enableFixer?: boolean;
exemptedBy?: string[];
forceRequireReturn?: boolean;
forceReturnsWithAsync?: boolean;
publicOnly?:
| boolean
| {
ancestorsOnly?: boolean;
cjs?: boolean;
esm?: boolean;
window?: boolean;
};
}
/**
* Options.
*/
type RequireReturnsOptions = [RequireReturnsOption?];
/**
* Requires that returns are documented.
*
* @see [require-returns](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header)
*/
type RequireReturnsRuleConfig = RuleConfig<RequireReturnsOptions>;
/**
* Requires that returns are documented.
*
* @see [require-returns](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header)
*/
interface RequireReturnsRule {
/**
* Requires that returns are documented.
*
* @see [require-returns](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header)
*/
'jsdoc/require-returns': RequireReturnsRuleConfig;
}
/**
* Option.
*/
interface RequireReturnsCheckOption {
exemptAsync?: boolean;
exemptGenerators?: boolean;
reportMissingReturnForUndefinedTypes?: boolean;
}
/**
* Options.
*/
type RequireReturnsCheckOptions = [RequireReturnsCheckOption?];
/**
* Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment.
*
* @see [require-returns-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header)
*/
type RequireReturnsCheckRuleConfig =
RuleConfig<RequireReturnsCheckOptions>;
/**
* Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment.
*
* @see [require-returns-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header)
*/
interface RequireReturnsCheckRule {
/**
* Requires a return statement in function body if a `@returns` tag is specified in jsdoc comment.
*
* @see [require-returns-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-check.md#repos-sticky-header)
*/
'jsdoc/require-returns-check': RequireReturnsCheckRuleConfig;
}
/**
* Option.
*/
interface RequireReturnsDescriptionOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
}
/**
* Options.
*/
type RequireReturnsDescriptionOptions = [
RequireReturnsDescriptionOption?,
];
/**
* Requires that the `@returns` tag has a `description` value.
*
* @see [require-returns-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header)
*/
type RequireReturnsDescriptionRuleConfig =
RuleConfig<RequireReturnsDescriptionOptions>;
/**
* Requires that the `@returns` tag has a `description` value.
*
* @see [require-returns-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header)
*/
interface RequireReturnsDescriptionRule {
/**
* Requires that the `@returns` tag has a `description` value.
*
* @see [require-returns-description](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-description.md#repos-sticky-header)
*/
'jsdoc/require-returns-description': RequireReturnsDescriptionRuleConfig;
}
/**
* Option.
*/
interface RequireReturnsTypeOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
}
/**
* Options.
*/
type RequireReturnsTypeOptions = [RequireReturnsTypeOption?];
/**
* Requires that `@returns` tag has `type` value.
*
* @see [require-returns-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header)
*/
type RequireReturnsTypeRuleConfig =
RuleConfig<RequireReturnsTypeOptions>;
/**
* Requires that `@returns` tag has `type` value.
*
* @see [require-returns-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header)
*/
interface RequireReturnsTypeRule {
/**
* Requires that `@returns` tag has `type` value.
*
* @see [require-returns-type](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns-type.md#repos-sticky-header)
*/
'jsdoc/require-returns-type': RequireReturnsTypeRuleConfig;
}
/**
* Option.
*/
interface RequireThrowsOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
exemptedBy?: string[];
}
/**
* Options.
*/
type RequireThrowsOptions = [RequireThrowsOption?];
/**
* Requires that throw statements are documented.
*
* @see [require-throws](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header)
*/
type RequireThrowsRuleConfig = RuleConfig<RequireThrowsOptions>;
/**
* Requires that throw statements are documented.
*
* @see [require-throws](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header)
*/
interface RequireThrowsRule {
/**
* Requires that throw statements are documented.
*
* @see [require-throws](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-throws.md#repos-sticky-header)
*/
'jsdoc/require-throws': RequireThrowsRuleConfig;
}
/**
* Option.
*/
interface RequireYieldsOption {
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
exemptedBy?: string[];
forceRequireNext?: boolean;
forceRequireYields?: boolean;
next?: boolean;
nextWithGeneratorTag?: boolean;
withGeneratorTag?: boolean;
}
/**
* Options.
*/
type RequireYieldsOptions = [RequireYieldsOption?];
/**
* Requires yields are documented.
*
* @see [require-yields](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header)
*/
type RequireYieldsRuleConfig = RuleConfig<RequireYieldsOptions>;
/**
* Requires yields are documented.
*
* @see [require-yields](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header)
*/
interface RequireYieldsRule {
/**
* Requires yields are documented.
*
* @see [require-yields](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields.md#repos-sticky-header)
*/
'jsdoc/require-yields': RequireYieldsRuleConfig;
}
/**
* Option.
*/
interface RequireYieldsCheckOption {
checkGeneratorsOnly?: boolean;
contexts?: (
| string
| {
comment?: string;
context?: string;
}
)[];
exemptedBy?: string[];
next?: boolean;
}
/**
* Options.
*/
type RequireYieldsCheckOptions = [RequireYieldsCheckOption?];
/**
* Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment.
*
* @see [require-yields-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header)
*/
type RequireYieldsCheckRuleConfig =
RuleConfig<RequireYieldsCheckOptions>;
/**
* Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment.
*
* @see [require-yields-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header)
*/
interface RequireYieldsCheckRule {
/**
* Requires a yield statement in function body if a `@yields` tag is specified in jsdoc comment.
*
* @see [require-yields-check](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-yields-check.md#repos-sticky-header)
*/
'jsdoc/require-yields-check': RequireYieldsCheckRuleConfig;
}
/**
* Option.
*/
interface SortTagsOption {
alphabetizeExtras?: boolean;
linesBetween?: number;
reportIntraTagGroupSpacing?: boolean;
reportTagGroupSpacing?: boolean;
tagSequence?: {
tags?: string[];
[k: string]: any;
}[];
}
/**
* Options.
*/
type SortTagsOptions = [SortTagsOption?];
/**
* Sorts tags by a specified sequence according to tag name.
*
* @see [sort-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header)
*/
type SortTagsRuleConfig = RuleConfig<SortTagsOptions>;
/**
* Sorts tags by a specified sequence according to tag name.
*
* @see [sort-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header)
*/
interface SortTagsRule {
/**
* Sorts tags by a specified sequence according to tag name.
*
* @see [sort-tags](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/sort-tags.md#repos-sticky-header)
*/
'jsdoc/sort-tags': SortTagsRuleConfig;
}
/**
* Config.
*/
interface TagLinesConfig {
applyToEndTag?: boolean;
count?: number;
endLines?: number | null;
startLines?: number | null;
tags?: {
/**
*/
[k: string]: {
count?: number;
lines?: 'always' | 'never' | 'any';
};
};
}
/**
* Option.
*/
type TagLinesOption = 'always' | 'any' | 'never';
/**
* Options.
*/
type TagLinesOptions = [TagLinesOption?, TagLinesConfig?];
/**
* Enforces lines (or no lines) between tags.
*
* @see [tag-lines](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header)
*/
type TagLinesRuleConfig = RuleConfig<TagLinesOptions>;
/**
* Enforces lines (or no lines) between tags.
*
* @see [tag-lines](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header)
*/
interface TagLinesRule {
/**
* Enforces lines (or no lines) between tags.
*
* @see [tag-lines](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/tag-lines.md#repos-sticky-header)
*/
'jsdoc/tag-lines': TagLinesRuleConfig;
}
/**
* Option.
*/
interface TextEscapingOption {
escapeHTML?: boolean;
escapeMarkdown?: boolean;
}
/**
* Options.
*/
type TextEscapingOptions = [TextEscapingOption?];
/**
*
* @see [text-escaping](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header)
*/
type TextEscapingRuleConfig = RuleConfig<TextEscapingOptions>;
/**
*
* @see [text-escaping](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header)
*/
interface TextEscapingRule {
/**
*
* @see [text-escaping](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header)
*/
'jsdoc/text-escaping': TextEscapingRuleConfig;
}
/**
* Option.
*/
interface ValidTypesOption {
allowEmptyNamepaths?: boolean;
}
/**
* Options.
*/
type ValidTypesOptions = [ValidTypesOption?];
/**
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
*
* @see [valid-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header)
*/
type ValidTypesRuleConfig = RuleConfig<ValidTypesOptions>;
/**
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
*
* @see [valid-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header)
*/
interface ValidTypesRule {
/**
* Requires all types to be valid JSDoc or Closure compiler types without syntax errors.
*
* @see [valid-types](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header)
*/
'jsdoc/valid-types': ValidTypesRuleConfig;
}
/**
* All JSDoc rules.
*/
type JSDocRules = CheckAccessRule &
CheckAlignmentRule &
CheckExamplesRule &
CheckIndentationRule &
CheckLineAlignmentRule &
CheckParamNamesRule &
CheckPropertyNamesRule &
CheckSyntaxRule &
CheckTagNamesRule &
CheckTypesRule &
CheckValuesRule &
EmptyTagsRule &
ImplementsOnClassesRule &
ImportsAsDependenciesRule &
InformativeDocsRule &
MatchDescriptionRule &
MatchNameRule &
MultilineBlocksRule &
NoBadBlocksRule &
NoBlankBlockDescriptionsRule &
NoBlankBlocksRule &
NoDefaultsRule &
NoMissingSyntaxRule &
NoMultiAsterisksRule &
NoRestrictedSyntaxRule$1 &
NoTypesRule &
NoUndefinedTypesRule &
RequireAsteriskPrefixRule &
RequireDescriptionRule &
RequireDescriptionCompleteSentenceRule &
RequireExampleRule &
RequireFileOverviewRule &
RequireHyphenBeforeParamDescriptionRule &
RequireJsdocRule &
RequireParamRule &
RequireParamDescriptionRule &
RequireParamNameRule &
RequireParamTypeRule &
RequirePropertyRule &
RequirePropertyDescriptionRule &
RequirePropertyNameRule &
RequirePropertyTypeRule &
RequireReturnsRule &
RequireReturnsCheckRule &
RequireReturnsDescriptionRule &
RequireReturnsTypeRule &
RequireThrowsRule &
RequireYieldsRule &
RequireYieldsCheckRule &
SortTagsRule &
TagLinesRule &
TextEscapingRule &
ValidTypesRule;
/**
* Option.
*/
type ArrayBracketNewlineOption$1 =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayBracketNewlineOptions$1 = [ArrayBracketNewlineOption$1?];
/**
* Enforce line breaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html)
*/
type ArrayBracketNewlineRuleConfig$1 =
RuleConfig<ArrayBracketNewlineOptions$1>;
/**
* Enforce line breaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html)
*/
interface ArrayBracketNewlineRule$1 {
/**
* Enforce line breaks after opening and before closing array brackets.
*
* @see [array-bracket-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html)
*/
'jsonc/array-bracket-newline': ArrayBracketNewlineRuleConfig$1;
}
/**
* Config.
*/
interface ArrayBracketSpacingConfig$1 {
singleValue?: boolean;
objectsInArrays?: boolean;
arraysInArrays?: boolean;
}
/**
* Option.
*/
type ArrayBracketSpacingOption$1 = 'always' | 'never';
/**
* Options.
*/
type ArrayBracketSpacingOptions$1 = [
ArrayBracketSpacingOption$1?,
ArrayBracketSpacingConfig$1?,
];
/**
* Disallow or enforce spaces inside of brackets.
*
* @see [array-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html)
*/
type ArrayBracketSpacingRuleConfig$1 =
RuleConfig<ArrayBracketSpacingOptions$1>;
/**
* Disallow or enforce spaces inside of brackets.
*
* @see [array-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html)
*/
interface ArrayBracketSpacingRule$1 {
/**
* Disallow or enforce spaces inside of brackets.
*
* @see [array-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html)
*/
'jsonc/array-bracket-spacing': ArrayBracketSpacingRuleConfig$1;
}
/**
* Option.
*/
type ArrayElementNewlineOption$1 =
| []
| [
| BasicConfig$2
| {
ArrayExpression?: BasicConfig$2;
ArrayPattern?: BasicConfig$2;
},
];
type BasicConfig$2 =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayElementNewlineOptions$1 = ArrayElementNewlineOption$1;
/**
* Enforce line breaks between array elements.
*
* @see [array-element-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html)
*/
type ArrayElementNewlineRuleConfig$1 =
RuleConfig<ArrayElementNewlineOptions$1>;
/**
* Enforce line breaks between array elements.
*
* @see [array-element-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html)
*/
interface ArrayElementNewlineRule$1 {
/**
* Enforce line breaks between array elements.
*
* @see [array-element-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html)
*/
'jsonc/array-element-newline': ArrayElementNewlineRuleConfig$1;
}
/**
* Apply jsonc rules similar to your configured ESLint core rules.
*
* @see [auto](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html)
*/
type AutoRuleConfig = RuleConfig<[]>;
/**
* Apply jsonc rules similar to your configured ESLint core rules.
*
* @see [auto](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html)
*/
interface AutoRule {
/**
* Apply jsonc rules similar to your configured ESLint core rules.
*
* @see [auto](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html)
*/
'jsonc/auto': AutoRuleConfig;
}
/**
* Option.
*/
type CommaDangleOption$2 =
| []
| [
| Value$2
| {
arrays?: ValueWithIgnore$2;
objects?: ValueWithIgnore$2;
imports?: ValueWithIgnore$2;
exports?: ValueWithIgnore$2;
functions?: ValueWithIgnore$2;
},
];
type Value$2 = 'always-multiline' | 'always' | 'never' | 'only-multiline';
type ValueWithIgnore$2 =
| 'always-multiline'
| 'always'
| 'ignore'
| 'never'
| 'only-multiline';
/**
* Options.
*/
type CommaDangleOptions$2 = CommaDangleOption$2;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html)
*/
type CommaDangleRuleConfig$2 = RuleConfig<CommaDangleOptions$2>;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html)
*/
interface CommaDangleRule$2 {
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html)
*/
'jsonc/comma-dangle': CommaDangleRuleConfig$2;
}
/**
* Config.
*/
interface CommaStyleConfig$1 {
exceptions?: {
[k: string]: boolean;
};
}
/**
* Option.
*/
type CommaStyleOption$1 = 'first' | 'last';
/**
* Options.
*/
type CommaStyleOptions$1 = [CommaStyleOption$1?, CommaStyleConfig$1?];
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html)
*/
type CommaStyleRuleConfig$1 = RuleConfig<CommaStyleOptions$1>;
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html)
*/
interface CommaStyleRule$1 {
/**
* Enforce consistent comma style.
*
* @see [comma-style](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html)
*/
'jsonc/comma-style': CommaStyleRuleConfig$1;
}
/**
* Config.
*/
interface IndentConfig$2 {
SwitchCase?: number;
VariableDeclarator?:
| (number | ('first' | 'off'))
| {
var?: number | ('first' | 'off');
let?: number | ('first' | 'off');
const?: number | ('first' | 'off');
};
outerIIFEBody?: number | 'off';
MemberExpression?: number | 'off';
FunctionDeclaration?: {
parameters?: number | ('first' | 'off');
body?: number;
};
FunctionExpression?: {
parameters?: number | ('first' | 'off');
body?: number;
};
StaticBlock?: {
body?: number;
};
CallExpression?: {
arguments?: number | ('first' | 'off');
};
ArrayExpression?: number | ('first' | 'off');
ObjectExpression?: number | ('first' | 'off');
ImportDeclaration?: number | ('first' | 'off');
flatTernaryExpressions?: boolean;
offsetTernaryExpressions?: boolean;
ignoredNodes?: string[];
ignoreComments?: boolean;
}
/**
* Option.
*/
type IndentOption$2 = 'tab' | number;
/**
* Options.
*/
type IndentOptions$2 = [IndentOption$2?, IndentConfig$2?];
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html)
*/
type IndentRuleConfig$2 = RuleConfig<IndentOptions$2>;
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html)
*/
interface IndentRule$2 {
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html)
*/
'jsonc/indent': IndentRuleConfig$2;
}
/**
* Option.
*/
interface KeyNameCasingOption$1 {
camelCase?: boolean;
PascalCase?: boolean;
SCREAMING_SNAKE_CASE?: boolean;
'kebab-case'?: boolean;
snake_case?: boolean;
ignores?: string[];
}
/**
* Options.
*/
type KeyNameCasingOptions$1 = [KeyNameCasingOption$1?];
/**
* Enforce naming convention to property key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html)
*/
type KeyNameCasingRuleConfig$1 = RuleConfig<KeyNameCasingOptions$1>;
/**
* Enforce naming convention to property key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html)
*/
interface KeyNameCasingRule$1 {
/**
* Enforce naming convention to property key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html)
*/
'jsonc/key-name-casing': KeyNameCasingRuleConfig$1;
}
/**
* Option.
*/
type KeySpacingOption$3 =
| {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
align?: {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
};
/**
* Options.
*/
type KeySpacingOptions$3 = [KeySpacingOption$3?];
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html)
*/
type KeySpacingRuleConfig$3 = RuleConfig<KeySpacingOptions$3>;
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html)
*/
interface KeySpacingRule$3 {
/**
* Enforce consistent spacing between keys and values in object literal properties.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html)
*/
'jsonc/key-spacing': KeySpacingRuleConfig$3;
}
/**
* Disallow BigInt literals.
*
* @see [no-bigint-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html)
*/
type NoBigintLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow BigInt literals.
*
* @see [no-bigint-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html)
*/
interface NoBigintLiteralsRule {
/**
* Disallow BigInt literals.
*
* @see [no-bigint-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html)
*/
'jsonc/no-bigint-literals': NoBigintLiteralsRuleConfig;
}
/**
* Disallow binary expression.
*
* @see [no-binary-expression](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html)
*/
type NoBinaryExpressionRuleConfig = RuleConfig<[]>;
/**
* Disallow binary expression.
*
* @see [no-binary-expression](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html)
*/
interface NoBinaryExpressionRule {
/**
* Disallow binary expression.
*
* @see [no-binary-expression](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html)
*/
'jsonc/no-binary-expression': NoBinaryExpressionRuleConfig;
}
/**
* Disallow binary numeric literals.
*
* @see [no-binary-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html)
*/
type NoBinaryNumericLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow binary numeric literals.
*
* @see [no-binary-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html)
*/
interface NoBinaryNumericLiteralsRule {
/**
* Disallow binary numeric literals.
*
* @see [no-binary-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html)
*/
'jsonc/no-binary-numeric-literals': NoBinaryNumericLiteralsRuleConfig;
}
/**
* Disallow comments.
*
* @see [no-comments](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html)
*/
type NoCommentsRuleConfig = RuleConfig<[]>;
/**
* Disallow comments.
*
* @see [no-comments](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html)
*/
interface NoCommentsRule {
/**
* Disallow comments.
*
* @see [no-comments](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html)
*/
'jsonc/no-comments': NoCommentsRuleConfig;
}
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html)
*/
type NoDupeKeysRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html)
*/
interface NoDupeKeysRule$1 {
/**
* Disallow duplicate keys in object literals.
*
* @see [no-dupe-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html)
*/
'jsonc/no-dupe-keys': NoDupeKeysRuleConfig$1;
}
/**
* Disallow escape sequences in identifiers.
*
* @see [no-escape-sequence-in-identifier](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html)
*/
type NoEscapeSequenceInIdentifierRuleConfig = RuleConfig<[]>;
/**
* Disallow escape sequences in identifiers.
*
* @see [no-escape-sequence-in-identifier](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html)
*/
interface NoEscapeSequenceInIdentifierRule {
/**
* Disallow escape sequences in identifiers.
*
* @see [no-escape-sequence-in-identifier](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html)
*/
'jsonc/no-escape-sequence-in-identifier': NoEscapeSequenceInIdentifierRuleConfig;
}
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html)
*/
type NoFloatingDecimalRuleConfig = RuleConfig<[]>;
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html)
*/
interface NoFloatingDecimalRule {
/**
* Disallow leading or trailing decimal points in numeric literals.
*
* @see [no-floating-decimal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html)
*/
'jsonc/no-floating-decimal': NoFloatingDecimalRuleConfig;
}
/**
* Disallow hexadecimal numeric literals.
*
* @see [no-hexadecimal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html)
*/
type NoHexadecimalNumericLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow hexadecimal numeric literals.
*
* @see [no-hexadecimal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html)
*/
interface NoHexadecimalNumericLiteralsRule {
/**
* Disallow hexadecimal numeric literals.
*
* @see [no-hexadecimal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html)
*/
'jsonc/no-hexadecimal-numeric-literals': NoHexadecimalNumericLiteralsRuleConfig;
}
/**
* Disallow Infinity.
*
* @see [no-infinity](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html)
*/
type NoInfinityRuleConfig = RuleConfig<[]>;
/**
* Disallow Infinity.
*
* @see [no-infinity](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html)
*/
interface NoInfinityRule {
/**
* Disallow Infinity.
*
* @see [no-infinity](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html)
*/
'jsonc/no-infinity': NoInfinityRuleConfig;
}
/**
* Option.
*/
interface NoIrregularWhitespaceOption$2 {
skipComments?: boolean;
skipStrings?: boolean;
skipTemplates?: boolean;
skipRegExps?: boolean;
skipJSXText?: boolean;
}
/**
* Options.
*/
type NoIrregularWhitespaceOptions$2 = [NoIrregularWhitespaceOption$2?];
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html)
*/
type NoIrregularWhitespaceRuleConfig$2 =
RuleConfig<NoIrregularWhitespaceOptions$2>;
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html)
*/
interface NoIrregularWhitespaceRule$2 {
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html)
*/
'jsonc/no-irregular-whitespace': NoIrregularWhitespaceRuleConfig$2;
}
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html)
*/
type NoMultiStrRuleConfig = RuleConfig<[]>;
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html)
*/
interface NoMultiStrRule {
/**
* Disallow multiline strings.
*
* @see [no-multi-str](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html)
*/
'jsonc/no-multi-str': NoMultiStrRuleConfig;
}
/**
* Disallow NaN.
*
* @see [no-nan](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html)
*/
type NoNanRuleConfig = RuleConfig<[]>;
/**
* Disallow NaN.
*
* @see [no-nan](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html)
*/
interface NoNanRule {
/**
* Disallow NaN.
*
* @see [no-nan](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html)
*/
'jsonc/no-nan': NoNanRuleConfig;
}
/**
* Disallow number property keys.
*
* @see [no-number-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html)
*/
type NoNumberPropsRuleConfig = RuleConfig<[]>;
/**
* Disallow number property keys.
*
* @see [no-number-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html)
*/
interface NoNumberPropsRule {
/**
* Disallow number property keys.
*
* @see [no-number-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html)
*/
'jsonc/no-number-props': NoNumberPropsRuleConfig;
}
/**
* Disallow numeric separators.
*
* @see [no-numeric-separators](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html)
*/
type NoNumericSeparatorsRuleConfig = RuleConfig<[]>;
/**
* Disallow numeric separators.
*
* @see [no-numeric-separators](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html)
*/
interface NoNumericSeparatorsRule {
/**
* Disallow numeric separators.
*
* @see [no-numeric-separators](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html)
*/
'jsonc/no-numeric-separators': NoNumericSeparatorsRuleConfig;
}
/**
* Disallow legacy octal literals.
*
* @see [no-octal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html)
*/
type NoOctalRuleConfig = RuleConfig<[]>;
/**
* Disallow legacy octal literals.
*
* @see [no-octal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html)
*/
interface NoOctalRule {
/**
* Disallow legacy octal literals.
*
* @see [no-octal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html)
*/
'jsonc/no-octal': NoOctalRuleConfig;
}
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html)
*/
type NoOctalEscapeRuleConfig = RuleConfig<[]>;
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html)
*/
interface NoOctalEscapeRule {
/**
* Disallow octal escape sequences in string literals.
*
* @see [no-octal-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html)
*/
'jsonc/no-octal-escape': NoOctalEscapeRuleConfig;
}
/**
* Disallow octal numeric literals.
*
* @see [no-octal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html)
*/
type NoOctalNumericLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow octal numeric literals.
*
* @see [no-octal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html)
*/
interface NoOctalNumericLiteralsRule {
/**
* Disallow octal numeric literals.
*
* @see [no-octal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html)
*/
'jsonc/no-octal-numeric-literals': NoOctalNumericLiteralsRuleConfig;
}
/**
* Disallow parentheses around the expression.
*
* @see [no-parenthesized](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html)
*/
type NoParenthesizedRuleConfig = RuleConfig<[]>;
/**
* Disallow parentheses around the expression.
*
* @see [no-parenthesized](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html)
*/
interface NoParenthesizedRule {
/**
* Disallow parentheses around the expression.
*
* @see [no-parenthesized](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html)
*/
'jsonc/no-parenthesized': NoParenthesizedRuleConfig;
}
/**
* Disallow plus sign.
*
* @see [no-plus-sign](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html)
*/
type NoPlusSignRuleConfig = RuleConfig<[]>;
/**
* Disallow plus sign.
*
* @see [no-plus-sign](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html)
*/
interface NoPlusSignRule {
/**
* Disallow plus sign.
*
* @see [no-plus-sign](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html)
*/
'jsonc/no-plus-sign': NoPlusSignRuleConfig;
}
/**
* Disallow RegExp literals.
*
* @see [no-regexp-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html)
*/
type NoRegexpLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow RegExp literals.
*
* @see [no-regexp-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html)
*/
interface NoRegexpLiteralsRule {
/**
* Disallow RegExp literals.
*
* @see [no-regexp-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html)
*/
'jsonc/no-regexp-literals': NoRegexpLiteralsRuleConfig;
}
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html)
*/
type NoSparseArraysRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html)
*/
interface NoSparseArraysRule$1 {
/**
* Disallow sparse arrays.
*
* @see [no-sparse-arrays](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html)
*/
'jsonc/no-sparse-arrays': NoSparseArraysRuleConfig$1;
}
/**
* Disallow template literals.
*
* @see [no-template-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html)
*/
type NoTemplateLiteralsRuleConfig = RuleConfig<[]>;
/**
* Disallow template literals.
*
* @see [no-template-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html)
*/
interface NoTemplateLiteralsRule {
/**
* Disallow template literals.
*
* @see [no-template-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html)
*/
'jsonc/no-template-literals': NoTemplateLiteralsRuleConfig;
}
/**
* Disallow `undefined`.
*
* @see [no-undefined-value](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html)
*/
type NoUndefinedValueRuleConfig = RuleConfig<[]>;
/**
* Disallow `undefined`.
*
* @see [no-undefined-value](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html)
*/
interface NoUndefinedValueRule {
/**
* Disallow `undefined`.
*
* @see [no-undefined-value](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html)
*/
'jsonc/no-undefined-value': NoUndefinedValueRuleConfig;
}
/**
* Disallow Unicode code point escape sequences.
*
* @see [no-unicode-codepoint-escapes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html)
*/
type NoUnicodeCodepointEscapesRuleConfig = RuleConfig<[]>;
/**
* Disallow Unicode code point escape sequences.
*
* @see [no-unicode-codepoint-escapes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html)
*/
interface NoUnicodeCodepointEscapesRule {
/**
* Disallow Unicode code point escape sequences.
*
* @see [no-unicode-codepoint-escapes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html)
*/
'jsonc/no-unicode-codepoint-escapes': NoUnicodeCodepointEscapesRuleConfig;
}
/**
* Disallow unnecessary escape usage.
*
* @see [no-useless-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html)
*/
type NoUselessEscapeRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary escape usage.
*
* @see [no-useless-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html)
*/
interface NoUselessEscapeRule {
/**
* Disallow unnecessary escape usage.
*
* @see [no-useless-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html)
*/
'jsonc/no-useless-escape': NoUselessEscapeRuleConfig;
}
/**
* Option.
*/
type ObjectCurlyNewlineOption$1 =
| (
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
}
)
| {
ObjectExpression?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ObjectPattern?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ImportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ExportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
};
/**
* Options.
*/
type ObjectCurlyNewlineOptions$1 = [ObjectCurlyNewlineOption$1?];
/**
* Enforce consistent line breaks inside braces.
*
* @see [object-curly-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html)
*/
type ObjectCurlyNewlineRuleConfig$1 =
RuleConfig<ObjectCurlyNewlineOptions$1>;
/**
* Enforce consistent line breaks inside braces.
*
* @see [object-curly-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html)
*/
interface ObjectCurlyNewlineRule$1 {
/**
* Enforce consistent line breaks inside braces.
*
* @see [object-curly-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html)
*/
'jsonc/object-curly-newline': ObjectCurlyNewlineRuleConfig$1;
}
/**
* Config.
*/
interface ObjectCurlySpacingConfig$2 {
arraysInObjects?: boolean;
objectsInObjects?: boolean;
}
/**
* Option.
*/
type ObjectCurlySpacingOption$2 = 'always' | 'never';
/**
* Options.
*/
type ObjectCurlySpacingOptions$2 = [
ObjectCurlySpacingOption$2?,
ObjectCurlySpacingConfig$2?,
];
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html)
*/
type ObjectCurlySpacingRuleConfig$2 =
RuleConfig<ObjectCurlySpacingOptions$2>;
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html)
*/
interface ObjectCurlySpacingRule$2 {
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html)
*/
'jsonc/object-curly-spacing': ObjectCurlySpacingRuleConfig$2;
}
/**
* Option.
*/
interface ObjectPropertyNewlineOption$1 {
allowAllPropertiesOnSameLine?: boolean;
allowMultiplePropertiesPerLine?: boolean;
}
/**
* Options.
*/
type ObjectPropertyNewlineOptions$1 = [ObjectPropertyNewlineOption$1?];
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html)
*/
type ObjectPropertyNewlineRuleConfig$1 =
RuleConfig<ObjectPropertyNewlineOptions$1>;
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html)
*/
interface ObjectPropertyNewlineRule$1 {
/**
* Enforce placing object properties on separate lines.
*
* @see [object-property-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html)
*/
'jsonc/object-property-newline': ObjectPropertyNewlineRuleConfig$1;
}
/**
* Option.
*/
type QuotePropsOption$1 =
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| [
'always' | 'as-needed' | 'consistent' | 'consistent-as-needed',
{
keywords?: boolean;
unnecessary?: boolean;
numbers?: boolean;
},
];
/**
* Options.
*/
type QuotePropsOptions$1 = QuotePropsOption$1;
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html)
*/
type QuotePropsRuleConfig$1 = RuleConfig<QuotePropsOptions$1>;
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html)
*/
interface QuotePropsRule$1 {
/**
* Require quotes around object literal property names.
*
* @see [quote-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html)
*/
'jsonc/quote-props': QuotePropsRuleConfig$1;
}
/**
* Config.
*/
type QuotesConfig$1 =
| 'avoid-escape'
| {
avoidEscape?: boolean;
allowTemplateLiterals?: boolean;
};
/**
* Option.
*/
type QuotesOption$2 = 'single' | 'double' | 'backtick';
/**
* Options.
*/
type QuotesOptions$2 = [QuotesOption$2?, QuotesConfig$1?];
/**
* Enforce use of double or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html)
*/
type QuotesRuleConfig$2 = RuleConfig<QuotesOptions$2>;
/**
* Enforce use of double or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html)
*/
interface QuotesRule$2 {
/**
* Enforce use of double or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html)
*/
'jsonc/quotes': QuotesRuleConfig$2;
}
/**
* Option.
*/
/**
* @minItems 1
*/
type SortArrayValuesOption = [
{
pathPattern: string;
order:
| (
| string
| {
valuePattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minValues?: number;
},
...{
pathPattern: string;
order:
| (
| string
| {
valuePattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minValues?: number;
}[],
];
/**
* Options.
*/
type SortArrayValuesOptions = SortArrayValuesOption;
/**
* Require array values to be sorted.
*
* @see [sort-array-values](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html)
*/
type SortArrayValuesRuleConfig = RuleConfig<SortArrayValuesOptions>;
/**
* Require array values to be sorted.
*
* @see [sort-array-values](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html)
*/
interface SortArrayValuesRule {
/**
* Require array values to be sorted.
*
* @see [sort-array-values](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html)
*/
'jsonc/sort-array-values': SortArrayValuesRuleConfig;
}
/**
* Option.
*/
type SortKeysOption$2 =
| [
{
pathPattern: string;
hasProperties?: string[];
order:
| (
| string
| {
keyPattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minKeys?: number;
allowLineSeparatedGroups?: boolean;
},
...{
pathPattern: string;
hasProperties?: string[];
order:
| (
| string
| {
keyPattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minKeys?: number;
allowLineSeparatedGroups?: boolean;
}[],
]
| []
| ['asc' | 'desc']
| [
'asc' | 'desc',
{
caseSensitive?: boolean;
natural?: boolean;
minKeys?: number;
allowLineSeparatedGroups?: boolean;
},
];
/**
* Options.
*/
type SortKeysOptions$2 = SortKeysOption$2;
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html)
*/
type SortKeysRuleConfig$2 = RuleConfig<SortKeysOptions$2>;
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html)
*/
interface SortKeysRule$2 {
/**
* Require object keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html)
*/
'jsonc/sort-keys': SortKeysRuleConfig$2;
}
/**
* Option.
*/
interface SpaceUnaryOpsOption$1 {
words?: boolean;
nonwords?: boolean;
overrides?: {
[k: string]: boolean;
};
}
/**
* Options.
*/
type SpaceUnaryOpsOptions$1 = [SpaceUnaryOpsOption$1?];
/**
* Disallow spaces after unary operators.
*
* @see [space-unary-ops](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html)
*/
type SpaceUnaryOpsRuleConfig$1 = RuleConfig<SpaceUnaryOpsOptions$1>;
/**
* Disallow spaces after unary operators.
*
* @see [space-unary-ops](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html)
*/
interface SpaceUnaryOpsRule$1 {
/**
* Disallow spaces after unary operators.
*
* @see [space-unary-ops](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html)
*/
'jsonc/space-unary-ops': SpaceUnaryOpsRuleConfig$1;
}
/**
* Disallow invalid number for JSON.
*
* @see [valid-json-number](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html)
*/
type ValidJsonNumberRuleConfig = RuleConfig<[]>;
/**
* Disallow invalid number for JSON.
*
* @see [valid-json-number](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html)
*/
interface ValidJsonNumberRule {
/**
* Disallow invalid number for JSON.
*
* @see [valid-json-number](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html)
*/
'jsonc/valid-json-number': ValidJsonNumberRuleConfig;
}
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html)
*/
type VueCustomBlockNoParsingErrorRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html)
*/
interface VueCustomBlockNoParsingErrorRule$1 {
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html)
*/
'jsonc/vue-custom-block/no-parsing-error': VueCustomBlockNoParsingErrorRuleConfig$1;
}
/**
* All Jsonc rules.
*/
type JsoncRules = ArrayBracketNewlineRule$1 &
ArrayBracketSpacingRule$1 &
ArrayElementNewlineRule$1 &
AutoRule &
CommaDangleRule$2 &
CommaStyleRule$1 &
IndentRule$2 &
KeyNameCasingRule$1 &
KeySpacingRule$3 &
NoBigintLiteralsRule &
NoBinaryExpressionRule &
NoBinaryNumericLiteralsRule &
NoCommentsRule &
NoDupeKeysRule$1 &
NoEscapeSequenceInIdentifierRule &
NoFloatingDecimalRule &
NoHexadecimalNumericLiteralsRule &
NoInfinityRule &
NoIrregularWhitespaceRule$2 &
NoMultiStrRule &
NoNanRule &
NoNumberPropsRule &
NoNumericSeparatorsRule &
NoOctalEscapeRule &
NoOctalNumericLiteralsRule &
NoOctalRule &
NoParenthesizedRule &
NoPlusSignRule &
NoRegexpLiteralsRule &
NoSparseArraysRule$1 &
NoTemplateLiteralsRule &
NoUndefinedValueRule &
NoUnicodeCodepointEscapesRule &
NoUselessEscapeRule &
ObjectCurlyNewlineRule$1 &
ObjectCurlySpacingRule$2 &
ObjectPropertyNewlineRule$1 &
QuotePropsRule$1 &
QuotesRule$2 &
SortArrayValuesRule &
SortKeysRule$2 &
SpaceUnaryOpsRule$1 &
ValidJsonNumberRule &
VueCustomBlockNoParsingErrorRule$1;
/**
* Option.
*/
interface AccessibleEmojiOption {
[k: string]: any;
}
/**
* Options.
*/
type AccessibleEmojiOptions = [AccessibleEmojiOption?];
/**
* Enforce emojis are wrapped in `<span>` and provide screenreader access.
*
* @deprecated
*
* @see [accessible-emoji](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md)
*/
type AccessibleEmojiRuleConfig = RuleConfig<AccessibleEmojiOptions>;
/**
* Enforce emojis are wrapped in `<span>` and provide screenreader access.
*
* @deprecated
*
* @see [accessible-emoji](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md)
*/
interface AccessibleEmojiRule {
/**
* Enforce emojis are wrapped in `<span>` and provide screenreader access.
*
* @deprecated
*
* @see [accessible-emoji](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md)
*/
'jsx-a11y/accessible-emoji': AccessibleEmojiRuleConfig;
}
/**
* Option.
*/
interface AltTextOption {
elements?: string[];
img?: string[];
object?: string[];
area?: string[];
'input[type="image"]'?: string[];
[k: string]: any;
}
/**
* Options.
*/
type AltTextOptions = [AltTextOption?];
/**
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
*
* @see [alt-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md)
*/
type AltTextRuleConfig = RuleConfig<AltTextOptions>;
/**
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
*
* @see [alt-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md)
*/
interface AltTextRule {
/**
* Enforce all elements that require alternative text have meaningful information to relay back to end user.
*
* @see [alt-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md)
*/
'jsx-a11y/alt-text': AltTextRuleConfig;
}
/**
* Option.
*/
interface AnchorAmbiguousTextOption {
words?: string[];
[k: string]: any;
}
/**
* Options.
*/
type AnchorAmbiguousTextOptions = [AnchorAmbiguousTextOption?];
/**
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
*
* @see [anchor-ambiguous-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md)
*/
type AnchorAmbiguousTextRuleConfig =
RuleConfig<AnchorAmbiguousTextOptions>;
/**
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
*
* @see [anchor-ambiguous-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md)
*/
interface AnchorAmbiguousTextRule {
/**
* Enforce `<a>` text to not exactly match "click here", "here", "link", or "a link".
*
* @see [anchor-ambiguous-text](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md)
*/
'jsx-a11y/anchor-ambiguous-text': AnchorAmbiguousTextRuleConfig;
}
/**
* Option.
*/
interface AnchorHasContentOption {
components?: string[];
[k: string]: any;
}
/**
* Options.
*/
type AnchorHasContentOptions = [AnchorHasContentOption?];
/**
* Enforce all anchors to contain accessible content.
*
* @see [anchor-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md)
*/
type AnchorHasContentRuleConfig = RuleConfig<AnchorHasContentOptions>;
/**
* Enforce all anchors to contain accessible content.
*
* @see [anchor-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md)
*/
interface AnchorHasContentRule {
/**
* Enforce all anchors to contain accessible content.
*
* @see [anchor-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md)
*/
'jsx-a11y/anchor-has-content': AnchorHasContentRuleConfig;
}
/**
* Option.
*/
interface AnchorIsValidOption {
components?: string[];
specialLink?: string[];
/**
* @minItems 1
*/
aspects?: [
'noHref' | 'invalidHref' | 'preferButton',
...('noHref' | 'invalidHref' | 'preferButton')[],
];
[k: string]: any;
}
/**
* Options.
*/
type AnchorIsValidOptions = [AnchorIsValidOption?];
/**
* Enforce all anchors are valid, navigable elements.
*
* @see [anchor-is-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md)
*/
type AnchorIsValidRuleConfig = RuleConfig<AnchorIsValidOptions>;
/**
* Enforce all anchors are valid, navigable elements.
*
* @see [anchor-is-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md)
*/
interface AnchorIsValidRule {
/**
* Enforce all anchors are valid, navigable elements.
*
* @see [anchor-is-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md)
*/
'jsx-a11y/anchor-is-valid': AnchorIsValidRuleConfig;
}
/**
* Option.
*/
interface AriaActivedescendantHasTabindexOption {
[k: string]: any;
}
/**
* Options.
*/
type AriaActivedescendantHasTabindexOptions = [
AriaActivedescendantHasTabindexOption?,
];
/**
* Enforce elements with aria-activedescendant are tabbable.
*
* @see [aria-activedescendant-has-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md)
*/
type AriaActivedescendantHasTabindexRuleConfig =
RuleConfig<AriaActivedescendantHasTabindexOptions>;
/**
* Enforce elements with aria-activedescendant are tabbable.
*
* @see [aria-activedescendant-has-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md)
*/
interface AriaActivedescendantHasTabindexRule {
/**
* Enforce elements with aria-activedescendant are tabbable.
*
* @see [aria-activedescendant-has-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md)
*/
'jsx-a11y/aria-activedescendant-has-tabindex': AriaActivedescendantHasTabindexRuleConfig;
}
/**
* Option.
*/
interface AriaPropsOption {
[k: string]: any;
}
/**
* Options.
*/
type AriaPropsOptions = [AriaPropsOption?];
/**
* Enforce all `aria-*` props are valid.
*
* @see [aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md)
*/
type AriaPropsRuleConfig = RuleConfig<AriaPropsOptions>;
/**
* Enforce all `aria-*` props are valid.
*
* @see [aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md)
*/
interface AriaPropsRule {
/**
* Enforce all `aria-*` props are valid.
*
* @see [aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md)
*/
'jsx-a11y/aria-props': AriaPropsRuleConfig;
}
/**
* Option.
*/
interface AriaProptypesOption {
[k: string]: any;
}
/**
* Options.
*/
type AriaProptypesOptions = [AriaProptypesOption?];
/**
* Enforce ARIA state and property values are valid.
*
* @see [aria-proptypes](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md)
*/
type AriaProptypesRuleConfig = RuleConfig<AriaProptypesOptions>;
/**
* Enforce ARIA state and property values are valid.
*
* @see [aria-proptypes](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md)
*/
interface AriaProptypesRule {
/**
* Enforce ARIA state and property values are valid.
*
* @see [aria-proptypes](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md)
*/
'jsx-a11y/aria-proptypes': AriaProptypesRuleConfig;
}
/**
* Option.
*/
interface AriaRoleOption {
allowedInvalidRoles?: string[];
ignoreNonDOM?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type AriaRoleOptions = [AriaRoleOption?];
/**
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
*
* @see [aria-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md)
*/
type AriaRoleRuleConfig = RuleConfig<AriaRoleOptions>;
/**
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
*
* @see [aria-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md)
*/
interface AriaRoleRule {
/**
* Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
*
* @see [aria-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md)
*/
'jsx-a11y/aria-role': AriaRoleRuleConfig;
}
/**
* Option.
*/
interface AriaUnsupportedElementsOption {
[k: string]: any;
}
/**
* Options.
*/
type AriaUnsupportedElementsOptions = [AriaUnsupportedElementsOption?];
/**
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
*
* @see [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md)
*/
type AriaUnsupportedElementsRuleConfig =
RuleConfig<AriaUnsupportedElementsOptions>;
/**
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
*
* @see [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md)
*/
interface AriaUnsupportedElementsRule {
/**
* Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
*
* @see [aria-unsupported-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md)
*/
'jsx-a11y/aria-unsupported-elements': AriaUnsupportedElementsRuleConfig;
}
/**
* Option.
*/
interface AutocompleteValidOption {
inputComponents?: string[];
[k: string]: any;
}
/**
* Options.
*/
type AutocompleteValidOptions = [AutocompleteValidOption?];
/**
* Enforce that autocomplete attributes are used correctly.
*
* @see [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md)
*/
type AutocompleteValidRuleConfig = RuleConfig<AutocompleteValidOptions>;
/**
* Enforce that autocomplete attributes are used correctly.
*
* @see [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md)
*/
interface AutocompleteValidRule {
/**
* Enforce that autocomplete attributes are used correctly.
*
* @see [autocomplete-valid](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md)
*/
'jsx-a11y/autocomplete-valid': AutocompleteValidRuleConfig;
}
/**
* Option.
*/
interface ClickEventsHaveKeyEventsOption {
[k: string]: any;
}
/**
* Options.
*/
type ClickEventsHaveKeyEventsOptions = [ClickEventsHaveKeyEventsOption?];
/**
* Enforce a clickable non-interactive element has at least one keyboard event listener.
*
* @see [click-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md)
*/
type ClickEventsHaveKeyEventsRuleConfig =
RuleConfig<ClickEventsHaveKeyEventsOptions>;
/**
* Enforce a clickable non-interactive element has at least one keyboard event listener.
*
* @see [click-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md)
*/
interface ClickEventsHaveKeyEventsRule {
/**
* Enforce a clickable non-interactive element has at least one keyboard event listener.
*
* @see [click-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md)
*/
'jsx-a11y/click-events-have-key-events': ClickEventsHaveKeyEventsRuleConfig;
}
/**
* Option.
*/
interface ControlHasAssociatedLabelOption {
labelAttributes?: string[];
controlComponents?: string[];
ignoreElements?: string[];
ignoreRoles?: string[];
/**
* JSX tree depth limit to check for accessible label
*/
depth?: number;
[k: string]: any;
}
/**
* Options.
*/
type ControlHasAssociatedLabelOptions = [
ControlHasAssociatedLabelOption?,
];
/**
* Enforce that a control (an interactive element) has a text label.
*
* @see [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md)
*/
type ControlHasAssociatedLabelRuleConfig =
RuleConfig<ControlHasAssociatedLabelOptions>;
/**
* Enforce that a control (an interactive element) has a text label.
*
* @see [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md)
*/
interface ControlHasAssociatedLabelRule {
/**
* Enforce that a control (an interactive element) has a text label.
*
* @see [control-has-associated-label](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md)
*/
'jsx-a11y/control-has-associated-label': ControlHasAssociatedLabelRuleConfig;
}
/**
* Option.
*/
interface HeadingHasContentOption {
components?: string[];
[k: string]: any;
}
/**
* Options.
*/
type HeadingHasContentOptions = [HeadingHasContentOption?];
/**
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
*
* @see [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md)
*/
type HeadingHasContentRuleConfig = RuleConfig<HeadingHasContentOptions>;
/**
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
*
* @see [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md)
*/
interface HeadingHasContentRule {
/**
* Enforce heading (`h1`, `h2`, etc) elements contain accessible content.
*
* @see [heading-has-content](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md)
*/
'jsx-a11y/heading-has-content': HeadingHasContentRuleConfig;
}
/**
* Option.
*/
interface HtmlHasLangOption {
[k: string]: any;
}
/**
* Options.
*/
type HtmlHasLangOptions = [HtmlHasLangOption?];
/**
* Enforce `<html>` element has `lang` prop.
*
* @see [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md)
*/
type HtmlHasLangRuleConfig = RuleConfig<HtmlHasLangOptions>;
/**
* Enforce `<html>` element has `lang` prop.
*
* @see [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md)
*/
interface HtmlHasLangRule {
/**
* Enforce `<html>` element has `lang` prop.
*
* @see [html-has-lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md)
*/
'jsx-a11y/html-has-lang': HtmlHasLangRuleConfig;
}
/**
* Option.
*/
interface IframeHasTitleOption {
[k: string]: any;
}
/**
* Options.
*/
type IframeHasTitleOptions = [IframeHasTitleOption?];
/**
* Enforce iframe elements have a title attribute.
*
* @see [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md)
*/
type IframeHasTitleRuleConfig = RuleConfig<IframeHasTitleOptions>;
/**
* Enforce iframe elements have a title attribute.
*
* @see [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md)
*/
interface IframeHasTitleRule {
/**
* Enforce iframe elements have a title attribute.
*
* @see [iframe-has-title](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md)
*/
'jsx-a11y/iframe-has-title': IframeHasTitleRuleConfig;
}
/**
* Option.
*/
interface ImgRedundantAltOption {
components?: string[];
words?: string[];
[k: string]: any;
}
/**
* Options.
*/
type ImgRedundantAltOptions = [ImgRedundantAltOption?];
/**
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
*
* @see [img-redundant-alt](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md)
*/
type ImgRedundantAltRuleConfig = RuleConfig<ImgRedundantAltOptions>;
/**
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
*
* @see [img-redundant-alt](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md)
*/
interface ImgRedundantAltRule {
/**
* Enforce `<img>` alt prop does not contain the word "image", "picture", or "photo".
*
* @see [img-redundant-alt](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md)
*/
'jsx-a11y/img-redundant-alt': ImgRedundantAltRuleConfig;
}
/**
* Option.
*/
interface InteractiveSupportsFocusOption {
/**
* @minItems 0
*/
tabbable?: (
| 'button'
| 'checkbox'
| 'columnheader'
| 'combobox'
| 'grid'
| 'gridcell'
| 'link'
| 'listbox'
| 'menu'
| 'menubar'
| 'menuitem'
| 'menuitemcheckbox'
| 'menuitemradio'
| 'option'
| 'progressbar'
| 'radio'
| 'radiogroup'
| 'row'
| 'rowheader'
| 'scrollbar'
| 'searchbox'
| 'slider'
| 'spinbutton'
| 'switch'
| 'tab'
| 'tablist'
| 'textbox'
| 'tree'
| 'treegrid'
| 'treeitem'
| 'doc-backlink'
| 'doc-biblioref'
| 'doc-glossref'
| 'doc-noteref'
)[];
[k: string]: any;
}
/**
* Options.
*/
type InteractiveSupportsFocusOptions = [InteractiveSupportsFocusOption?];
/**
* Enforce that elements with interactive handlers like `onClick` must be focusable.
*
* @see [interactive-supports-focus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md)
*/
type InteractiveSupportsFocusRuleConfig =
RuleConfig<InteractiveSupportsFocusOptions>;
/**
* Enforce that elements with interactive handlers like `onClick` must be focusable.
*
* @see [interactive-supports-focus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md)
*/
interface InteractiveSupportsFocusRule {
/**
* Enforce that elements with interactive handlers like `onClick` must be focusable.
*
* @see [interactive-supports-focus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md)
*/
'jsx-a11y/interactive-supports-focus': InteractiveSupportsFocusRuleConfig;
}
/**
* Option.
*/
interface LabelHasAssociatedControlOption {
labelComponents?: string[];
labelAttributes?: string[];
controlComponents?: string[];
/**
* Assert that the label has htmlFor, a nested label, both or either
*/
assert?: 'htmlFor' | 'nesting' | 'both' | 'either';
/**
* JSX tree depth limit to check for accessible label
*/
depth?: number;
[k: string]: any;
}
/**
* Options.
*/
type LabelHasAssociatedControlOptions = [
LabelHasAssociatedControlOption?,
];
/**
* Enforce that a `label` tag has a text label and an associated control.
*
* @see [label-has-associated-control](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md)
*/
type LabelHasAssociatedControlRuleConfig =
RuleConfig<LabelHasAssociatedControlOptions>;
/**
* Enforce that a `label` tag has a text label and an associated control.
*
* @see [label-has-associated-control](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md)
*/
interface LabelHasAssociatedControlRule {
/**
* Enforce that a `label` tag has a text label and an associated control.
*
* @see [label-has-associated-control](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md)
*/
'jsx-a11y/label-has-associated-control': LabelHasAssociatedControlRuleConfig;
}
/**
* Option.
*/
interface LabelHasForOption {
components?: string[];
required?:
| ('nesting' | 'id')
| {
/**
* @minItems 0
*/
some: ('nesting' | 'id')[];
[k: string]: any;
}
| {
/**
* @minItems 0
*/
every: ('nesting' | 'id')[];
[k: string]: any;
};
allowChildren?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type LabelHasForOptions = [LabelHasForOption?];
/**
* Enforce that `<label>` elements have the `htmlFor` prop.
*
* @deprecated
*
* @see [label-has-for](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md)
*/
type LabelHasForRuleConfig = RuleConfig<LabelHasForOptions>;
/**
* Enforce that `<label>` elements have the `htmlFor` prop.
*
* @deprecated
*
* @see [label-has-for](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md)
*/
interface LabelHasForRule {
/**
* Enforce that `<label>` elements have the `htmlFor` prop.
*
* @deprecated
*
* @see [label-has-for](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md)
*/
'jsx-a11y/label-has-for': LabelHasForRuleConfig;
}
/**
* Option.
*/
interface LangOption {
[k: string]: any;
}
/**
* Options.
*/
type LangOptions = [LangOption?];
/**
* Enforce lang attribute has a valid value.
*
* @see [lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md)
*/
type LangRuleConfig = RuleConfig<LangOptions>;
/**
* Enforce lang attribute has a valid value.
*
* @see [lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md)
*/
interface LangRule {
/**
* Enforce lang attribute has a valid value.
*
* @see [lang](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md)
*/
'jsx-a11y/lang': LangRuleConfig;
}
/**
* Option.
*/
interface MediaHasCaptionOption {
audio?: string[];
video?: string[];
track?: string[];
[k: string]: any;
}
/**
* Options.
*/
type MediaHasCaptionOptions = [MediaHasCaptionOption?];
/**
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
*
* @see [media-has-caption](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md)
*/
type MediaHasCaptionRuleConfig = RuleConfig<MediaHasCaptionOptions>;
/**
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
*
* @see [media-has-caption](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md)
*/
interface MediaHasCaptionRule {
/**
* Enforces that `<audio>` and `<video>` elements must have a `<track>` for captions.
*
* @see [media-has-caption](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md)
*/
'jsx-a11y/media-has-caption': MediaHasCaptionRuleConfig;
}
/**
* Option.
*/
interface MouseEventsHaveKeyEventsOption {
[k: string]: any;
}
/**
* Options.
*/
type MouseEventsHaveKeyEventsOptions = [MouseEventsHaveKeyEventsOption?];
/**
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
*
* @see [mouse-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md)
*/
type MouseEventsHaveKeyEventsRuleConfig =
RuleConfig<MouseEventsHaveKeyEventsOptions>;
/**
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
*
* @see [mouse-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md)
*/
interface MouseEventsHaveKeyEventsRule {
/**
* Enforce that `onMouseOver`/`onMouseOut` are accompanied by `onFocus`/`onBlur` for keyboard-only users.
*
* @see [mouse-events-have-key-events](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md)
*/
'jsx-a11y/mouse-events-have-key-events': MouseEventsHaveKeyEventsRuleConfig;
}
/**
* Option.
*/
interface NoAccessKeyOption {
[k: string]: any;
}
/**
* Options.
*/
type NoAccessKeyOptions = [NoAccessKeyOption?];
/**
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader.
*
* @see [no-access-key](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md)
*/
type NoAccessKeyRuleConfig = RuleConfig<NoAccessKeyOptions>;
/**
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader.
*
* @see [no-access-key](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md)
*/
interface NoAccessKeyRule {
/**
* Enforce that the `accessKey` prop is not used on any element to avoid complications with keyboard commands used by a screenreader.
*
* @see [no-access-key](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md)
*/
'jsx-a11y/no-access-key': NoAccessKeyRuleConfig;
}
/**
* Option.
*/
interface NoAriaHiddenOnFocusableOption {
[k: string]: any;
}
/**
* Options.
*/
type NoAriaHiddenOnFocusableOptions = [NoAriaHiddenOnFocusableOption?];
/**
* Disallow `aria-hidden="true"` from being set on focusable elements.
*
* @see [no-aria-hidden-on-focusable](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md)
*/
type NoAriaHiddenOnFocusableRuleConfig =
RuleConfig<NoAriaHiddenOnFocusableOptions>;
/**
* Disallow `aria-hidden="true"` from being set on focusable elements.
*
* @see [no-aria-hidden-on-focusable](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md)
*/
interface NoAriaHiddenOnFocusableRule {
/**
* Disallow `aria-hidden="true"` from being set on focusable elements.
*
* @see [no-aria-hidden-on-focusable](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md)
*/
'jsx-a11y/no-aria-hidden-on-focusable': NoAriaHiddenOnFocusableRuleConfig;
}
/**
* Option.
*/
interface NoAutofocusOption {
ignoreNonDOM?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type NoAutofocusOptions = [NoAutofocusOption?];
/**
* Enforce autoFocus prop is not used.
*
* @see [no-autofocus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md)
*/
type NoAutofocusRuleConfig = RuleConfig<NoAutofocusOptions>;
/**
* Enforce autoFocus prop is not used.
*
* @see [no-autofocus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md)
*/
interface NoAutofocusRule {
/**
* Enforce autoFocus prop is not used.
*
* @see [no-autofocus](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md)
*/
'jsx-a11y/no-autofocus': NoAutofocusRuleConfig;
}
/**
* Option.
*/
interface NoDistractingElementsOption {
/**
* @minItems 0
*/
elements?: ('marquee' | 'blink')[];
[k: string]: any;
}
/**
* Options.
*/
type NoDistractingElementsOptions = [NoDistractingElementsOption?];
/**
* Enforce distracting elements are not used.
*
* @see [no-distracting-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md)
*/
type NoDistractingElementsRuleConfig =
RuleConfig<NoDistractingElementsOptions>;
/**
* Enforce distracting elements are not used.
*
* @see [no-distracting-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md)
*/
interface NoDistractingElementsRule {
/**
* Enforce distracting elements are not used.
*
* @see [no-distracting-elements](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md)
*/
'jsx-a11y/no-distracting-elements': NoDistractingElementsRuleConfig;
}
/**
* Option.
*/
interface NoInteractiveElementToNoninteractiveRoleOption {
[k: string]: string[];
}
/**
* Options.
*/
type NoInteractiveElementToNoninteractiveRoleOptions = [
NoInteractiveElementToNoninteractiveRoleOption?,
];
/**
* Interactive elements should not be assigned non-interactive roles.
*
* @see [no-interactive-element-to-noninteractive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md)
*/
type NoInteractiveElementToNoninteractiveRoleRuleConfig =
RuleConfig<NoInteractiveElementToNoninteractiveRoleOptions>;
/**
* Interactive elements should not be assigned non-interactive roles.
*
* @see [no-interactive-element-to-noninteractive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md)
*/
interface NoInteractiveElementToNoninteractiveRoleRule {
/**
* Interactive elements should not be assigned non-interactive roles.
*
* @see [no-interactive-element-to-noninteractive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md)
*/
'jsx-a11y/no-interactive-element-to-noninteractive-role': NoInteractiveElementToNoninteractiveRoleRuleConfig;
}
/**
* Option.
*/
interface NoNoninteractiveElementInteractionsOption {
handlers?: string[];
[k: string]: any;
}
/**
* Options.
*/
type NoNoninteractiveElementInteractionsOptions = [
NoNoninteractiveElementInteractionsOption?,
];
/**
* Non-interactive elements should not be assigned mouse or keyboard event listeners.
*
* @see [no-noninteractive-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md)
*/
type NoNoninteractiveElementInteractionsRuleConfig =
RuleConfig<NoNoninteractiveElementInteractionsOptions>;
/**
* Non-interactive elements should not be assigned mouse or keyboard event listeners.
*
* @see [no-noninteractive-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md)
*/
interface NoNoninteractiveElementInteractionsRule {
/**
* Non-interactive elements should not be assigned mouse or keyboard event listeners.
*
* @see [no-noninteractive-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md)
*/
'jsx-a11y/no-noninteractive-element-interactions': NoNoninteractiveElementInteractionsRuleConfig;
}
/**
* Option.
*/
interface NoNoninteractiveElementToInteractiveRoleOption {
[k: string]: string[];
}
/**
* Options.
*/
type NoNoninteractiveElementToInteractiveRoleOptions = [
NoNoninteractiveElementToInteractiveRoleOption?,
];
/**
* Non-interactive elements should not be assigned interactive roles.
*
* @see [no-noninteractive-element-to-interactive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md)
*/
type NoNoninteractiveElementToInteractiveRoleRuleConfig =
RuleConfig<NoNoninteractiveElementToInteractiveRoleOptions>;
/**
* Non-interactive elements should not be assigned interactive roles.
*
* @see [no-noninteractive-element-to-interactive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md)
*/
interface NoNoninteractiveElementToInteractiveRoleRule {
/**
* Non-interactive elements should not be assigned interactive roles.
*
* @see [no-noninteractive-element-to-interactive-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md)
*/
'jsx-a11y/no-noninteractive-element-to-interactive-role': NoNoninteractiveElementToInteractiveRoleRuleConfig;
}
/**
* Option.
*/
interface NoNoninteractiveTabindexOption {
/**
* An array of ARIA roles
*/
roles?: string[];
/**
* An array of HTML tag names
*/
tags?: string[];
[k: string]: any;
}
/**
* Options.
*/
type NoNoninteractiveTabindexOptions = [NoNoninteractiveTabindexOption?];
/**
* `tabIndex` should only be declared on interactive elements.
*
* @see [no-noninteractive-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md)
*/
type NoNoninteractiveTabindexRuleConfig =
RuleConfig<NoNoninteractiveTabindexOptions>;
/**
* `tabIndex` should only be declared on interactive elements.
*
* @see [no-noninteractive-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md)
*/
interface NoNoninteractiveTabindexRule {
/**
* `tabIndex` should only be declared on interactive elements.
*
* @see [no-noninteractive-tabindex](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md)
*/
'jsx-a11y/no-noninteractive-tabindex': NoNoninteractiveTabindexRuleConfig;
}
/**
* Option.
*/
interface NoOnchangeOption {
[k: string]: any;
}
/**
* Options.
*/
type NoOnchangeOptions = [NoOnchangeOption?];
/**
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
*
* @deprecated
*
* @see [no-onchange](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md)
*/
type NoOnchangeRuleConfig = RuleConfig<NoOnchangeOptions>;
/**
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
*
* @deprecated
*
* @see [no-onchange](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md)
*/
interface NoOnchangeRule {
/**
* Enforce usage of `onBlur` over `onChange` on select menus for accessibility.
*
* @deprecated
*
* @see [no-onchange](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md)
*/
'jsx-a11y/no-onchange': NoOnchangeRuleConfig;
}
/**
* Option.
*/
interface NoRedundantRolesOption {
[k: string]: string[];
}
/**
* Options.
*/
type NoRedundantRolesOptions = [NoRedundantRolesOption?];
/**
* Enforce explicit role property is not the same as implicit/default role property on element.
*
* @see [no-redundant-roles](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md)
*/
type NoRedundantRolesRuleConfig = RuleConfig<NoRedundantRolesOptions>;
/**
* Enforce explicit role property is not the same as implicit/default role property on element.
*
* @see [no-redundant-roles](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md)
*/
interface NoRedundantRolesRule {
/**
* Enforce explicit role property is not the same as implicit/default role property on element.
*
* @see [no-redundant-roles](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md)
*/
'jsx-a11y/no-redundant-roles': NoRedundantRolesRuleConfig;
}
/**
* Option.
*/
interface NoStaticElementInteractionsOption {
handlers?: string[];
[k: string]: any;
}
/**
* Options.
*/
type NoStaticElementInteractionsOptions = [
NoStaticElementInteractionsOption?,
];
/**
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
*
* @see [no-static-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md)
*/
type NoStaticElementInteractionsRuleConfig =
RuleConfig<NoStaticElementInteractionsOptions>;
/**
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
*
* @see [no-static-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md)
*/
interface NoStaticElementInteractionsRule {
/**
* Enforce that non-interactive, visible elements (such as `<div>`) that have click handlers use the role attribute.
*
* @see [no-static-element-interactions](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md)
*/
'jsx-a11y/no-static-element-interactions': NoStaticElementInteractionsRuleConfig;
}
/**
* Option.
*/
interface PreferTagOverRoleOption {
[k: string]: any;
}
/**
* Options.
*/
type PreferTagOverRoleOptions = [PreferTagOverRoleOption?];
/**
* Enforces using semantic DOM elements over the ARIA `role` property.
*
* @see [prefer-tag-over-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md)
*/
type PreferTagOverRoleRuleConfig = RuleConfig<PreferTagOverRoleOptions>;
/**
* Enforces using semantic DOM elements over the ARIA `role` property.
*
* @see [prefer-tag-over-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md)
*/
interface PreferTagOverRoleRule {
/**
* Enforces using semantic DOM elements over the ARIA `role` property.
*
* @see [prefer-tag-over-role](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md)
*/
'jsx-a11y/prefer-tag-over-role': PreferTagOverRoleRuleConfig;
}
/**
* Option.
*/
interface RoleHasRequiredAriaPropsOption {
[k: string]: any;
}
/**
* Options.
*/
type RoleHasRequiredAriaPropsOptions = [RoleHasRequiredAriaPropsOption?];
/**
* Enforce that elements with ARIA roles must have all required attributes for that role.
*
* @see [role-has-required-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md)
*/
type RoleHasRequiredAriaPropsRuleConfig =
RuleConfig<RoleHasRequiredAriaPropsOptions>;
/**
* Enforce that elements with ARIA roles must have all required attributes for that role.
*
* @see [role-has-required-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md)
*/
interface RoleHasRequiredAriaPropsRule {
/**
* Enforce that elements with ARIA roles must have all required attributes for that role.
*
* @see [role-has-required-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md)
*/
'jsx-a11y/role-has-required-aria-props': RoleHasRequiredAriaPropsRuleConfig;
}
/**
* Option.
*/
interface RoleSupportsAriaPropsOption {
[k: string]: any;
}
/**
* Options.
*/
type RoleSupportsAriaPropsOptions = [RoleSupportsAriaPropsOption?];
/**
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
*
* @see [role-supports-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md)
*/
type RoleSupportsAriaPropsRuleConfig =
RuleConfig<RoleSupportsAriaPropsOptions>;
/**
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
*
* @see [role-supports-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md)
*/
interface RoleSupportsAriaPropsRule {
/**
* Enforce that elements with explicit or implicit roles defined contain only `aria-*` properties supported by that `role`.
*
* @see [role-supports-aria-props](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md)
*/
'jsx-a11y/role-supports-aria-props': RoleSupportsAriaPropsRuleConfig;
}
/**
* Option.
*/
interface ScopeOption {
[k: string]: any;
}
/**
* Options.
*/
type ScopeOptions = [ScopeOption?];
/**
* Enforce `scope` prop is only used on `<th>` elements.
*
* @see [scope](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md)
*/
type ScopeRuleConfig = RuleConfig<ScopeOptions>;
/**
* Enforce `scope` prop is only used on `<th>` elements.
*
* @see [scope](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md)
*/
interface ScopeRule {
/**
* Enforce `scope` prop is only used on `<th>` elements.
*
* @see [scope](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md)
*/
'jsx-a11y/scope': ScopeRuleConfig;
}
/**
* Option.
*/
interface TabindexNoPositiveOption {
[k: string]: any;
}
/**
* Options.
*/
type TabindexNoPositiveOptions = [TabindexNoPositiveOption?];
/**
* Enforce `tabIndex` value is not greater than zero.
*
* @see [tabindex-no-positive](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md)
*/
type TabindexNoPositiveRuleConfig =
RuleConfig<TabindexNoPositiveOptions>;
/**
* Enforce `tabIndex` value is not greater than zero.
*
* @see [tabindex-no-positive](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md)
*/
interface TabindexNoPositiveRule {
/**
* Enforce `tabIndex` value is not greater than zero.
*
* @see [tabindex-no-positive](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md)
*/
'jsx-a11y/tabindex-no-positive': TabindexNoPositiveRuleConfig;
}
/**
* All JsxA11y rules.
*/
type JsxA11yRules = AccessibleEmojiRule &
AltTextRule &
AnchorAmbiguousTextRule &
AnchorHasContentRule &
AnchorIsValidRule &
AriaActivedescendantHasTabindexRule &
AriaPropsRule &
AriaProptypesRule &
AriaRoleRule &
AriaUnsupportedElementsRule &
AutocompleteValidRule &
ClickEventsHaveKeyEventsRule &
ControlHasAssociatedLabelRule &
HeadingHasContentRule &
HtmlHasLangRule &
IframeHasTitleRule &
ImgRedundantAltRule &
InteractiveSupportsFocusRule &
LabelHasAssociatedControlRule &
LabelHasForRule &
LangRule &
MediaHasCaptionRule &
MouseEventsHaveKeyEventsRule &
NoAccessKeyRule &
NoAriaHiddenOnFocusableRule &
NoAutofocusRule &
NoDistractingElementsRule &
NoInteractiveElementToNoninteractiveRoleRule &
NoNoninteractiveElementInteractionsRule &
NoNoninteractiveElementToInteractiveRoleRule &
NoNoninteractiveTabindexRule &
NoOnchangeRule &
NoRedundantRolesRule &
NoStaticElementInteractionsRule &
PreferTagOverRoleRule &
RoleHasRequiredAriaPropsRule &
RoleSupportsAriaPropsRule &
ScopeRule &
TabindexNoPositiveRule;
/**
* Option.
*/
type CallbackReturnOption$1 = string[];
/**
* Options.
*/
type CallbackReturnOptions$1 = [CallbackReturnOption$1?];
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/callback-return.md)
*/
type CallbackReturnRuleConfig$1 = RuleConfig<CallbackReturnOptions$1>;
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/callback-return.md)
*/
interface CallbackReturnRule$1 {
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/callback-return.md)
*/
'n/callback-return': CallbackReturnRuleConfig$1;
}
/**
* Config.
*/
interface ExportsStyleConfig$1 {
allowBatchAssign?: boolean;
}
/**
* Option.
*/
type ExportsStyleOption$1 = 'module.exports' | 'exports';
/**
* Options.
*/
type ExportsStyleOptions$1 = [ExportsStyleOption$1?, ExportsStyleConfig$1?];
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/exports-style.md)
*/
type ExportsStyleRuleConfig$1 = RuleConfig<ExportsStyleOptions$1>;
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/exports-style.md)
*/
interface ExportsStyleRule$1 {
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/exports-style.md)
*/
'n/exports-style': ExportsStyleRuleConfig$1;
}
/**
* Config.
*/
interface FileExtensionInImportConfig$1 {
[k: string]: 'always' | 'never';
}
/**
* Option.
*/
type FileExtensionInImportOption$1 = 'always' | 'never';
/**
* Options.
*/
type FileExtensionInImportOptions$1 = [
FileExtensionInImportOption$1?,
FileExtensionInImportConfig$1?,
];
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/file-extension-in-import.md)
*/
type FileExtensionInImportRuleConfig$1 =
RuleConfig<FileExtensionInImportOptions$1>;
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/file-extension-in-import.md)
*/
interface FileExtensionInImportRule$1 {
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/file-extension-in-import.md)
*/
'n/file-extension-in-import': FileExtensionInImportRuleConfig$1;
}
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/global-require.md)
*/
type GlobalRequireRuleConfig$1 = RuleConfig<[]>;
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/global-require.md)
*/
interface GlobalRequireRule$1 {
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/global-require.md)
*/
'n/global-require': GlobalRequireRuleConfig$1;
}
/**
* Option.
*/
type HandleCallbackErrOption$1 = string;
/**
* Options.
*/
type HandleCallbackErrOptions$1 = [HandleCallbackErrOption$1?];
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/handle-callback-err.md)
*/
type HandleCallbackErrRuleConfig$1 = RuleConfig<HandleCallbackErrOptions$1>;
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/handle-callback-err.md)
*/
interface HandleCallbackErrRule$1 {
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/handle-callback-err.md)
*/
'n/handle-callback-err': HandleCallbackErrRuleConfig$1;
}
/**
* Enforce Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-callback-literal.md)
*/
type NoCallbackLiteralRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-callback-literal.md)
*/
interface NoCallbackLiteralRule$1 {
/**
* Enforce Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-callback-literal.md)
*/
'n/no-callback-literal': NoCallbackLiteralRuleConfig$1;
}
/**
* Option.
*/
interface NoDeprecatedApiOption$1 {
version?: string;
ignoreModuleItems?: (
| '_linklist'
| '_stream_wrap'
| 'async_hooks.currentId'
| 'async_hooks.triggerId'
| 'buffer.Buffer()'
| 'new buffer.Buffer()'
| 'buffer.SlowBuffer'
| 'constants'
| 'crypto._toBuf'
| 'crypto.Credentials'
| 'crypto.DEFAULT_ENCODING'
| 'crypto.createCipher'
| 'crypto.createCredentials'
| 'crypto.createDecipher'
| 'crypto.fips'
| 'crypto.prng'
| 'crypto.pseudoRandomBytes'
| 'crypto.rng'
| 'domain'
| 'events.EventEmitter.listenerCount'
| 'events.listenerCount'
| 'freelist'
| 'fs.SyncWriteStream'
| 'fs.exists'
| 'fs.lchmod'
| 'fs.lchmodSync'
| 'http.createClient'
| 'module.Module.createRequireFromPath'
| 'module.Module.requireRepl'
| 'module.Module._debug'
| 'module.createRequireFromPath'
| 'module.requireRepl'
| 'module._debug'
| 'net._setSimultaneousAccepts'
| 'os.getNetworkInterfaces'
| 'os.tmpDir'
| 'path._makeLong'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
| 'punycode'
| 'readline.codePointAt'
| 'readline.getStringWidth'
| 'readline.isFullWidthCodePoint'
| 'readline.stripVTControlCharacters'
| 'safe-buffer.Buffer()'
| 'new safe-buffer.Buffer()'
| 'safe-buffer.SlowBuffer'
| 'sys'
| 'timers.enroll'
| 'timers.unenroll'
| 'tls.CleartextStream'
| 'tls.CryptoStream'
| 'tls.SecurePair'
| 'tls.convertNPNProtocols'
| 'tls.createSecurePair'
| 'tls.parseCertString'
| 'tty.setRawMode'
| 'url.parse'
| 'url.resolve'
| 'util.debug'
| 'util.error'
| 'util.isArray'
| 'util.isBoolean'
| 'util.isBuffer'
| 'util.isDate'
| 'util.isError'
| 'util.isFunction'
| 'util.isNull'
| 'util.isNullOrUndefined'
| 'util.isNumber'
| 'util.isObject'
| 'util.isPrimitive'
| 'util.isRegExp'
| 'util.isString'
| 'util.isSymbol'
| 'util.isUndefined'
| 'util.log'
| 'util.print'
| 'util.pump'
| 'util.puts'
| 'util._extend'
| 'vm.runInDebugContext'
)[];
ignoreGlobalItems?: (
| 'Buffer()'
| 'new Buffer()'
| 'COUNTER_NET_SERVER_CONNECTION'
| 'COUNTER_NET_SERVER_CONNECTION_CLOSE'
| 'COUNTER_HTTP_SERVER_REQUEST'
| 'COUNTER_HTTP_SERVER_RESPONSE'
| 'COUNTER_HTTP_CLIENT_REQUEST'
| 'COUNTER_HTTP_CLIENT_RESPONSE'
| 'GLOBAL'
| 'Intl.v8BreakIterator'
| 'require.extensions'
| 'root'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
)[];
ignoreIndirectDependencies?: boolean;
}
/**
* Options.
*/
type NoDeprecatedApiOptions$1 = [NoDeprecatedApiOption$1?];
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-deprecated-api.md)
*/
type NoDeprecatedApiRuleConfig$1 = RuleConfig<NoDeprecatedApiOptions$1>;
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-deprecated-api.md)
*/
interface NoDeprecatedApiRule$1 {
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-deprecated-api.md)
*/
'n/no-deprecated-api': NoDeprecatedApiRuleConfig$1;
}
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-exports-assign.md)
*/
type NoExportsAssignRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-exports-assign.md)
*/
interface NoExportsAssignRule$1 {
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-exports-assign.md)
*/
'n/no-exports-assign': NoExportsAssignRuleConfig$1;
}
/**
* Option.
*/
interface NoExtraneousImportOption$1 {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
}
/**
* Options.
*/
type NoExtraneousImportOptions$1 = [NoExtraneousImportOption$1?];
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-import.md)
*/
type NoExtraneousImportRuleConfig$1 =
RuleConfig<NoExtraneousImportOptions$1>;
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-import.md)
*/
interface NoExtraneousImportRule$1 {
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-import.md)
*/
'n/no-extraneous-import': NoExtraneousImportRuleConfig$1;
}
/**
* Option.
*/
interface NoExtraneousRequireOption$1 {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoExtraneousRequireOptions$1 = [NoExtraneousRequireOption$1?];
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-require.md)
*/
type NoExtraneousRequireRuleConfig$1 =
RuleConfig<NoExtraneousRequireOptions$1>;
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-require.md)
*/
interface NoExtraneousRequireRule$1 {
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-extraneous-require.md)
*/
'n/no-extraneous-require': NoExtraneousRequireRuleConfig$1;
}
/**
* Option.
*/
interface NoHideCoreModulesOption$1 {
allow?: (
| 'assert'
| 'buffer'
| 'child_process'
| 'cluster'
| 'console'
| 'constants'
| 'crypto'
| 'dgram'
| 'dns'
| 'events'
| 'fs'
| 'http'
| 'https'
| 'module'
| 'net'
| 'os'
| 'path'
| 'querystring'
| 'readline'
| 'repl'
| 'stream'
| 'string_decoder'
| 'timers'
| 'tls'
| 'tty'
| 'url'
| 'util'
| 'vm'
| 'zlib'
)[];
ignoreDirectDependencies?: boolean;
ignoreIndirectDependencies?: boolean;
}
/**
* Options.
*/
type NoHideCoreModulesOptions$1 = [NoHideCoreModulesOption$1?];
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-hide-core-modules.md)
*/
type NoHideCoreModulesRuleConfig$1 = RuleConfig<NoHideCoreModulesOptions$1>;
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-hide-core-modules.md)
*/
interface NoHideCoreModulesRule$1 {
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-hide-core-modules.md)
*/
'n/no-hide-core-modules': NoHideCoreModulesRuleConfig$1;
}
/**
* Option.
*/
interface NoMissingImportOption$1 {
allowModules?: string[];
resolvePaths?: string[];
typescriptExtensionMap?:
| any[][]
| ('react' | 'react-jsx' | 'react-jsxdev' | 'react-native' | 'preserve');
tsconfigPath?: string;
}
/**
* Options.
*/
type NoMissingImportOptions$1 = [NoMissingImportOption$1?];
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-import.md)
*/
type NoMissingImportRuleConfig$1 = RuleConfig<NoMissingImportOptions$1>;
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-import.md)
*/
interface NoMissingImportRule$1 {
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-import.md)
*/
'n/no-missing-import': NoMissingImportRuleConfig$1;
}
/**
* Option.
*/
interface NoMissingRequireOption$1 {
allowModules?: string[];
tryExtensions?: string[];
resolvePaths?: string[];
typescriptExtensionMap?:
| any[][]
| ('react' | 'react-jsx' | 'react-jsxdev' | 'react-native' | 'preserve');
tsconfigPath?: string;
}
/**
* Options.
*/
type NoMissingRequireOptions$1 = [NoMissingRequireOption$1?];
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-require.md)
*/
type NoMissingRequireRuleConfig$1 = RuleConfig<NoMissingRequireOptions$1>;
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-require.md)
*/
interface NoMissingRequireRule$1 {
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-missing-require.md)
*/
'n/no-missing-require': NoMissingRequireRuleConfig$1;
}
/**
* Option.
*/
type NoMixedRequiresOption$1 =
| boolean
| {
grouping?: boolean;
allowCall?: boolean;
};
/**
* Options.
*/
type NoMixedRequiresOptions$1 = [NoMixedRequiresOption$1?];
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-mixed-requires.md)
*/
type NoMixedRequiresRuleConfig$1 = RuleConfig<NoMixedRequiresOptions$1>;
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-mixed-requires.md)
*/
interface NoMixedRequiresRule$1 {
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-mixed-requires.md)
*/
'n/no-mixed-requires': NoMixedRequiresRuleConfig$1;
}
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-new-require.md)
*/
type NoNewRequireRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-new-require.md)
*/
interface NoNewRequireRule$1 {
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-new-require.md)
*/
'n/no-new-require': NoNewRequireRuleConfig$1;
}
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-path-concat.md)
*/
type NoPathConcatRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-path-concat.md)
*/
interface NoPathConcatRule$1 {
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-path-concat.md)
*/
'n/no-path-concat': NoPathConcatRuleConfig$1;
}
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-env.md)
*/
type NoProcessEnvRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-env.md)
*/
interface NoProcessEnvRule$1 {
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-env.md)
*/
'n/no-process-env': NoProcessEnvRuleConfig$1;
}
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-exit.md)
*/
type NoProcessExitRuleConfig$2 = RuleConfig<[]>;
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-exit.md)
*/
interface NoProcessExitRule$2 {
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-process-exit.md)
*/
'n/no-process-exit': NoProcessExitRuleConfig$2;
}
/**
* Option.
*/
type NoRestrictedImportOption$1 = (
| string
| {
name: string | string[];
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedImportOptions$1 = [NoRestrictedImportOption$1?];
/**
* Disallow specified modules when loaded by `import` declarations.
*
* @see [no-restricted-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-import.md)
*/
type NoRestrictedImportRuleConfig$1 =
RuleConfig<NoRestrictedImportOptions$1>;
/**
* Disallow specified modules when loaded by `import` declarations.
*
* @see [no-restricted-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-import.md)
*/
interface NoRestrictedImportRule$1 {
/**
* Disallow specified modules when loaded by `import` declarations.
*
* @see [no-restricted-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-import.md)
*/
'n/no-restricted-import': NoRestrictedImportRuleConfig$1;
}
/**
* Option.
*/
type NoRestrictedRequireOption$1 = (
| string
| {
name: string | string[];
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedRequireOptions$1 = [NoRestrictedRequireOption$1?];
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-require.md)
*/
type NoRestrictedRequireRuleConfig$1 =
RuleConfig<NoRestrictedRequireOptions$1>;
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-require.md)
*/
interface NoRestrictedRequireRule$1 {
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-restricted-require.md)
*/
'n/no-restricted-require': NoRestrictedRequireRuleConfig$1;
}
/**
* Option.
*/
interface NoSyncOption$1 {
allowAtRootLevel?: boolean;
}
/**
* Options.
*/
type NoSyncOptions$1 = [NoSyncOption$1?];
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-sync.md)
*/
type NoSyncRuleConfig$1 = RuleConfig<NoSyncOptions$1>;
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-sync.md)
*/
interface NoSyncRule$1 {
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-sync.md)
*/
'n/no-sync': NoSyncRuleConfig$1;
}
/**
* Option.
*/
interface NoUnpublishedBinOption$1 {
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
[k: string]: any;
}
/**
* Options.
*/
type NoUnpublishedBinOptions$1 = [NoUnpublishedBinOption$1?];
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-bin.md)
*/
type NoUnpublishedBinRuleConfig$1 = RuleConfig<NoUnpublishedBinOptions$1>;
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-bin.md)
*/
interface NoUnpublishedBinRule$1 {
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-bin.md)
*/
'n/no-unpublished-bin': NoUnpublishedBinRuleConfig$1;
}
/**
* Option.
*/
interface NoUnpublishedImportOption$1 {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
ignoreTypeImport?: boolean;
}
/**
* Options.
*/
type NoUnpublishedImportOptions$1 = [NoUnpublishedImportOption$1?];
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-import.md)
*/
type NoUnpublishedImportRuleConfig$1 =
RuleConfig<NoUnpublishedImportOptions$1>;
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-import.md)
*/
interface NoUnpublishedImportRule$1 {
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-import.md)
*/
'n/no-unpublished-import': NoUnpublishedImportRuleConfig$1;
}
/**
* Option.
*/
interface NoUnpublishedRequireOption$1 {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoUnpublishedRequireOptions$1 = [NoUnpublishedRequireOption$1?];
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-require.md)
*/
type NoUnpublishedRequireRuleConfig$1 =
RuleConfig<NoUnpublishedRequireOptions$1>;
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-require.md)
*/
interface NoUnpublishedRequireRule$1 {
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unpublished-require.md)
*/
'n/no-unpublished-require': NoUnpublishedRequireRuleConfig$1;
}
/**
* Option.
*/
type NoUnsupportedFeaturesOption$2 =
| (0.1 | 0.12 | 4 | 5 | 6 | 6.5 | 7 | 7.6 | 8 | 8.3 | 9 | 10)
| string
| {
version?:
| (0.1 | 0.12 | 4 | 5 | 6 | 6.5 | 7 | 7.6 | 8 | 8.3 | 9 | 10)
| string;
ignores?: (
| 'syntax'
| 'defaultParameters'
| 'restParameters'
| 'spreadOperators'
| 'objectLiteralExtensions'
| 'objectPropertyShorthandOfGetSet'
| 'forOf'
| 'binaryNumberLiterals'
| 'octalNumberLiterals'
| 'templateStrings'
| 'regexpY'
| 'regexpU'
| 'destructuring'
| 'unicodeCodePointEscapes'
| 'new.target'
| 'const'
| 'let'
| 'blockScopedFunctions'
| 'arrowFunctions'
| 'generatorFunctions'
| 'classes'
| 'modules'
| 'exponentialOperators'
| 'asyncAwait'
| 'trailingCommasInFunctions'
| 'templateLiteralRevision'
| 'regexpS'
| 'regexpNamedCaptureGroups'
| 'regexpLookbehind'
| 'regexpUnicodeProperties'
| 'restProperties'
| 'spreadProperties'
| 'asyncGenerators'
| 'forAwaitOf'
| 'runtime'
| 'globalObjects'
| 'typedArrays'
| 'Int8Array'
| 'Uint8Array'
| 'Uint8ClampedArray'
| 'Int16Array'
| 'Uint16Array'
| 'Int32Array'
| 'Uint32Array'
| 'Float32Array'
| 'Float64Array'
| 'DataView'
| 'Map'
| 'Set'
| 'WeakMap'
| 'WeakSet'
| 'Proxy'
| 'Reflect'
| 'Promise'
| 'Symbol'
| 'SharedArrayBuffer'
| 'Atomics'
| 'staticMethods'
| 'Object.*'
| 'Object.assign'
| 'Object.is'
| 'Object.getOwnPropertySymbols'
| 'Object.setPrototypeOf'
| 'Object.values'
| 'Object.entries'
| 'Object.getOwnPropertyDescriptors'
| 'String.*'
| 'String.raw'
| 'String.fromCodePoint'
| 'Array.*'
| 'Array.from'
| 'Array.of'
| 'Number.*'
| 'Number.isFinite'
| 'Number.isInteger'
| 'Number.isSafeInteger'
| 'Number.isNaN'
| 'Number.EPSILON'
| 'Number.MIN_SAFE_INTEGER'
| 'Number.MAX_SAFE_INTEGER'
| 'Math.*'
| 'Math.clz32'
| 'Math.imul'
| 'Math.sign'
| 'Math.log10'
| 'Math.log2'
| 'Math.log1p'
| 'Math.expm1'
| 'Math.cosh'
| 'Math.sinh'
| 'Math.tanh'
| 'Math.acosh'
| 'Math.asinh'
| 'Math.atanh'
| 'Math.trunc'
| 'Math.fround'
| 'Math.cbrt'
| 'Math.hypot'
| 'Symbol.*'
| 'Symbol.hasInstance'
| 'Symbol.isConcatSpreadablec'
| 'Symbol.iterator'
| 'Symbol.species'
| 'Symbol.replace'
| 'Symbol.search'
| 'Symbol.split'
| 'Symbol.match'
| 'Symbol.toPrimitive'
| 'Symbol.toStringTag'
| 'Symbol.unscopables'
| 'Atomics.*'
| 'Atomics.add'
| 'Atomics.and'
| 'Atomics.compareExchange'
| 'Atomics.exchange'
| 'Atomics.wait'
| 'Atomics.wake'
| 'Atomics.isLockFree'
| 'Atomics.load'
| 'Atomics.or'
| 'Atomics.store'
| 'Atomics.sub'
| 'Atomics.xor'
| 'extends'
| 'extendsArray'
| 'extendsRegExp'
| 'extendsFunction'
| 'extendsPromise'
| 'extendsBoolean'
| 'extendsNumber'
| 'extendsString'
| 'extendsMap'
| 'extendsSet'
| 'extendsNull'
)[];
};
/**
* Options.
*/
type NoUnsupportedFeaturesOptions$2 = [NoUnsupportedFeaturesOption$2?];
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features.md)
*/
type NoUnsupportedFeaturesRuleConfig$2 =
RuleConfig<NoUnsupportedFeaturesOptions$2>;
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features.md)
*/
interface NoUnsupportedFeaturesRule$2 {
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features.md)
*/
'n/no-unsupported-features': NoUnsupportedFeaturesRuleConfig$2;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesEsBuiltinsOption$1 {
version?: string;
ignores?: (
| 'Array.from'
| 'Array.of'
| 'BigInt'
| 'Map'
| 'Math.acosh'
| 'Math.asinh'
| 'Math.atanh'
| 'Math.cbrt'
| 'Math.clz32'
| 'Math.cosh'
| 'Math.expm1'
| 'Math.fround'
| 'Math.hypot'
| 'Math.imul'
| 'Math.log10'
| 'Math.log1p'
| 'Math.log2'
| 'Math.sign'
| 'Math.sinh'
| 'Math.tanh'
| 'Math.trunc'
| 'Number.EPSILON'
| 'Number.isFinite'
| 'Number.isInteger'
| 'Number.isNaN'
| 'Number.isSafeInteger'
| 'Number.MAX_SAFE_INTEGER'
| 'Number.MIN_SAFE_INTEGER'
| 'Number.parseFloat'
| 'Number.parseInt'
| 'Object.assign'
| 'Object.fromEntries'
| 'Object.getOwnPropertySymbols'
| 'Object.is'
| 'Object.setPrototypeOf'
| 'Object.values'
| 'Object.entries'
| 'Object.getOwnPropertyDescriptors'
| 'Promise'
| 'Promise.allSettled'
| 'Proxy'
| 'Reflect'
| 'Set'
| 'String.fromCodePoint'
| 'String.raw'
| 'Symbol'
| 'Int8Array'
| 'Uint8Array'
| 'Uint8ClampedArray'
| 'Int16Array'
| 'Uint16Array'
| 'Int32Array'
| 'Uint32Array'
| 'BigInt64Array'
| 'BigUint64Array'
| 'Float32Array'
| 'Float64Array'
| 'DataView'
| 'WeakMap'
| 'WeakSet'
| 'Atomics'
| 'SharedArrayBuffer'
| 'globalThis'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesEsBuiltinsOptions$1 = [
NoUnsupportedFeaturesEsBuiltinsOption$1?,
];
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md)
*/
type NoUnsupportedFeaturesEsBuiltinsRuleConfig$1 =
RuleConfig<NoUnsupportedFeaturesEsBuiltinsOptions$1>;
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md)
*/
interface NoUnsupportedFeaturesEsBuiltinsRule$1 {
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-builtins.md)
*/
'n/no-unsupported-features/es-builtins': NoUnsupportedFeaturesEsBuiltinsRuleConfig$1;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesEsSyntaxOption$1 {
version?: string;
ignores?: (
| 'arrowFunctions'
| 'binaryNumericLiterals'
| 'blockScopedFunctions'
| 'blockScopedVariables'
| 'classes'
| 'computedProperties'
| 'defaultParameters'
| 'destructuring'
| 'forOfLoops'
| 'generators'
| 'modules'
| 'new.target'
| 'objectSuperProperties'
| 'octalNumericLiterals'
| 'propertyShorthands'
| 'regexpU'
| 'regexpY'
| 'restParameters'
| 'spreadElements'
| 'templateLiterals'
| 'unicodeCodePointEscapes'
| 'exponentialOperators'
| 'asyncFunctions'
| 'trailingCommasInFunctions'
| 'asyncIteration'
| 'malformedTemplateLiterals'
| 'regexpLookbehind'
| 'regexpNamedCaptureGroups'
| 'regexpS'
| 'regexpUnicodeProperties'
| 'restSpreadProperties'
| 'jsonSuperset'
| 'optionalCatchBinding'
| 'bigint'
| 'dynamicImport'
| 'optionalChaining'
| 'nullishCoalescingOperators'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesEsSyntaxOptions$1 = [
NoUnsupportedFeaturesEsSyntaxOption$1?,
];
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md)
*/
type NoUnsupportedFeaturesEsSyntaxRuleConfig$1 =
RuleConfig<NoUnsupportedFeaturesEsSyntaxOptions$1>;
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md)
*/
interface NoUnsupportedFeaturesEsSyntaxRule$1 {
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/es-syntax.md)
*/
'n/no-unsupported-features/es-syntax': NoUnsupportedFeaturesEsSyntaxRuleConfig$1;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesNodeBuiltinsOption$1 {
version?: string;
ignores?: (
| 'queueMicrotask'
| 'require.resolve.paths'
| 'Buffer.alloc'
| 'Buffer.allocUnsafe'
| 'Buffer.allocUnsafeSlow'
| 'Buffer.from'
| 'TextDecoder'
| 'TextEncoder'
| 'URL'
| 'URLSearchParams'
| 'console.clear'
| 'console.count'
| 'console.countReset'
| 'console.debug'
| 'console.dirxml'
| 'console.group'
| 'console.groupCollapsed'
| 'console.groupEnd'
| 'console.table'
| 'console.markTimeline'
| 'console.profile'
| 'console.profileEnd'
| 'console.timeLog'
| 'console.timeStamp'
| 'console.timeline'
| 'console.timelineEnd'
| 'process.allowedNodeEnvironmentFlags'
| 'process.argv0'
| 'process.channel'
| 'process.cpuUsage'
| 'process.emitWarning'
| 'process.getegid'
| 'process.geteuid'
| 'process.hasUncaughtExceptionCaptureCallback'
| 'process.hrtime.bigint'
| 'process.ppid'
| 'process.release'
| 'process.report'
| 'process.resourceUsage'
| 'process.setegid'
| 'process.seteuid'
| 'process.setUncaughtExceptionCaptureCallback'
| 'process.stdout.getColorDepth'
| 'process.stdout.hasColor'
| 'process.stderr.getColorDepth'
| 'process.stderr.hasColor'
| 'assert.strict'
| 'assert.strict.doesNotReject'
| 'assert.strict.rejects'
| 'assert.deepStrictEqual'
| 'assert.doesNotReject'
| 'assert.notDeepStrictEqual'
| 'assert.rejects'
| 'assert.CallTracker'
| 'async_hooks'
| 'async_hooks.createHook'
| 'async_hooks.AsyncLocalStorage'
| 'buffer.Buffer.alloc'
| 'buffer.Buffer.allocUnsafe'
| 'buffer.Buffer.allocUnsafeSlow'
| 'buffer.Buffer.from'
| 'buffer.kMaxLength'
| 'buffer.transcode'
| 'buffer.constants'
| 'buffer.Blob'
| 'child_process.ChildProcess'
| 'crypto.Certificate.exportChallenge'
| 'crypto.Certificate.exportPublicKey'
| 'crypto.Certificate.verifySpkac'
| 'crypto.ECDH'
| 'crypto.KeyObject'
| 'crypto.createPrivateKey'
| 'crypto.createPublicKey'
| 'crypto.createSecretKey'
| 'crypto.constants'
| 'crypto.fips'
| 'crypto.generateKeyPair'
| 'crypto.generateKeyPairSync'
| 'crypto.getCurves'
| 'crypto.getFips'
| 'crypto.privateEncrypt'
| 'crypto.publicDecrypt'
| 'crypto.randomFillSync'
| 'crypto.randomFill'
| 'crypto.scrypt'
| 'crypto.scryptSync'
| 'crypto.setFips'
| 'crypto.sign'
| 'crypto.timingSafeEqual'
| 'crypto.verify'
| 'dns.Resolver'
| 'dns.resolvePtr'
| 'dns.promises'
| 'events.EventEmitter.once'
| 'events.once'
| 'fs.Dirent'
| 'fs.copyFile'
| 'fs.copyFileSync'
| 'fs.mkdtemp'
| 'fs.mkdtempSync'
| 'fs.realpath.native'
| 'fs.realpathSync.native'
| 'fs.promises'
| 'fs.writev'
| 'fs.writevSync'
| 'fs.readv'
| 'fs.readvSync'
| 'fs.lutimes'
| 'fs.lutimesSync'
| 'fs.opendir'
| 'fs.opendirSync'
| 'fs.rm'
| 'fs.rmSync'
| 'fs.read'
| 'fs.readSync'
| 'fs.Dir'
| 'fs.StatWatcher'
| 'fs/promises'
| 'http2'
| 'inspector'
| 'module.Module.builtinModules'
| 'module.Module.createRequireFromPath'
| 'module.Module.createRequire'
| 'module.Module.syncBuiltinESMExports'
| 'module.builtinModules'
| 'module.createRequireFromPath'
| 'module.createRequire'
| 'module.syncBuiltinESMExports'
| 'os.constants'
| 'os.constants.priority'
| 'os.getPriority'
| 'os.homedir'
| 'os.setPriority'
| 'os.userInfo'
| 'path.toNamespacedPath'
| 'perf_hooks'
| 'perf_hooks.monitorEventLoopDelay'
| 'stream.Readable.from'
| 'stream.finished'
| 'stream.pipeline'
| 'trace_events'
| 'url.URL'
| 'url.URLSearchParams'
| 'url.domainToASCII'
| 'url.domainToUnicode'
| 'util.callbackify'
| 'util.formatWithOptions'
| 'util.getSystemErrorName'
| 'util.inspect.custom'
| 'util.inspect.defaultOptions'
| 'util.inspect.replDefaults'
| 'util.isDeepStrictEqual'
| 'util.promisify'
| 'util.TextDecoder'
| 'util.TextEncoder'
| 'util.types'
| 'util.types.isBoxedPrimitive'
| 'v8'
| 'v8.DefaultDeserializer'
| 'v8.DefaultSerializer'
| 'v8.Deserializer'
| 'v8.Serializer'
| 'v8.cachedDataVersionTag'
| 'v8.deserialize'
| 'v8.getHeapCodeStatistics'
| 'v8.getHeapSnapshot'
| 'v8.getHeapSpaceStatistics'
| 'v8.serialize'
| 'v8.writeHeapSnapshot'
| 'vm.Module'
| 'vm.compileFunction'
| 'worker_threads'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesNodeBuiltinsOptions$1 = [
NoUnsupportedFeaturesNodeBuiltinsOption$1?,
];
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md)
*/
type NoUnsupportedFeaturesNodeBuiltinsRuleConfig$1 =
RuleConfig<NoUnsupportedFeaturesNodeBuiltinsOptions$1>;
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md)
*/
interface NoUnsupportedFeaturesNodeBuiltinsRule$1 {
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md)
*/
'n/no-unsupported-features/node-builtins': NoUnsupportedFeaturesNodeBuiltinsRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalBufferOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalBufferOptions$1 = [PreferGlobalBufferOption$1?];
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/buffer.md)
*/
type PreferGlobalBufferRuleConfig$1 =
RuleConfig<PreferGlobalBufferOptions$1>;
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/buffer.md)
*/
interface PreferGlobalBufferRule$1 {
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/buffer.md)
*/
'n/prefer-global/buffer': PreferGlobalBufferRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalConsoleOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalConsoleOptions$1 = [PreferGlobalConsoleOption$1?];
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/console.md)
*/
type PreferGlobalConsoleRuleConfig$1 =
RuleConfig<PreferGlobalConsoleOptions$1>;
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/console.md)
*/
interface PreferGlobalConsoleRule$1 {
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/console.md)
*/
'n/prefer-global/console': PreferGlobalConsoleRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalProcessOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalProcessOptions$1 = [PreferGlobalProcessOption$1?];
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/process.md)
*/
type PreferGlobalProcessRuleConfig$1 =
RuleConfig<PreferGlobalProcessOptions$1>;
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/process.md)
*/
interface PreferGlobalProcessRule$1 {
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/process.md)
*/
'n/prefer-global/process': PreferGlobalProcessRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalTextDecoderOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalTextDecoderOptions$1 = [PreferGlobalTextDecoderOption$1?];
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-decoder.md)
*/
type PreferGlobalTextDecoderRuleConfig$1 =
RuleConfig<PreferGlobalTextDecoderOptions$1>;
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-decoder.md)
*/
interface PreferGlobalTextDecoderRule$1 {
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-decoder.md)
*/
'n/prefer-global/text-decoder': PreferGlobalTextDecoderRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalTextEncoderOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalTextEncoderOptions$1 = [PreferGlobalTextEncoderOption$1?];
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-encoder.md)
*/
type PreferGlobalTextEncoderRuleConfig$1 =
RuleConfig<PreferGlobalTextEncoderOptions$1>;
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-encoder.md)
*/
interface PreferGlobalTextEncoderRule$1 {
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/text-encoder.md)
*/
'n/prefer-global/text-encoder': PreferGlobalTextEncoderRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalUrlOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalUrlOptions$1 = [PreferGlobalUrlOption$1?];
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url.md)
*/
type PreferGlobalUrlRuleConfig$1 = RuleConfig<PreferGlobalUrlOptions$1>;
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url.md)
*/
interface PreferGlobalUrlRule$1 {
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url.md)
*/
'n/prefer-global/url': PreferGlobalUrlRuleConfig$1;
}
/**
* Option.
*/
type PreferGlobalUrlSearchParamsOption$1 = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalUrlSearchParamsOptions$1 = [
PreferGlobalUrlSearchParamsOption$1?,
];
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url-search-params.md)
*/
type PreferGlobalUrlSearchParamsRuleConfig$1 =
RuleConfig<PreferGlobalUrlSearchParamsOptions$1>;
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url-search-params.md)
*/
interface PreferGlobalUrlSearchParamsRule$1 {
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-global/url-search-params.md)
*/
'n/prefer-global/url-search-params': PreferGlobalUrlSearchParamsRuleConfig$1;
}
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/dns.md)
*/
type PreferPromisesDnsRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/dns.md)
*/
interface PreferPromisesDnsRule$1 {
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/dns.md)
*/
'n/prefer-promises/dns': PreferPromisesDnsRuleConfig$1;
}
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/fs.md)
*/
type PreferPromisesFsRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/fs.md)
*/
interface PreferPromisesFsRule$1 {
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/prefer-promises/fs.md)
*/
'n/prefer-promises/fs': PreferPromisesFsRuleConfig$1;
}
/**
* Require that `process.exit()` expressions use the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/process-exit-as-throw.md)
*/
type ProcessExitAsThrowRuleConfig$1 = RuleConfig<[]>;
/**
* Require that `process.exit()` expressions use the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/process-exit-as-throw.md)
*/
interface ProcessExitAsThrowRule$1 {
/**
* Require that `process.exit()` expressions use the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/process-exit-as-throw.md)
*/
'n/process-exit-as-throw': ProcessExitAsThrowRuleConfig$1;
}
/**
* Option.
*/
interface ShebangOption$1 {
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
}
/**
* Options.
*/
type ShebangOptions$1 = [ShebangOption$1?];
/**
* Require correct usage of shebang.
*
* @see [shebang](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/shebang.md)
*/
type ShebangRuleConfig$1 = RuleConfig<ShebangOptions$1>;
/**
* Require correct usage of shebang.
*
* @see [shebang](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/shebang.md)
*/
interface ShebangRule$1 {
/**
* Require correct usage of shebang.
*
* @see [shebang](https://github.com/weiran-zsd/eslint-plugin-node/blob/HEAD/docs/rules/shebang.md)
*/
'n/shebang': ShebangRuleConfig$1;
}
/**
* All N rules.
*/
type NRules = CallbackReturnRule$1 &
ExportsStyleRule$1 &
FileExtensionInImportRule$1 &
GlobalRequireRule$1 &
HandleCallbackErrRule$1 &
NoCallbackLiteralRule$1 &
NoDeprecatedApiRule$1 &
NoExportsAssignRule$1 &
NoExtraneousImportRule$1 &
NoExtraneousRequireRule$1 &
NoMissingImportRule$1 &
NoMissingRequireRule$1 &
NoMixedRequiresRule$1 &
NoNewRequireRule$1 &
NoPathConcatRule$1 &
NoProcessEnvRule$1 &
NoProcessExitRule$2 &
NoRestrictedImportRule$1 &
NoRestrictedRequireRule$1 &
NoSyncRule$1 &
NoUnpublishedBinRule$1 &
NoUnpublishedImportRule$1 &
NoUnpublishedRequireRule$1 &
NoUnsupportedFeaturesEsBuiltinsRule$1 &
NoUnsupportedFeaturesEsSyntaxRule$1 &
NoUnsupportedFeaturesNodeBuiltinsRule$1 &
PreferGlobalBufferRule$1 &
PreferGlobalConsoleRule$1 &
PreferGlobalProcessRule$1 &
PreferGlobalTextDecoderRule$1 &
PreferGlobalTextEncoderRule$1 &
PreferGlobalUrlSearchParamsRule$1 &
PreferGlobalUrlRule$1 &
PreferPromisesDnsRule$1 &
PreferPromisesFsRule$1 &
ProcessExitAsThrowRule$1 &
ShebangRule$1 &
NoHideCoreModulesRule$1 &
NoUnsupportedFeaturesRule$2;
/**
* Option.
*/
type CallbackReturnOption = string[];
/**
* Options.
*/
type CallbackReturnOptions = [CallbackReturnOption?];
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/callback-return.md)
*/
type CallbackReturnRuleConfig = RuleConfig<CallbackReturnOptions>;
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/callback-return.md)
*/
interface CallbackReturnRule {
/**
* Require `return` statements after callbacks.
*
* @see [callback-return](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/callback-return.md)
*/
'node/callback-return': CallbackReturnRuleConfig;
}
/**
* Config.
*/
interface ExportsStyleConfig {
allowBatchAssign?: boolean;
}
/**
* Option.
*/
type ExportsStyleOption = 'module.exports' | 'exports';
/**
* Options.
*/
type ExportsStyleOptions = [ExportsStyleOption?, ExportsStyleConfig?];
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/exports-style.md)
*/
type ExportsStyleRuleConfig = RuleConfig<ExportsStyleOptions>;
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/exports-style.md)
*/
interface ExportsStyleRule {
/**
* Enforce either `module.exports` or `exports`.
*
* @see [exports-style](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/exports-style.md)
*/
'node/exports-style': ExportsStyleRuleConfig;
}
/**
* Config.
*/
interface FileExtensionInImportConfig {
tryExtensions?: string[];
[ext: `.${string}`]: 'always' | 'never';
}
/**
* Option.
*/
type FileExtensionInImportOption = 'always' | 'never';
/**
* Options.
*/
type FileExtensionInImportOptions = [
FileExtensionInImportOption?,
FileExtensionInImportConfig?,
];
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/file-extension-in-import.md)
*/
type FileExtensionInImportRuleConfig =
RuleConfig<FileExtensionInImportOptions>;
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/file-extension-in-import.md)
*/
interface FileExtensionInImportRule {
/**
* Enforce the style of file extensions in `import` declarations.
*
* @see [file-extension-in-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/file-extension-in-import.md)
*/
'node/file-extension-in-import': FileExtensionInImportRuleConfig;
}
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/global-require.md)
*/
type GlobalRequireRuleConfig = RuleConfig<[]>;
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/global-require.md)
*/
interface GlobalRequireRule {
/**
* Require `require()` calls to be placed at top-level module scope.
*
* @see [global-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/global-require.md)
*/
'node/global-require': GlobalRequireRuleConfig;
}
/**
* Option.
*/
type HandleCallbackErrOption = string;
/**
* Options.
*/
type HandleCallbackErrOptions = [HandleCallbackErrOption?];
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/handle-callback-err.md)
*/
type HandleCallbackErrRuleConfig = RuleConfig<HandleCallbackErrOptions>;
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/handle-callback-err.md)
*/
interface HandleCallbackErrRule {
/**
* Require error handling in callbacks.
*
* @see [handle-callback-err](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/handle-callback-err.md)
*/
'node/handle-callback-err': HandleCallbackErrRuleConfig;
}
/**
* Ensure Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md)
*/
type NoCallbackLiteralRuleConfig = RuleConfig<[]>;
/**
* Ensure Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md)
*/
interface NoCallbackLiteralRule {
/**
* Ensure Node.js-style error-first callback pattern is followed.
*
* @see [no-callback-literal](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md)
*/
'node/no-callback-literal': NoCallbackLiteralRuleConfig;
}
/**
* Option.
*/
interface NoDeprecatedApiOption {
version?: string;
ignoreModuleItems?: (
| '_linklist'
| '_stream_wrap'
| 'async_hooks.currentId'
| 'async_hooks.triggerId'
| 'buffer.Buffer()'
| 'new buffer.Buffer()'
| 'buffer.SlowBuffer'
| 'constants'
| 'crypto._toBuf'
| 'crypto.Credentials'
| 'crypto.DEFAULT_ENCODING'
| 'crypto.createCipher'
| 'crypto.createCredentials'
| 'crypto.createDecipher'
| 'crypto.fips'
| 'crypto.prng'
| 'crypto.pseudoRandomBytes'
| 'crypto.rng'
| 'domain'
| 'events.EventEmitter.listenerCount'
| 'events.listenerCount'
| 'freelist'
| 'fs.SyncWriteStream'
| 'fs.exists'
| 'fs.lchmod'
| 'fs.lchmodSync'
| 'http.createClient'
| 'module.Module.createRequireFromPath'
| 'module.Module.requireRepl'
| 'module.Module._debug'
| 'module.createRequireFromPath'
| 'module.requireRepl'
| 'module._debug'
| 'net._setSimultaneousAccepts'
| 'os.getNetworkInterfaces'
| 'os.tmpDir'
| 'path._makeLong'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
| 'punycode'
| 'readline.codePointAt'
| 'readline.getStringWidth'
| 'readline.isFullWidthCodePoint'
| 'readline.stripVTControlCharacters'
| 'safe-buffer.Buffer()'
| 'new safe-buffer.Buffer()'
| 'safe-buffer.SlowBuffer'
| 'sys'
| 'timers.enroll'
| 'timers.unenroll'
| 'tls.CleartextStream'
| 'tls.CryptoStream'
| 'tls.SecurePair'
| 'tls.convertNPNProtocols'
| 'tls.createSecurePair'
| 'tls.parseCertString'
| 'tty.setRawMode'
| 'url.parse'
| 'url.resolve'
| 'util.debug'
| 'util.error'
| 'util.isArray'
| 'util.isBoolean'
| 'util.isBuffer'
| 'util.isDate'
| 'util.isError'
| 'util.isFunction'
| 'util.isNull'
| 'util.isNullOrUndefined'
| 'util.isNumber'
| 'util.isObject'
| 'util.isPrimitive'
| 'util.isRegExp'
| 'util.isString'
| 'util.isSymbol'
| 'util.isUndefined'
| 'util.log'
| 'util.print'
| 'util.pump'
| 'util.puts'
| 'util._extend'
| 'vm.runInDebugContext'
)[];
ignoreGlobalItems?: (
| 'Buffer()'
| 'new Buffer()'
| 'COUNTER_NET_SERVER_CONNECTION'
| 'COUNTER_NET_SERVER_CONNECTION_CLOSE'
| 'COUNTER_HTTP_SERVER_REQUEST'
| 'COUNTER_HTTP_SERVER_RESPONSE'
| 'COUNTER_HTTP_CLIENT_REQUEST'
| 'COUNTER_HTTP_CLIENT_RESPONSE'
| 'GLOBAL'
| 'Intl.v8BreakIterator'
| 'require.extensions'
| 'root'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
)[];
ignoreIndirectDependencies?: boolean;
}
/**
* Options.
*/
type NoDeprecatedApiOptions = [NoDeprecatedApiOption?];
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/
type NoDeprecatedApiRuleConfig = RuleConfig<NoDeprecatedApiOptions>;
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/
interface NoDeprecatedApiRule {
/**
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/
'node/no-deprecated-api': NoDeprecatedApiRuleConfig;
}
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-exports-assign.md)
*/
type NoExportsAssignRuleConfig = RuleConfig<[]>;
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-exports-assign.md)
*/
interface NoExportsAssignRule {
/**
* Disallow the assignment to `exports`.
*
* @see [no-exports-assign](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-exports-assign.md)
*/
'node/no-exports-assign': NoExportsAssignRuleConfig;
}
/**
* Option.
*/
interface NoExtraneousImportOption {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoExtraneousImportOptions = [NoExtraneousImportOption?];
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/
type NoExtraneousImportRuleConfig =
RuleConfig<NoExtraneousImportOptions>;
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/
interface NoExtraneousImportRule {
/**
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/
'node/no-extraneous-import': NoExtraneousImportRuleConfig;
}
/**
* Option.
*/
interface NoExtraneousRequireOption {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoExtraneousRequireOptions = [NoExtraneousRequireOption?];
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/
type NoExtraneousRequireRuleConfig =
RuleConfig<NoExtraneousRequireOptions>;
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/
interface NoExtraneousRequireRule {
/**
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/
'node/no-extraneous-require': NoExtraneousRequireRuleConfig;
}
/**
* Option.
*/
interface NoHideCoreModulesOption {
allow?: (
| 'assert'
| 'buffer'
| 'child_process'
| 'cluster'
| 'console'
| 'constants'
| 'crypto'
| 'dgram'
| 'dns'
| 'events'
| 'fs'
| 'http'
| 'https'
| 'module'
| 'net'
| 'os'
| 'path'
| 'querystring'
| 'readline'
| 'repl'
| 'stream'
| 'string_decoder'
| 'timers'
| 'tls'
| 'tty'
| 'url'
| 'util'
| 'vm'
| 'zlib'
)[];
ignoreDirectDependencies?: boolean;
ignoreIndirectDependencies?: boolean;
}
/**
* Options.
*/
type NoHideCoreModulesOptions = [NoHideCoreModulesOption?];
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-hide-core-modules.md)
*/
type NoHideCoreModulesRuleConfig = RuleConfig<NoHideCoreModulesOptions>;
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-hide-core-modules.md)
*/
interface NoHideCoreModulesRule {
/**
* Disallow third-party modules which are hiding core modules.
*
* @deprecated
*
* @see [no-hide-core-modules](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-hide-core-modules.md)
*/
'node/no-hide-core-modules': NoHideCoreModulesRuleConfig;
}
/**
* Option.
*/
interface NoMissingImportOption {
allowModules?: string[];
tryExtensions?: string[];
resolvePaths?: string[];
}
/**
* Options.
*/
type NoMissingImportOptions = [NoMissingImportOption?];
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/
type NoMissingImportRuleConfig = RuleConfig<NoMissingImportOptions>;
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/
interface NoMissingImportRule {
/**
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/
'node/no-missing-import': NoMissingImportRuleConfig;
}
/**
* Option.
*/
interface NoMissingRequireOption {
allowModules?: string[];
tryExtensions?: string[];
resolvePaths?: string[];
}
/**
* Options.
*/
type NoMissingRequireOptions = [NoMissingRequireOption?];
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/
type NoMissingRequireRuleConfig = RuleConfig<NoMissingRequireOptions>;
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/
interface NoMissingRequireRule {
/**
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/
'node/no-missing-require': NoMissingRequireRuleConfig;
}
/**
* Option.
*/
type NoMixedRequiresOption =
| boolean
| {
grouping?: boolean;
allowCall?: boolean;
};
/**
* Options.
*/
type NoMixedRequiresOptions = [NoMixedRequiresOption?];
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-mixed-requires.md)
*/
type NoMixedRequiresRuleConfig = RuleConfig<NoMixedRequiresOptions>;
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-mixed-requires.md)
*/
interface NoMixedRequiresRule {
/**
* Disallow `require` calls to be mixed with regular variable declarations.
*
* @see [no-mixed-requires](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-mixed-requires.md)
*/
'node/no-mixed-requires': NoMixedRequiresRuleConfig;
}
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-new-require.md)
*/
type NoNewRequireRuleConfig = RuleConfig<[]>;
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-new-require.md)
*/
interface NoNewRequireRule {
/**
* Disallow `new` operators with calls to `require`.
*
* @see [no-new-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-new-require.md)
*/
'node/no-new-require': NoNewRequireRuleConfig;
}
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-path-concat.md)
*/
type NoPathConcatRuleConfig = RuleConfig<[]>;
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-path-concat.md)
*/
interface NoPathConcatRule {
/**
* Disallow string concatenation with `__dirname` and `__filename`.
*
* @see [no-path-concat](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-path-concat.md)
*/
'node/no-path-concat': NoPathConcatRuleConfig;
}
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-env.md)
*/
type NoProcessEnvRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-env.md)
*/
interface NoProcessEnvRule {
/**
* Disallow the use of `process.env`.
*
* @see [no-process-env](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-env.md)
*/
'node/no-process-env': NoProcessEnvRuleConfig;
}
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/
type NoProcessExitRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/
interface NoProcessExitRule$1 {
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/
'node/no-process-exit': NoProcessExitRuleConfig$1;
}
/**
* Option.
*/
type NoRestrictedImportOption = (
| string
| {
name: string | string[];
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedImportOptions = [NoRestrictedImportOption?];
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-import.md)
*/
type NoRestrictedImportRuleConfig =
RuleConfig<NoRestrictedImportOptions>;
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-import.md)
*/
interface NoRestrictedImportRule {
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-import.md)
*/
'node/no-restricted-import': NoRestrictedImportRuleConfig;
}
/**
* Option.
*/
type NoRestrictedRequireOption = (
| string
| {
name: string | string[];
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedRequireOptions = [NoRestrictedRequireOption?];
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/
type NoRestrictedRequireRuleConfig =
RuleConfig<NoRestrictedRequireOptions>;
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/
interface NoRestrictedRequireRule {
/**
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/
'node/no-restricted-require': NoRestrictedRequireRuleConfig;
}
/**
* Option.
*/
interface NoSyncOption {
allowAtRootLevel?: boolean;
}
/**
* Options.
*/
type NoSyncOptions = [NoSyncOption?];
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-sync.md)
*/
type NoSyncRuleConfig = RuleConfig<NoSyncOptions>;
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-sync.md)
*/
interface NoSyncRule {
/**
* Disallow synchronous methods.
*
* @see [no-sync](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-sync.md)
*/
'node/no-sync': NoSyncRuleConfig;
}
/**
* Option.
*/
interface NoUnpublishedBinOption {
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
[k: string]: any;
}
/**
* Options.
*/
type NoUnpublishedBinOptions = [NoUnpublishedBinOption?];
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-bin.md)
*/
type NoUnpublishedBinRuleConfig = RuleConfig<NoUnpublishedBinOptions>;
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-bin.md)
*/
interface NoUnpublishedBinRule {
/**
* Disallow `bin` files that npm ignores.
*
* @see [no-unpublished-bin](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-bin.md)
*/
'node/no-unpublished-bin': NoUnpublishedBinRuleConfig;
}
/**
* Option.
*/
interface NoUnpublishedImportOption {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoUnpublishedImportOptions = [NoUnpublishedImportOption?];
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/
type NoUnpublishedImportRuleConfig =
RuleConfig<NoUnpublishedImportOptions>;
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/
interface NoUnpublishedImportRule {
/**
* Disallow `import` declarations which import private modules.
*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/
'node/no-unpublished-import': NoUnpublishedImportRuleConfig;
}
/**
* Option.
*/
interface NoUnpublishedRequireOption {
allowModules?: string[];
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Options.
*/
type NoUnpublishedRequireOptions = [NoUnpublishedRequireOption?];
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/
type NoUnpublishedRequireRuleConfig =
RuleConfig<NoUnpublishedRequireOptions>;
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/
interface NoUnpublishedRequireRule {
/**
* Disallow `require()` expressions which import private modules.
*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/
'node/no-unpublished-require': NoUnpublishedRequireRuleConfig;
}
/**
* Option.
*/
type NoUnsupportedFeaturesOption$1 =
| (0.1 | 0.12 | 4 | 5 | 6 | 6.5 | 7 | 7.6 | 8 | 8.3 | 9 | 10)
| string
| {
version?:
| (0.1 | 0.12 | 4 | 5 | 6 | 6.5 | 7 | 7.6 | 8 | 8.3 | 9 | 10)
| string;
ignores?: (
| 'syntax'
| 'defaultParameters'
| 'restParameters'
| 'spreadOperators'
| 'objectLiteralExtensions'
| 'objectPropertyShorthandOfGetSet'
| 'forOf'
| 'binaryNumberLiterals'
| 'octalNumberLiterals'
| 'templateStrings'
| 'regexpY'
| 'regexpU'
| 'destructuring'
| 'unicodeCodePointEscapes'
| 'new.target'
| 'const'
| 'let'
| 'blockScopedFunctions'
| 'arrowFunctions'
| 'generatorFunctions'
| 'classes'
| 'modules'
| 'exponentialOperators'
| 'asyncAwait'
| 'trailingCommasInFunctions'
| 'templateLiteralRevision'
| 'regexpS'
| 'regexpNamedCaptureGroups'
| 'regexpLookbehind'
| 'regexpUnicodeProperties'
| 'restProperties'
| 'spreadProperties'
| 'asyncGenerators'
| 'forAwaitOf'
| 'runtime'
| 'globalObjects'
| 'typedArrays'
| 'Int8Array'
| 'Uint8Array'
| 'Uint8ClampedArray'
| 'Int16Array'
| 'Uint16Array'
| 'Int32Array'
| 'Uint32Array'
| 'Float32Array'
| 'Float64Array'
| 'DataView'
| 'Map'
| 'Set'
| 'WeakMap'
| 'WeakSet'
| 'Proxy'
| 'Reflect'
| 'Promise'
| 'Symbol'
| 'SharedArrayBuffer'
| 'Atomics'
| 'staticMethods'
| 'Object.*'
| 'Object.assign'
| 'Object.is'
| 'Object.getOwnPropertySymbols'
| 'Object.setPrototypeOf'
| 'Object.values'
| 'Object.entries'
| 'Object.getOwnPropertyDescriptors'
| 'String.*'
| 'String.raw'
| 'String.fromCodePoint'
| 'Array.*'
| 'Array.from'
| 'Array.of'
| 'Number.*'
| 'Number.isFinite'
| 'Number.isInteger'
| 'Number.isSafeInteger'
| 'Number.isNaN'
| 'Number.EPSILON'
| 'Number.MIN_SAFE_INTEGER'
| 'Number.MAX_SAFE_INTEGER'
| 'Math.*'
| 'Math.clz32'
| 'Math.imul'
| 'Math.sign'
| 'Math.log10'
| 'Math.log2'
| 'Math.log1p'
| 'Math.expm1'
| 'Math.cosh'
| 'Math.sinh'
| 'Math.tanh'
| 'Math.acosh'
| 'Math.asinh'
| 'Math.atanh'
| 'Math.trunc'
| 'Math.fround'
| 'Math.cbrt'
| 'Math.hypot'
| 'Symbol.*'
| 'Symbol.hasInstance'
| 'Symbol.isConcatSpreadablec'
| 'Symbol.iterator'
| 'Symbol.species'
| 'Symbol.replace'
| 'Symbol.search'
| 'Symbol.split'
| 'Symbol.match'
| 'Symbol.toPrimitive'
| 'Symbol.toStringTag'
| 'Symbol.unscopables'
| 'Atomics.*'
| 'Atomics.add'
| 'Atomics.and'
| 'Atomics.compareExchange'
| 'Atomics.exchange'
| 'Atomics.wait'
| 'Atomics.wake'
| 'Atomics.isLockFree'
| 'Atomics.load'
| 'Atomics.or'
| 'Atomics.store'
| 'Atomics.sub'
| 'Atomics.xor'
| 'extends'
| 'extendsArray'
| 'extendsRegExp'
| 'extendsFunction'
| 'extendsPromise'
| 'extendsBoolean'
| 'extendsNumber'
| 'extendsString'
| 'extendsMap'
| 'extendsSet'
| 'extendsNull'
)[];
};
/**
* Options.
*/
type NoUnsupportedFeaturesOptions$1 = [NoUnsupportedFeaturesOption$1?];
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features.md)
*/
type NoUnsupportedFeaturesRuleConfig$1 =
RuleConfig<NoUnsupportedFeaturesOptions$1>;
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features.md)
*/
interface NoUnsupportedFeaturesRule$1 {
/**
* Disallow unsupported ECMAScript features on the specified version.
*
* @deprecated
*
* @see [no-unsupported-features](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features.md)
*/
'node/no-unsupported-features': NoUnsupportedFeaturesRuleConfig$1;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesEsBuiltinsOption {
version?: string;
ignores?: (
| 'Array.from'
| 'Array.of'
| 'BigInt'
| 'Map'
| 'Math.acosh'
| 'Math.asinh'
| 'Math.atanh'
| 'Math.cbrt'
| 'Math.clz32'
| 'Math.cosh'
| 'Math.expm1'
| 'Math.fround'
| 'Math.hypot'
| 'Math.imul'
| 'Math.log10'
| 'Math.log1p'
| 'Math.log2'
| 'Math.sign'
| 'Math.sinh'
| 'Math.tanh'
| 'Math.trunc'
| 'Number.EPSILON'
| 'Number.isFinite'
| 'Number.isInteger'
| 'Number.isNaN'
| 'Number.isSafeInteger'
| 'Number.MAX_SAFE_INTEGER'
| 'Number.MIN_SAFE_INTEGER'
| 'Number.parseFloat'
| 'Number.parseInt'
| 'Object.assign'
| 'Object.fromEntries'
| 'Object.getOwnPropertySymbols'
| 'Object.is'
| 'Object.setPrototypeOf'
| 'Object.values'
| 'Object.entries'
| 'Object.getOwnPropertyDescriptors'
| 'Promise'
| 'Promise.allSettled'
| 'Proxy'
| 'Reflect'
| 'Set'
| 'String.fromCodePoint'
| 'String.raw'
| 'Symbol'
| 'Int8Array'
| 'Uint8Array'
| 'Uint8ClampedArray'
| 'Int16Array'
| 'Uint16Array'
| 'Int32Array'
| 'Uint32Array'
| 'BigInt64Array'
| 'BigUint64Array'
| 'Float32Array'
| 'Float64Array'
| 'DataView'
| 'WeakMap'
| 'WeakSet'
| 'Atomics'
| 'SharedArrayBuffer'
| 'globalThis'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesEsBuiltinsOptions = [
NoUnsupportedFeaturesEsBuiltinsOption?,
];
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-builtins.md)
*/
type NoUnsupportedFeaturesEsBuiltinsRuleConfig =
RuleConfig<NoUnsupportedFeaturesEsBuiltinsOptions>;
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-builtins.md)
*/
interface NoUnsupportedFeaturesEsBuiltinsRule {
/**
* Disallow unsupported ECMAScript built-ins on the specified version.
*
* @see [no-unsupported-features/es-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-builtins.md)
*/
'node/no-unsupported-features/es-builtins': NoUnsupportedFeaturesEsBuiltinsRuleConfig;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesEsSyntaxOption {
version?: string;
ignores?: (
| 'arrowFunctions'
| 'binaryNumericLiterals'
| 'blockScopedFunctions'
| 'blockScopedVariables'
| 'classes'
| 'computedProperties'
| 'defaultParameters'
| 'destructuring'
| 'forOfLoops'
| 'generators'
| 'modules'
| 'new.target'
| 'objectSuperProperties'
| 'octalNumericLiterals'
| 'propertyShorthands'
| 'regexpU'
| 'regexpY'
| 'restParameters'
| 'spreadElements'
| 'templateLiterals'
| 'unicodeCodePointEscapes'
| 'exponentialOperators'
| 'asyncFunctions'
| 'trailingCommasInFunctions'
| 'asyncIteration'
| 'malformedTemplateLiterals'
| 'regexpLookbehind'
| 'regexpNamedCaptureGroups'
| 'regexpS'
| 'regexpUnicodeProperties'
| 'restSpreadProperties'
| 'jsonSuperset'
| 'optionalCatchBinding'
| 'bigint'
| 'dynamicImport'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesEsSyntaxOptions = [
NoUnsupportedFeaturesEsSyntaxOption?,
];
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
type NoUnsupportedFeaturesEsSyntaxRuleConfig =
RuleConfig<NoUnsupportedFeaturesEsSyntaxOptions>;
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
interface NoUnsupportedFeaturesEsSyntaxRule {
/**
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
'node/no-unsupported-features/es-syntax': NoUnsupportedFeaturesEsSyntaxRuleConfig;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesNodeBuiltinsOption {
version?: string;
ignores?: (
| 'queueMicrotask'
| 'require.resolve.paths'
| 'Buffer.alloc'
| 'Buffer.allocUnsafe'
| 'Buffer.allocUnsafeSlow'
| 'Buffer.from'
| 'TextDecoder'
| 'TextEncoder'
| 'URL'
| 'URLSearchParams'
| 'console.clear'
| 'console.count'
| 'console.countReset'
| 'console.debug'
| 'console.dirxml'
| 'console.group'
| 'console.groupCollapsed'
| 'console.groupEnd'
| 'console.table'
| 'console.markTimeline'
| 'console.profile'
| 'console.profileEnd'
| 'console.timeLog'
| 'console.timeStamp'
| 'console.timeline'
| 'console.timelineEnd'
| 'process.allowedNodeEnvironmentFlags'
| 'process.argv0'
| 'process.channel'
| 'process.cpuUsage'
| 'process.emitWarning'
| 'process.getegid'
| 'process.geteuid'
| 'process.hasUncaughtExceptionCaptureCallback'
| 'process.hrtime.bigint'
| 'process.ppid'
| 'process.release'
| 'process.report'
| 'process.resourceUsage'
| 'process.setegid'
| 'process.seteuid'
| 'process.setUncaughtExceptionCaptureCallback'
| 'process.stdout.getColorDepth'
| 'process.stdout.hasColor'
| 'process.stderr.getColorDepth'
| 'process.stderr.hasColor'
| 'assert.strict'
| 'assert.strict.doesNotReject'
| 'assert.strict.rejects'
| 'assert.deepStrictEqual'
| 'assert.doesNotReject'
| 'assert.notDeepStrictEqual'
| 'assert.rejects'
| 'async_hooks'
| 'async_hooks.createHook'
| 'buffer.Buffer.alloc'
| 'buffer.Buffer.allocUnsafe'
| 'buffer.Buffer.allocUnsafeSlow'
| 'buffer.Buffer.from'
| 'buffer.kMaxLength'
| 'buffer.transcode'
| 'buffer.constants'
| 'child_process.ChildProcess'
| 'crypto.Certificate.exportChallenge'
| 'crypto.Certificate.exportPublicKey'
| 'crypto.Certificate.verifySpkac'
| 'crypto.ECDH'
| 'crypto.KeyObject'
| 'crypto.createPrivateKey'
| 'crypto.createPublicKey'
| 'crypto.createSecretKey'
| 'crypto.constants'
| 'crypto.fips'
| 'crypto.generateKeyPair'
| 'crypto.generateKeyPairSync'
| 'crypto.getCurves'
| 'crypto.getFips'
| 'crypto.privateEncrypt'
| 'crypto.publicDecrypt'
| 'crypto.randomFillSync'
| 'crypto.randomFill'
| 'crypto.scrypt'
| 'crypto.scryptSync'
| 'crypto.setFips'
| 'crypto.sign'
| 'crypto.timingSafeEqual'
| 'crypto.verify'
| 'dns.Resolver'
| 'dns.resolvePtr'
| 'dns.promises'
| 'events.EventEmitter.once'
| 'events.once'
| 'fs.Dirent'
| 'fs.copyFile'
| 'fs.copyFileSync'
| 'fs.mkdtemp'
| 'fs.mkdtempSync'
| 'fs.realpath.native'
| 'fs.realpathSync.native'
| 'fs.promises'
| 'fs.writev'
| 'fs.writevSync'
| 'http2'
| 'inspector'
| 'module.Module.builtinModules'
| 'module.Module.createRequireFromPath'
| 'module.Module.createRequire'
| 'module.Module.syncBuiltinESMExports'
| 'module.builtinModules'
| 'module.createRequireFromPath'
| 'module.createRequire'
| 'module.syncBuiltinESMExports'
| 'os.constants'
| 'os.constants.priority'
| 'os.getPriority'
| 'os.homedir'
| 'os.setPriority'
| 'os.userInfo'
| 'path.toNamespacedPath'
| 'perf_hooks'
| 'perf_hooks.monitorEventLoopDelay'
| 'stream.Readable.from'
| 'stream.finished'
| 'stream.pipeline'
| 'trace_events'
| 'url.URL'
| 'url.URLSearchParams'
| 'url.domainToASCII'
| 'url.domainToUnicode'
| 'util.callbackify'
| 'util.formatWithOptions'
| 'util.getSystemErrorName'
| 'util.inspect.custom'
| 'util.inspect.defaultOptions'
| 'util.inspect.replDefaults'
| 'util.isDeepStrictEqual'
| 'util.promisify'
| 'util.TextDecoder'
| 'util.TextEncoder'
| 'util.types'
| 'util.types.isBoxedPrimitive'
| 'v8'
| 'v8.DefaultDeserializer'
| 'v8.DefaultSerializer'
| 'v8.Deserializer'
| 'v8.Serializer'
| 'v8.cachedDataVersionTag'
| 'v8.deserialize'
| 'v8.getHeapCodeStatistics'
| 'v8.getHeapSnapshot'
| 'v8.getHeapSpaceStatistics'
| 'v8.serialize'
| 'v8.writeHeapSnapshot'
| 'vm.Module'
| 'vm.compileFunction'
| 'worker_threads'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesNodeBuiltinsOptions = [
NoUnsupportedFeaturesNodeBuiltinsOption?,
];
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/node-builtins.md)
*/
type NoUnsupportedFeaturesNodeBuiltinsRuleConfig =
RuleConfig<NoUnsupportedFeaturesNodeBuiltinsOptions>;
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/node-builtins.md)
*/
interface NoUnsupportedFeaturesNodeBuiltinsRule {
/**
* Disallow unsupported Node.js built-in APIs on the specified version.
*
* @see [no-unsupported-features/node-builtins](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/node-builtins.md)
*/
'node/no-unsupported-features/node-builtins': NoUnsupportedFeaturesNodeBuiltinsRuleConfig;
}
/**
* Option.
*/
type PreferGlobalBufferOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalBufferOptions = [PreferGlobalBufferOption?];
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/buffer.md)
*/
type PreferGlobalBufferRuleConfig =
RuleConfig<PreferGlobalBufferOptions>;
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/buffer.md)
*/
interface PreferGlobalBufferRule {
/**
* Enforce either `Buffer` or `require("buffer").Buffer`.
*
* @see [prefer-global/buffer](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/buffer.md)
*/
'node/prefer-global/buffer': PreferGlobalBufferRuleConfig;
}
/**
* Option.
*/
type PreferGlobalConsoleOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalConsoleOptions = [PreferGlobalConsoleOption?];
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/console.md)
*/
type PreferGlobalConsoleRuleConfig =
RuleConfig<PreferGlobalConsoleOptions>;
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/console.md)
*/
interface PreferGlobalConsoleRule {
/**
* Enforce either `console` or `require("console")`.
*
* @see [prefer-global/console](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/console.md)
*/
'node/prefer-global/console': PreferGlobalConsoleRuleConfig;
}
/**
* Option.
*/
type PreferGlobalProcessOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalProcessOptions = [PreferGlobalProcessOption?];
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/process.md)
*/
type PreferGlobalProcessRuleConfig =
RuleConfig<PreferGlobalProcessOptions>;
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/process.md)
*/
interface PreferGlobalProcessRule {
/**
* Enforce either `process` or `require("process")`.
*
* @see [prefer-global/process](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/process.md)
*/
'node/prefer-global/process': PreferGlobalProcessRuleConfig;
}
/**
* Option.
*/
type PreferGlobalTextDecoderOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalTextDecoderOptions = [PreferGlobalTextDecoderOption?];
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-decoder.md)
*/
type PreferGlobalTextDecoderRuleConfig =
RuleConfig<PreferGlobalTextDecoderOptions>;
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-decoder.md)
*/
interface PreferGlobalTextDecoderRule {
/**
* Enforce either `TextDecoder` or `require("util").TextDecoder`.
*
* @see [prefer-global/text-decoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-decoder.md)
*/
'node/prefer-global/text-decoder': PreferGlobalTextDecoderRuleConfig;
}
/**
* Option.
*/
type PreferGlobalTextEncoderOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalTextEncoderOptions = [PreferGlobalTextEncoderOption?];
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-encoder.md)
*/
type PreferGlobalTextEncoderRuleConfig =
RuleConfig<PreferGlobalTextEncoderOptions>;
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-encoder.md)
*/
interface PreferGlobalTextEncoderRule {
/**
* Enforce either `TextEncoder` or `require("util").TextEncoder`.
*
* @see [prefer-global/text-encoder](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-encoder.md)
*/
'node/prefer-global/text-encoder': PreferGlobalTextEncoderRuleConfig;
}
/**
* Option.
*/
type PreferGlobalUrlOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalUrlOptions = [PreferGlobalUrlOption?];
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url.md)
*/
type PreferGlobalUrlRuleConfig = RuleConfig<PreferGlobalUrlOptions>;
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url.md)
*/
interface PreferGlobalUrlRule {
/**
* Enforce either `URL` or `require("url").URL`.
*
* @see [prefer-global/url](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url.md)
*/
'node/prefer-global/url': PreferGlobalUrlRuleConfig;
}
/**
* Option.
*/
type PreferGlobalUrlSearchParamsOption = 'always' | 'never';
/**
* Options.
*/
type PreferGlobalUrlSearchParamsOptions = [
PreferGlobalUrlSearchParamsOption?,
];
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url-search-params.md)
*/
type PreferGlobalUrlSearchParamsRuleConfig =
RuleConfig<PreferGlobalUrlSearchParamsOptions>;
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url-search-params.md)
*/
interface PreferGlobalUrlSearchParamsRule {
/**
* Enforce either `URLSearchParams` or `require("url").URLSearchParams`.
*
* @see [prefer-global/url-search-params](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/url-search-params.md)
*/
'node/prefer-global/url-search-params': PreferGlobalUrlSearchParamsRuleConfig;
}
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/dns.md)
*/
type PreferPromisesDnsRuleConfig = RuleConfig<[]>;
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/dns.md)
*/
interface PreferPromisesDnsRule {
/**
* Enforce `require("dns").promises`.
*
* @see [prefer-promises/dns](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/dns.md)
*/
'node/prefer-promises/dns': PreferPromisesDnsRuleConfig;
}
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/fs.md)
*/
type PreferPromisesFsRuleConfig = RuleConfig<[]>;
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/fs.md)
*/
interface PreferPromisesFsRule {
/**
* Enforce `require("fs").promises`.
*
* @see [prefer-promises/fs](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-promises/fs.md)
*/
'node/prefer-promises/fs': PreferPromisesFsRuleConfig;
}
/**
* Make `process.exit()` expressions the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/process-exit-as-throw.md)
*/
type ProcessExitAsThrowRuleConfig = RuleConfig<[]>;
/**
* Make `process.exit()` expressions the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/process-exit-as-throw.md)
*/
interface ProcessExitAsThrowRule {
/**
* Make `process.exit()` expressions the same code path as `throw`.
*
* @see [process-exit-as-throw](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/process-exit-as-throw.md)
*/
'node/process-exit-as-throw': ProcessExitAsThrowRuleConfig;
}
/**
* Option.
*/
interface ShebangOption {
convertPath?:
| {
/**
* @minItems 2
* @maxItems 2
*
*/
[k: string]: [string, string];
}
| [
{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
},
...{
/**
* @minItems 1
*/
include: [string, ...string[]];
exclude?: string[];
/**
* @minItems 2
* @maxItems 2
*/
replace: [string, string];
}[],
];
}
/**
* Options.
*/
type ShebangOptions = [ShebangOption?];
/**
* Suggest correct usage of shebang.
*
* @see [shebang](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/shebang.md)
*/
type ShebangRuleConfig = RuleConfig<ShebangOptions>;
/**
* Suggest correct usage of shebang.
*
* @see [shebang](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/shebang.md)
*/
interface ShebangRule {
/**
* Suggest correct usage of shebang.
*
* @see [shebang](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/shebang.md)
*/
'node/shebang': ShebangRuleConfig;
}
/**
* All Node rules.
*/
type NodeRules = CallbackReturnRule &
ExportsStyleRule &
FileExtensionInImportRule &
GlobalRequireRule &
HandleCallbackErrRule &
NoCallbackLiteralRule &
NoDeprecatedApiRule &
NoExportsAssignRule &
NoExtraneousImportRule &
NoExtraneousRequireRule &
NoMissingImportRule &
NoMissingRequireRule &
NoMixedRequiresRule &
NoNewRequireRule &
NoPathConcatRule &
NoProcessEnvRule &
NoProcessExitRule$1 &
NoRestrictedImportRule &
NoRestrictedRequireRule &
NoSyncRule &
NoUnpublishedBinRule &
NoUnpublishedImportRule &
NoUnpublishedRequireRule &
NoUnsupportedFeaturesEsBuiltinsRule &
NoUnsupportedFeaturesEsSyntaxRule &
NoUnsupportedFeaturesNodeBuiltinsRule &
PreferGlobalBufferRule &
PreferGlobalConsoleRule &
PreferGlobalProcessRule &
PreferGlobalTextDecoderRule &
PreferGlobalTextEncoderRule &
PreferGlobalUrlSearchParamsRule &
PreferGlobalUrlRule &
PreferPromisesDnsRule &
PreferPromisesFsRule &
ProcessExitAsThrowRule &
ShebangRule &
NoHideCoreModulesRule &
NoUnsupportedFeaturesRule$1;
/**
* Option.
*/
interface AlwaysReturnOption {
ignoreLastCallback?: boolean;
}
/**
* Options.
*/
type AlwaysReturnOptions = [AlwaysReturnOption?];
/**
*
* @see [always-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md)
*/
type AlwaysReturnRuleConfig = RuleConfig<AlwaysReturnOptions>;
/**
*
* @see [always-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md)
*/
interface AlwaysReturnRule {
/**
*
* @see [always-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md)
*/
'promise/always-return': AlwaysReturnRuleConfig;
}
/**
*
* @see [avoid-new](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md)
*/
type AvoidNewRuleConfig = RuleConfig<[]>;
/**
*
* @see [avoid-new](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md)
*/
interface AvoidNewRule {
/**
*
* @see [avoid-new](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md)
*/
'promise/avoid-new': AvoidNewRuleConfig;
}
/**
* Option.
*/
interface CatchOrReturnOption {
allowFinally?: boolean;
allowThen?: boolean;
terminationMethod?: string | string[];
}
/**
* Options.
*/
type CatchOrReturnOptions = [CatchOrReturnOption?];
/**
*
* @see [catch-or-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md)
*/
type CatchOrReturnRuleConfig = RuleConfig<CatchOrReturnOptions>;
/**
*
* @see [catch-or-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md)
*/
interface CatchOrReturnRule {
/**
*
* @see [catch-or-return](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md)
*/
'promise/catch-or-return': CatchOrReturnRuleConfig;
}
/**
* Option.
*/
interface NoCallbackInPromiseOption {
exceptions?: string[];
}
/**
* Options.
*/
type NoCallbackInPromiseOptions = [NoCallbackInPromiseOption?];
/**
*
* @see [no-callback-in-promise](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md)
*/
type NoCallbackInPromiseRuleConfig =
RuleConfig<NoCallbackInPromiseOptions>;
/**
*
* @see [no-callback-in-promise](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md)
*/
interface NoCallbackInPromiseRule {
/**
*
* @see [no-callback-in-promise](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md)
*/
'promise/no-callback-in-promise': NoCallbackInPromiseRuleConfig;
}
/**
*
* @see [no-multiple-resolved](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md)
*/
type NoMultipleResolvedRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-multiple-resolved](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md)
*/
interface NoMultipleResolvedRule {
/**
*
* @see [no-multiple-resolved](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md)
*/
'promise/no-multiple-resolved': NoMultipleResolvedRuleConfig;
}
/**
*
* @see [no-native](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md)
*/
type NoNativeRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-native](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md)
*/
interface NoNativeRule {
/**
*
* @see [no-native](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md)
*/
'promise/no-native': NoNativeRuleConfig;
}
/**
*
* @see [no-nesting](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md)
*/
type NoNestingRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-nesting](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md)
*/
interface NoNestingRule {
/**
*
* @see [no-nesting](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md)
*/
'promise/no-nesting': NoNestingRuleConfig;
}
/**
*
* @see [no-new-statics](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md)
*/
type NoNewStaticsRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-new-statics](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md)
*/
interface NoNewStaticsRule {
/**
*
* @see [no-new-statics](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md)
*/
'promise/no-new-statics': NoNewStaticsRuleConfig;
}
/**
*
* @see [no-promise-in-callback](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md)
*/
type NoPromiseInCallbackRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-promise-in-callback](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md)
*/
interface NoPromiseInCallbackRule {
/**
*
* @see [no-promise-in-callback](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md)
*/
'promise/no-promise-in-callback': NoPromiseInCallbackRuleConfig;
}
/**
*
* @see [no-return-in-finally](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md)
*/
type NoReturnInFinallyRuleConfig = RuleConfig<[]>;
/**
*
* @see [no-return-in-finally](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md)
*/
interface NoReturnInFinallyRule {
/**
*
* @see [no-return-in-finally](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md)
*/
'promise/no-return-in-finally': NoReturnInFinallyRuleConfig;
}
/**
* Option.
*/
interface NoReturnWrapOption {
allowReject?: boolean;
}
/**
* Options.
*/
type NoReturnWrapOptions = [NoReturnWrapOption?];
/**
*
* @see [no-return-wrap](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md)
*/
type NoReturnWrapRuleConfig = RuleConfig<NoReturnWrapOptions>;
/**
*
* @see [no-return-wrap](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md)
*/
interface NoReturnWrapRule {
/**
*
* @see [no-return-wrap](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md)
*/
'promise/no-return-wrap': NoReturnWrapRuleConfig;
}
/**
* Option.
*/
interface ParamNamesOption {
resolvePattern?: string;
rejectPattern?: string;
}
/**
* Options.
*/
type ParamNamesOptions = [ParamNamesOption?];
/**
*
* @see [param-names](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md)
*/
type ParamNamesRuleConfig = RuleConfig<ParamNamesOptions>;
/**
*
* @see [param-names](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md)
*/
interface ParamNamesRule {
/**
*
* @see [param-names](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md)
*/
'promise/param-names': ParamNamesRuleConfig;
}
/**
*
* @see [prefer-await-to-callbacks](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md)
*/
type PreferAwaitToCallbacksRuleConfig = RuleConfig<[]>;
/**
*
* @see [prefer-await-to-callbacks](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md)
*/
interface PreferAwaitToCallbacksRule {
/**
*
* @see [prefer-await-to-callbacks](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md)
*/
'promise/prefer-await-to-callbacks': PreferAwaitToCallbacksRuleConfig;
}
/**
*
* @see [prefer-await-to-then](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md)
*/
type PreferAwaitToThenRuleConfig = RuleConfig<[]>;
/**
*
* @see [prefer-await-to-then](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md)
*/
interface PreferAwaitToThenRule {
/**
*
* @see [prefer-await-to-then](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md)
*/
'promise/prefer-await-to-then': PreferAwaitToThenRuleConfig;
}
/**
* Ensures the proper number of arguments are passed to Promise functions.
*
* @see [valid-params](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md)
*/
type ValidParamsRuleConfig = RuleConfig<[]>;
/**
* Ensures the proper number of arguments are passed to Promise functions.
*
* @see [valid-params](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md)
*/
interface ValidParamsRule {
/**
* Ensures the proper number of arguments are passed to Promise functions.
*
* @see [valid-params](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md)
*/
'promise/valid-params': ValidParamsRuleConfig;
}
/**
* All Promise rules.
*/
type PromiseRules = ParamNamesRule &
NoReturnWrapRule &
AlwaysReturnRule &
CatchOrReturnRule &
PreferAwaitToCallbacksRule &
PreferAwaitToThenRule &
NoNativeRule &
NoCallbackInPromiseRule &
NoPromiseInCallbackRule &
NoNestingRule &
AvoidNewRule &
NoNewStaticsRule &
NoReturnInFinallyRule &
ValidParamsRule &
NoMultipleResolvedRule;
/**
* Option.
*/
interface BooleanPropNamingOption {
/**
* @minItems 1
*/
propTypeNames?: [string, ...string[]];
rule?: string;
message?: string;
validateNested?: boolean;
}
/**
* Options.
*/
type BooleanPropNamingOptions = [BooleanPropNamingOption?];
/**
* Enforces consistent naming for boolean props.
*
* @see [boolean-prop-naming](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md)
*/
type BooleanPropNamingRuleConfig = RuleConfig<BooleanPropNamingOptions>;
/**
* Enforces consistent naming for boolean props.
*
* @see [boolean-prop-naming](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md)
*/
interface BooleanPropNamingRule {
/**
* Enforces consistent naming for boolean props.
*
* @see [boolean-prop-naming](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/boolean-prop-naming.md)
*/
'react/boolean-prop-naming': BooleanPropNamingRuleConfig;
}
/**
* Option.
*/
interface ButtonHasTypeOption {
button?: boolean;
submit?: boolean;
reset?: boolean;
}
/**
* Options.
*/
type ButtonHasTypeOptions = [ButtonHasTypeOption?];
/**
* Disallow usage of `button` elements without an explicit `type` attribute.
*
* @see [button-has-type](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md)
*/
type ButtonHasTypeRuleConfig = RuleConfig<ButtonHasTypeOptions>;
/**
* Disallow usage of `button` elements without an explicit `type` attribute.
*
* @see [button-has-type](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md)
*/
interface ButtonHasTypeRule {
/**
* Disallow usage of `button` elements without an explicit `type` attribute.
*
* @see [button-has-type](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/button-has-type.md)
*/
'react/button-has-type': ButtonHasTypeRuleConfig;
}
/**
* Option.
*/
interface DefaultPropsMatchPropTypesOption {
allowRequiredDefaults?: boolean;
}
/**
* Options.
*/
type DefaultPropsMatchPropTypesOptions = [
DefaultPropsMatchPropTypesOption?,
];
/**
* Enforce all defaultProps have a corresponding non-required PropType.
*
* @see [default-props-match-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md)
*/
type DefaultPropsMatchPropTypesRuleConfig =
RuleConfig<DefaultPropsMatchPropTypesOptions>;
/**
* Enforce all defaultProps have a corresponding non-required PropType.
*
* @see [default-props-match-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md)
*/
interface DefaultPropsMatchPropTypesRule {
/**
* Enforce all defaultProps have a corresponding non-required PropType.
*
* @see [default-props-match-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/default-props-match-prop-types.md)
*/
'react/default-props-match-prop-types': DefaultPropsMatchPropTypesRuleConfig;
}
/**
* Config.
*/
interface DestructuringAssignmentConfig {
ignoreClassFields?: boolean;
destructureInSignature?: 'always' | 'ignore';
}
/**
* Option.
*/
type DestructuringAssignmentOption = 'always' | 'never';
/**
* Options.
*/
type DestructuringAssignmentOptions = [
DestructuringAssignmentOption?,
DestructuringAssignmentConfig?,
];
/**
* Enforce consistent usage of destructuring assignment of props, state, and context.
*
* @see [destructuring-assignment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md)
*/
type DestructuringAssignmentRuleConfig =
RuleConfig<DestructuringAssignmentOptions>;
/**
* Enforce consistent usage of destructuring assignment of props, state, and context.
*
* @see [destructuring-assignment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md)
*/
interface DestructuringAssignmentRule {
/**
* Enforce consistent usage of destructuring assignment of props, state, and context.
*
* @see [destructuring-assignment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/destructuring-assignment.md)
*/
'react/destructuring-assignment': DestructuringAssignmentRuleConfig;
}
/**
* Option.
*/
interface DisplayNameOption {
ignoreTranspilerName?: boolean;
checkContextObjects?: boolean;
}
/**
* Options.
*/
type DisplayNameOptions = [DisplayNameOption?];
/**
* Disallow missing displayName in a React component definition.
*
* @see [display-name](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md)
*/
type DisplayNameRuleConfig = RuleConfig<DisplayNameOptions>;
/**
* Disallow missing displayName in a React component definition.
*
* @see [display-name](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md)
*/
interface DisplayNameRule {
/**
* Disallow missing displayName in a React component definition.
*
* @see [display-name](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/display-name.md)
*/
'react/display-name': DisplayNameRuleConfig;
}
/**
* Option.
*/
interface ForbidComponentPropsOption {
forbid?: (
| string
| {
propName?: string;
allowedFor?: string[];
message?: string;
}
| {
propName?: string;
/**
* @minItems 1
*/
disallowedFor: [string, ...string[]];
message?: string;
}
)[];
[k: string]: any;
}
/**
* Options.
*/
type ForbidComponentPropsOptions = [ForbidComponentPropsOption?];
/**
* Disallow certain props on components.
*
* @see [forbid-component-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md)
*/
type ForbidComponentPropsRuleConfig =
RuleConfig<ForbidComponentPropsOptions>;
/**
* Disallow certain props on components.
*
* @see [forbid-component-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md)
*/
interface ForbidComponentPropsRule {
/**
* Disallow certain props on components.
*
* @see [forbid-component-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-component-props.md)
*/
'react/forbid-component-props': ForbidComponentPropsRuleConfig;
}
/**
* Option.
*/
interface ForbidDomPropsOption {
forbid?: (
| string
| {
propName?: string;
disallowedFor?: string[];
message?: string;
[k: string]: any;
}
)[];
}
/**
* Options.
*/
type ForbidDomPropsOptions = [ForbidDomPropsOption?];
/**
* Disallow certain props on DOM Nodes.
*
* @see [forbid-dom-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md)
*/
type ForbidDomPropsRuleConfig = RuleConfig<ForbidDomPropsOptions>;
/**
* Disallow certain props on DOM Nodes.
*
* @see [forbid-dom-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md)
*/
interface ForbidDomPropsRule {
/**
* Disallow certain props on DOM Nodes.
*
* @see [forbid-dom-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-dom-props.md)
*/
'react/forbid-dom-props': ForbidDomPropsRuleConfig;
}
/**
* Option.
*/
interface ForbidElementsOption {
forbid?: (
| string
| {
element: string;
message?: string;
}
)[];
}
/**
* Options.
*/
type ForbidElementsOptions = [ForbidElementsOption?];
/**
* Disallow certain elements.
*
* @see [forbid-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md)
*/
type ForbidElementsRuleConfig = RuleConfig<ForbidElementsOptions>;
/**
* Disallow certain elements.
*
* @see [forbid-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md)
*/
interface ForbidElementsRule {
/**
* Disallow certain elements.
*
* @see [forbid-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-elements.md)
*/
'react/forbid-elements': ForbidElementsRuleConfig;
}
/**
* Option.
*/
interface ForbidForeignPropTypesOption {
allowInPropTypes?: boolean;
}
/**
* Options.
*/
type ForbidForeignPropTypesOptions = [ForbidForeignPropTypesOption?];
/**
* Disallow using another component's propTypes.
*
* @see [forbid-foreign-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md)
*/
type ForbidForeignPropTypesRuleConfig =
RuleConfig<ForbidForeignPropTypesOptions>;
/**
* Disallow using another component's propTypes.
*
* @see [forbid-foreign-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md)
*/
interface ForbidForeignPropTypesRule {
/**
* Disallow using another component's propTypes.
*
* @see [forbid-foreign-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-foreign-prop-types.md)
*/
'react/forbid-foreign-prop-types': ForbidForeignPropTypesRuleConfig;
}
/**
* Option.
*/
interface ForbidPropTypesOption {
forbid?: string[];
checkContextTypes?: boolean;
checkChildContextTypes?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type ForbidPropTypesOptions = [ForbidPropTypesOption?];
/**
* Disallow certain propTypes.
*
* @see [forbid-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md)
*/
type ForbidPropTypesRuleConfig = RuleConfig<ForbidPropTypesOptions>;
/**
* Disallow certain propTypes.
*
* @see [forbid-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md)
*/
interface ForbidPropTypesRule {
/**
* Disallow certain propTypes.
*
* @see [forbid-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/forbid-prop-types.md)
*/
'react/forbid-prop-types': ForbidPropTypesRuleConfig;
}
/**
* Option.
*/
interface FunctionComponentDefinitionOption {
namedComponents?:
| ('function-declaration' | 'arrow-function' | 'function-expression')
| ('function-declaration' | 'arrow-function' | 'function-expression')[];
unnamedComponents?:
| ('arrow-function' | 'function-expression')
| ('arrow-function' | 'function-expression')[];
[k: string]: any;
}
/**
* Options.
*/
type FunctionComponentDefinitionOptions = [
FunctionComponentDefinitionOption?,
];
/**
* Enforce a specific function type for function components.
*
* @see [function-component-definition](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md)
*/
type FunctionComponentDefinitionRuleConfig =
RuleConfig<FunctionComponentDefinitionOptions>;
/**
* Enforce a specific function type for function components.
*
* @see [function-component-definition](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md)
*/
interface FunctionComponentDefinitionRule {
/**
* Enforce a specific function type for function components.
*
* @see [function-component-definition](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/function-component-definition.md)
*/
'react/function-component-definition': FunctionComponentDefinitionRuleConfig;
}
/**
* Option.
*/
interface HookUseStateOption {
allowDestructuredState?: boolean;
}
/**
* Options.
*/
type HookUseStateOptions = [HookUseStateOption?];
/**
* Ensure destructuring and symmetric naming of useState hook value and setter variables.
*
* @see [hook-use-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md)
*/
type HookUseStateRuleConfig = RuleConfig<HookUseStateOptions>;
/**
* Ensure destructuring and symmetric naming of useState hook value and setter variables.
*
* @see [hook-use-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md)
*/
interface HookUseStateRule {
/**
* Ensure destructuring and symmetric naming of useState hook value and setter variables.
*
* @see [hook-use-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/hook-use-state.md)
*/
'react/hook-use-state': HookUseStateRuleConfig;
}
/**
* Enforce sandbox attribute on iframe elements.
*
* @see [iframe-missing-sandbox](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md)
*/
type IframeMissingSandboxRuleConfig = RuleConfig<[]>;
/**
* Enforce sandbox attribute on iframe elements.
*
* @see [iframe-missing-sandbox](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md)
*/
interface IframeMissingSandboxRule {
/**
* Enforce sandbox attribute on iframe elements.
*
* @see [iframe-missing-sandbox](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/iframe-missing-sandbox.md)
*/
'react/iframe-missing-sandbox': IframeMissingSandboxRuleConfig;
}
/**
* Option.
*/
type JsxBooleanValueOption =
| []
| ['always' | 'never']
| []
| ['always']
| [
'always',
{
never?: string[];
},
]
| []
| ['never']
| [
'never',
{
always?: string[];
},
];
/**
* Options.
*/
type JsxBooleanValueOptions = JsxBooleanValueOption;
/**
* Enforce boolean attributes notation in JSX.
*
* @see [jsx-boolean-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md)
*/
type JsxBooleanValueRuleConfig = RuleConfig<JsxBooleanValueOptions>;
/**
* Enforce boolean attributes notation in JSX.
*
* @see [jsx-boolean-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md)
*/
interface JsxBooleanValueRule {
/**
* Enforce boolean attributes notation in JSX.
*
* @see [jsx-boolean-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-boolean-value.md)
*/
'react/jsx-boolean-value': JsxBooleanValueRuleConfig;
}
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-child-element-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md)
*/
type JsxChildElementSpacingRuleConfig = RuleConfig<[]>;
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-child-element-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md)
*/
interface JsxChildElementSpacingRule {
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-child-element-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-child-element-spacing.md)
*/
'react/jsx-child-element-spacing': JsxChildElementSpacingRuleConfig;
}
/**
* Option.
*/
type JsxClosingBracketLocationOption =
| ('after-props' | 'props-aligned' | 'tag-aligned' | 'line-aligned')
| {
location?:
| 'after-props'
| 'props-aligned'
| 'tag-aligned'
| 'line-aligned';
}
| {
nonEmpty?:
| 'after-props'
| 'props-aligned'
| 'tag-aligned'
| 'line-aligned'
| false;
selfClosing?:
| 'after-props'
| 'props-aligned'
| 'tag-aligned'
| 'line-aligned'
| false;
};
/**
* Options.
*/
type JsxClosingBracketLocationOptions = [
JsxClosingBracketLocationOption?,
];
/**
* Enforce closing bracket location in JSX.
*
* @see [jsx-closing-bracket-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md)
*/
type JsxClosingBracketLocationRuleConfig =
RuleConfig<JsxClosingBracketLocationOptions>;
/**
* Enforce closing bracket location in JSX.
*
* @see [jsx-closing-bracket-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md)
*/
interface JsxClosingBracketLocationRule {
/**
* Enforce closing bracket location in JSX.
*
* @see [jsx-closing-bracket-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-bracket-location.md)
*/
'react/jsx-closing-bracket-location': JsxClosingBracketLocationRuleConfig;
}
/**
* Enforce closing tag location for multiline JSX.
*
* @see [jsx-closing-tag-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md)
*/
type JsxClosingTagLocationRuleConfig = RuleConfig<[]>;
/**
* Enforce closing tag location for multiline JSX.
*
* @see [jsx-closing-tag-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md)
*/
interface JsxClosingTagLocationRule {
/**
* Enforce closing tag location for multiline JSX.
*
* @see [jsx-closing-tag-location](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-closing-tag-location.md)
*/
'react/jsx-closing-tag-location': JsxClosingTagLocationRuleConfig;
}
/**
* Option.
*/
type JsxCurlyBracePresenceOption =
| {
props?: 'always' | 'never' | 'ignore';
children?: 'always' | 'never' | 'ignore';
propElementValues?: 'always' | 'never' | 'ignore';
}
| ('always' | 'never' | 'ignore');
/**
* Options.
*/
type JsxCurlyBracePresenceOptions = [JsxCurlyBracePresenceOption?];
/**
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes.
*
* @see [jsx-curly-brace-presence](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md)
*/
type JsxCurlyBracePresenceRuleConfig =
RuleConfig<JsxCurlyBracePresenceOptions>;
/**
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes.
*
* @see [jsx-curly-brace-presence](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md)
*/
interface JsxCurlyBracePresenceRule {
/**
* Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes.
*
* @see [jsx-curly-brace-presence](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-brace-presence.md)
*/
'react/jsx-curly-brace-presence': JsxCurlyBracePresenceRuleConfig;
}
/**
* Option.
*/
type JsxCurlyNewlineOption =
| ('consistent' | 'never')
| {
singleline?: 'consistent' | 'require' | 'forbid';
multiline?: 'consistent' | 'require' | 'forbid';
};
/**
* Options.
*/
type JsxCurlyNewlineOptions = [JsxCurlyNewlineOption?];
/**
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md)
*/
type JsxCurlyNewlineRuleConfig = RuleConfig<JsxCurlyNewlineOptions>;
/**
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md)
*/
interface JsxCurlyNewlineRule {
/**
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-newline.md)
*/
'react/jsx-curly-newline': JsxCurlyNewlineRuleConfig;
}
/**
* Option.
*/
type JsxCurlySpacingOption =
| []
| [
| (BasicConfig$1 & {
attributes?: BasicConfigOrBoolean;
children?: BasicConfigOrBoolean;
[k: string]: any;
})
| ('always' | 'never'),
]
| [
(
| (BasicConfig$1 & {
attributes?: BasicConfigOrBoolean;
children?: BasicConfigOrBoolean;
[k: string]: any;
})
| ('always' | 'never')
),
{
allowMultiline?: boolean;
spacing?: {
objectLiterals?: 'always' | 'never';
[k: string]: any;
};
},
];
type BasicConfigOrBoolean = BasicConfig$1 | boolean;
interface BasicConfig$1 {
when?: 'always' | 'never';
allowMultiline?: boolean;
spacing?: {
objectLiterals?: 'always' | 'never';
[k: string]: any;
};
[k: string]: any;
}
/**
* Options.
*/
type JsxCurlySpacingOptions = JsxCurlySpacingOption;
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md)
*/
type JsxCurlySpacingRuleConfig = RuleConfig<JsxCurlySpacingOptions>;
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md)
*/
interface JsxCurlySpacingRule {
/**
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions.
*
* @see [jsx-curly-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-curly-spacing.md)
*/
'react/jsx-curly-spacing': JsxCurlySpacingRuleConfig;
}
/**
* Option.
*/
type JsxEqualsSpacingOption = 'always' | 'never';
/**
* Options.
*/
type JsxEqualsSpacingOptions = [JsxEqualsSpacingOption?];
/**
* Enforce or disallow spaces around equal signs in JSX attributes.
*
* @see [jsx-equals-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md)
*/
type JsxEqualsSpacingRuleConfig = RuleConfig<JsxEqualsSpacingOptions>;
/**
* Enforce or disallow spaces around equal signs in JSX attributes.
*
* @see [jsx-equals-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md)
*/
interface JsxEqualsSpacingRule {
/**
* Enforce or disallow spaces around equal signs in JSX attributes.
*
* @see [jsx-equals-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-equals-spacing.md)
*/
'react/jsx-equals-spacing': JsxEqualsSpacingRuleConfig;
}
/**
* Option.
*/
interface JsxFilenameExtensionOption {
allow?: 'always' | 'as-needed';
extensions?: string[];
}
/**
* Options.
*/
type JsxFilenameExtensionOptions = [JsxFilenameExtensionOption?];
/**
* Disallow file extensions that may contain JSX.
*
* @see [jsx-filename-extension](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md)
*/
type JsxFilenameExtensionRuleConfig =
RuleConfig<JsxFilenameExtensionOptions>;
/**
* Disallow file extensions that may contain JSX.
*
* @see [jsx-filename-extension](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md)
*/
interface JsxFilenameExtensionRule {
/**
* Disallow file extensions that may contain JSX.
*
* @see [jsx-filename-extension](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-filename-extension.md)
*/
'react/jsx-filename-extension': JsxFilenameExtensionRuleConfig;
}
/**
* Option.
*/
type JsxFirstPropNewLineOption =
| 'always'
| 'never'
| 'multiline'
| 'multiline-multiprop'
| 'multiprop';
/**
* Options.
*/
type JsxFirstPropNewLineOptions = [JsxFirstPropNewLineOption?];
/**
* Enforce proper position of the first property in JSX.
*
* @see [jsx-first-prop-new-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md)
*/
type JsxFirstPropNewLineRuleConfig =
RuleConfig<JsxFirstPropNewLineOptions>;
/**
* Enforce proper position of the first property in JSX.
*
* @see [jsx-first-prop-new-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md)
*/
interface JsxFirstPropNewLineRule {
/**
* Enforce proper position of the first property in JSX.
*
* @see [jsx-first-prop-new-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-first-prop-new-line.md)
*/
'react/jsx-first-prop-new-line': JsxFirstPropNewLineRuleConfig;
}
/**
* Option.
*/
type JsxFragmentsOption = 'syntax' | 'element';
/**
* Options.
*/
type JsxFragmentsOptions = [JsxFragmentsOption?];
/**
* Enforce shorthand or standard form for React fragments.
*
* @see [jsx-fragments](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md)
*/
type JsxFragmentsRuleConfig = RuleConfig<JsxFragmentsOptions>;
/**
* Enforce shorthand or standard form for React fragments.
*
* @see [jsx-fragments](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md)
*/
interface JsxFragmentsRule {
/**
* Enforce shorthand or standard form for React fragments.
*
* @see [jsx-fragments](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-fragments.md)
*/
'react/jsx-fragments': JsxFragmentsRuleConfig;
}
/**
* Option.
*/
type JsxHandlerNamesOption =
| {
eventHandlerPrefix?: string;
eventHandlerPropPrefix?: string;
checkLocalVariables?: boolean;
checkInlineFunction?: boolean;
}
| {
eventHandlerPrefix?: string;
eventHandlerPropPrefix?: false;
checkLocalVariables?: boolean;
checkInlineFunction?: boolean;
}
| {
eventHandlerPrefix?: false;
eventHandlerPropPrefix?: string;
checkLocalVariables?: boolean;
checkInlineFunction?: boolean;
}
| {
checkLocalVariables?: boolean;
}
| {
checkInlineFunction?: boolean;
};
/**
* Options.
*/
type JsxHandlerNamesOptions = [JsxHandlerNamesOption?];
/**
* Enforce event handler naming conventions in JSX.
*
* @see [jsx-handler-names](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md)
*/
type JsxHandlerNamesRuleConfig = RuleConfig<JsxHandlerNamesOptions>;
/**
* Enforce event handler naming conventions in JSX.
*
* @see [jsx-handler-names](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md)
*/
interface JsxHandlerNamesRule {
/**
* Enforce event handler naming conventions in JSX.
*
* @see [jsx-handler-names](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-handler-names.md)
*/
'react/jsx-handler-names': JsxHandlerNamesRuleConfig;
}
/**
* Config.
*/
interface JsxIndentConfig {
checkAttributes?: boolean;
indentLogicalExpressions?: boolean;
}
/**
* Option.
*/
type JsxIndentOption = 'tab' | number;
/**
* Options.
*/
type JsxIndentOptions = [JsxIndentOption?, JsxIndentConfig?];
/**
* Enforce JSX indentation.
*
* @see [jsx-indent](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md)
*/
type JsxIndentRuleConfig = RuleConfig<JsxIndentOptions>;
/**
* Enforce JSX indentation.
*
* @see [jsx-indent](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md)
*/
interface JsxIndentRule {
/**
* Enforce JSX indentation.
*
* @see [jsx-indent](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent.md)
*/
'react/jsx-indent': JsxIndentRuleConfig;
}
/**
* Option.
*/
type JsxIndentPropsOption =
| ('tab' | 'first')
| number
| {
indentMode?: ('tab' | 'first') | number;
ignoreTernaryOperator?: boolean;
[k: string]: any;
};
/**
* Options.
*/
type JsxIndentPropsOptions = [JsxIndentPropsOption?];
/**
* Enforce props indentation in JSX.
*
* @see [jsx-indent-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md)
*/
type JsxIndentPropsRuleConfig = RuleConfig<JsxIndentPropsOptions>;
/**
* Enforce props indentation in JSX.
*
* @see [jsx-indent-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md)
*/
interface JsxIndentPropsRule {
/**
* Enforce props indentation in JSX.
*
* @see [jsx-indent-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-indent-props.md)
*/
'react/jsx-indent-props': JsxIndentPropsRuleConfig;
}
/**
* Option.
*/
interface JsxKeyOption {
checkFragmentShorthand?: boolean;
checkKeyMustBeforeSpread?: boolean;
warnOnDuplicates?: boolean;
}
/**
* Options.
*/
type JsxKeyOptions = [JsxKeyOption?];
/**
* Disallow missing `key` props in iterators/collection literals.
*
* @see [jsx-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md)
*/
type JsxKeyRuleConfig = RuleConfig<JsxKeyOptions>;
/**
* Disallow missing `key` props in iterators/collection literals.
*
* @see [jsx-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md)
*/
interface JsxKeyRule {
/**
* Disallow missing `key` props in iterators/collection literals.
*
* @see [jsx-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-key.md)
*/
'react/jsx-key': JsxKeyRuleConfig;
}
/**
* Option.
*/
interface JsxMaxDepthOption {
max?: number;
}
/**
* Options.
*/
type JsxMaxDepthOptions = [JsxMaxDepthOption?];
/**
* Enforce JSX maximum depth.
*
* @see [jsx-max-depth](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md)
*/
type JsxMaxDepthRuleConfig = RuleConfig<JsxMaxDepthOptions>;
/**
* Enforce JSX maximum depth.
*
* @see [jsx-max-depth](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md)
*/
interface JsxMaxDepthRule {
/**
* Enforce JSX maximum depth.
*
* @see [jsx-max-depth](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-depth.md)
*/
'react/jsx-max-depth': JsxMaxDepthRuleConfig;
}
/**
* Option.
*/
type JsxMaxPropsPerLineOption =
| {
maximum?: {
single?: number;
multi?: number;
[k: string]: any;
};
}
| {
maximum?: number;
when?: 'always' | 'multiline';
};
/**
* Options.
*/
type JsxMaxPropsPerLineOptions = [JsxMaxPropsPerLineOption?];
/**
* Enforce maximum of props on a single line in JSX.
*
* @see [jsx-max-props-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md)
*/
type JsxMaxPropsPerLineRuleConfig =
RuleConfig<JsxMaxPropsPerLineOptions>;
/**
* Enforce maximum of props on a single line in JSX.
*
* @see [jsx-max-props-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md)
*/
interface JsxMaxPropsPerLineRule {
/**
* Enforce maximum of props on a single line in JSX.
*
* @see [jsx-max-props-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-max-props-per-line.md)
*/
'react/jsx-max-props-per-line': JsxMaxPropsPerLineRuleConfig;
}
/**
* Option.
*/
interface JsxNewlineOption {
prevent?: boolean;
allowMultilines?: boolean;
}
/**
* Options.
*/
type JsxNewlineOptions = [JsxNewlineOption?];
/**
* Require or prevent a new line after jsx elements and expressions.
*
* @see [jsx-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md)
*/
type JsxNewlineRuleConfig = RuleConfig<JsxNewlineOptions>;
/**
* Require or prevent a new line after jsx elements and expressions.
*
* @see [jsx-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md)
*/
interface JsxNewlineRule {
/**
* Require or prevent a new line after jsx elements and expressions.
*
* @see [jsx-newline](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-newline.md)
*/
'react/jsx-newline': JsxNewlineRuleConfig;
}
/**
* Option.
*/
interface JsxNoBindOption {
allowArrowFunctions?: boolean;
allowBind?: boolean;
allowFunctions?: boolean;
ignoreRefs?: boolean;
ignoreDOMComponents?: boolean;
}
/**
* Options.
*/
type JsxNoBindOptions = [JsxNoBindOption?];
/**
* Disallow `.bind()` or arrow functions in JSX props.
*
* @see [jsx-no-bind](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md)
*/
type JsxNoBindRuleConfig = RuleConfig<JsxNoBindOptions>;
/**
* Disallow `.bind()` or arrow functions in JSX props.
*
* @see [jsx-no-bind](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md)
*/
interface JsxNoBindRule {
/**
* Disallow `.bind()` or arrow functions in JSX props.
*
* @see [jsx-no-bind](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-bind.md)
*/
'react/jsx-no-bind': JsxNoBindRuleConfig;
}
/**
* Disallow comments from being inserted as text nodes.
*
* @see [jsx-no-comment-textnodes](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md)
*/
type JsxNoCommentTextnodesRuleConfig = RuleConfig<[]>;
/**
* Disallow comments from being inserted as text nodes.
*
* @see [jsx-no-comment-textnodes](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md)
*/
interface JsxNoCommentTextnodesRule {
/**
* Disallow comments from being inserted as text nodes.
*
* @see [jsx-no-comment-textnodes](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-comment-textnodes.md)
*/
'react/jsx-no-comment-textnodes': JsxNoCommentTextnodesRuleConfig;
}
/**
* Options.
*/
type JsxNoConstructedContextValuesOptions = [];
/**
* Disallows JSX context provider values from taking values that will cause needless rerenders.
*
* @see [jsx-no-constructed-context-values](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md)
*/
type JsxNoConstructedContextValuesRuleConfig =
RuleConfig<JsxNoConstructedContextValuesOptions>;
/**
* Disallows JSX context provider values from taking values that will cause needless rerenders.
*
* @see [jsx-no-constructed-context-values](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md)
*/
interface JsxNoConstructedContextValuesRule {
/**
* Disallows JSX context provider values from taking values that will cause needless rerenders.
*
* @see [jsx-no-constructed-context-values](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-constructed-context-values.md)
*/
'react/jsx-no-constructed-context-values': JsxNoConstructedContextValuesRuleConfig;
}
/**
* Option.
*/
interface JsxNoDuplicatePropsOption {
ignoreCase?: boolean;
}
/**
* Options.
*/
type JsxNoDuplicatePropsOptions = [JsxNoDuplicatePropsOption?];
/**
* Disallow duplicate properties in JSX.
*
* @see [jsx-no-duplicate-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md)
*/
type JsxNoDuplicatePropsRuleConfig =
RuleConfig<JsxNoDuplicatePropsOptions>;
/**
* Disallow duplicate properties in JSX.
*
* @see [jsx-no-duplicate-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md)
*/
interface JsxNoDuplicatePropsRule {
/**
* Disallow duplicate properties in JSX.
*
* @see [jsx-no-duplicate-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-duplicate-props.md)
*/
'react/jsx-no-duplicate-props': JsxNoDuplicatePropsRuleConfig;
}
/**
* Option.
*/
interface JsxNoLeakedRenderOption {
validStrategies?: ('ternary' | 'coerce')[];
}
/**
* Options.
*/
type JsxNoLeakedRenderOptions = [JsxNoLeakedRenderOption?];
/**
* Disallow problematic leaked values from being rendered.
*
* @see [jsx-no-leaked-render](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md)
*/
type JsxNoLeakedRenderRuleConfig = RuleConfig<JsxNoLeakedRenderOptions>;
/**
* Disallow problematic leaked values from being rendered.
*
* @see [jsx-no-leaked-render](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md)
*/
interface JsxNoLeakedRenderRule {
/**
* Disallow problematic leaked values from being rendered.
*
* @see [jsx-no-leaked-render](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-leaked-render.md)
*/
'react/jsx-no-leaked-render': JsxNoLeakedRenderRuleConfig;
}
/**
* Option.
*/
interface JsxNoLiteralsOption {
noStrings?: boolean;
allowedStrings?: string[];
ignoreProps?: boolean;
noAttributeStrings?: boolean;
}
/**
* Options.
*/
type JsxNoLiteralsOptions = [JsxNoLiteralsOption?];
/**
* Disallow usage of string literals in JSX.
*
* @see [jsx-no-literals](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md)
*/
type JsxNoLiteralsRuleConfig = RuleConfig<JsxNoLiteralsOptions>;
/**
* Disallow usage of string literals in JSX.
*
* @see [jsx-no-literals](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md)
*/
interface JsxNoLiteralsRule {
/**
* Disallow usage of string literals in JSX.
*
* @see [jsx-no-literals](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-literals.md)
*/
'react/jsx-no-literals': JsxNoLiteralsRuleConfig;
}
/**
* Option.
*/
type JsxNoScriptUrlOption = {
name: string;
props: string[];
}[];
/**
* Options.
*/
type JsxNoScriptUrlOptions = [JsxNoScriptUrlOption?];
/**
* Disallow usage of `javascript:` URLs.
*
* @see [jsx-no-script-url](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md)
*/
type JsxNoScriptUrlRuleConfig = RuleConfig<JsxNoScriptUrlOptions>;
/**
* Disallow usage of `javascript:` URLs.
*
* @see [jsx-no-script-url](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md)
*/
interface JsxNoScriptUrlRule {
/**
* Disallow usage of `javascript:` URLs.
*
* @see [jsx-no-script-url](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-script-url.md)
*/
'react/jsx-no-script-url': JsxNoScriptUrlRuleConfig;
}
/**
* Option.
*/
interface JsxNoTargetBlankOption {
allowReferrer?: boolean;
enforceDynamicLinks?: 'always' | 'never';
warnOnSpreadAttributes?: boolean;
links?: boolean;
forms?: boolean;
}
/**
* Options.
*/
type JsxNoTargetBlankOptions = [JsxNoTargetBlankOption?];
/**
* Disallow `target="_blank"` attribute without `rel="noreferrer"`.
*
* @see [jsx-no-target-blank](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md)
*/
type JsxNoTargetBlankRuleConfig = RuleConfig<JsxNoTargetBlankOptions>;
/**
* Disallow `target="_blank"` attribute without `rel="noreferrer"`.
*
* @see [jsx-no-target-blank](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md)
*/
interface JsxNoTargetBlankRule {
/**
* Disallow `target="_blank"` attribute without `rel="noreferrer"`.
*
* @see [jsx-no-target-blank](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-target-blank.md)
*/
'react/jsx-no-target-blank': JsxNoTargetBlankRuleConfig;
}
/**
* Option.
*/
interface JsxNoUndefOption {
allowGlobals?: boolean;
}
/**
* Options.
*/
type JsxNoUndefOptions = [JsxNoUndefOption?];
/**
* Disallow undeclared variables in JSX.
*
* @see [jsx-no-undef](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md)
*/
type JsxNoUndefRuleConfig = RuleConfig<JsxNoUndefOptions>;
/**
* Disallow undeclared variables in JSX.
*
* @see [jsx-no-undef](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md)
*/
interface JsxNoUndefRule {
/**
* Disallow undeclared variables in JSX.
*
* @see [jsx-no-undef](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-undef.md)
*/
'react/jsx-no-undef': JsxNoUndefRuleConfig;
}
/**
* Option.
*/
interface JsxNoUselessFragmentOption {
allowExpressions?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type JsxNoUselessFragmentOptions = [JsxNoUselessFragmentOption?];
/**
* Disallow unnecessary fragments.
*
* @see [jsx-no-useless-fragment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md)
*/
type JsxNoUselessFragmentRuleConfig =
RuleConfig<JsxNoUselessFragmentOptions>;
/**
* Disallow unnecessary fragments.
*
* @see [jsx-no-useless-fragment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md)
*/
interface JsxNoUselessFragmentRule {
/**
* Disallow unnecessary fragments.
*
* @see [jsx-no-useless-fragment](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-no-useless-fragment.md)
*/
'react/jsx-no-useless-fragment': JsxNoUselessFragmentRuleConfig;
}
/**
* Option.
*/
interface JsxOneExpressionPerLineOption {
allow?: 'none' | 'literal' | 'single-child';
}
/**
* Options.
*/
type JsxOneExpressionPerLineOptions = [JsxOneExpressionPerLineOption?];
/**
* Require one JSX element per line.
*
* @see [jsx-one-expression-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md)
*/
type JsxOneExpressionPerLineRuleConfig =
RuleConfig<JsxOneExpressionPerLineOptions>;
/**
* Require one JSX element per line.
*
* @see [jsx-one-expression-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md)
*/
interface JsxOneExpressionPerLineRule {
/**
* Require one JSX element per line.
*
* @see [jsx-one-expression-per-line](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-one-expression-per-line.md)
*/
'react/jsx-one-expression-per-line': JsxOneExpressionPerLineRuleConfig;
}
/**
* Option.
*/
interface JsxPascalCaseOption {
allowAllCaps?: boolean;
allowLeadingUnderscore?: boolean;
allowNamespace?: boolean;
/**
* @minItems 0
*/
ignore?: [] | [string];
}
/**
* Options.
*/
type JsxPascalCaseOptions = [JsxPascalCaseOption?];
/**
* Enforce PascalCase for user-defined JSX components.
*
* @see [jsx-pascal-case](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md)
*/
type JsxPascalCaseRuleConfig = RuleConfig<JsxPascalCaseOptions>;
/**
* Enforce PascalCase for user-defined JSX components.
*
* @see [jsx-pascal-case](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md)
*/
interface JsxPascalCaseRule {
/**
* Enforce PascalCase for user-defined JSX components.
*
* @see [jsx-pascal-case](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-pascal-case.md)
*/
'react/jsx-pascal-case': JsxPascalCaseRuleConfig;
}
/**
* Disallow multiple spaces between inline JSX props.
*
* @see [jsx-props-no-multi-spaces](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md)
*/
type JsxPropsNoMultiSpacesRuleConfig = RuleConfig<[]>;
/**
* Disallow multiple spaces between inline JSX props.
*
* @see [jsx-props-no-multi-spaces](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md)
*/
interface JsxPropsNoMultiSpacesRule {
/**
* Disallow multiple spaces between inline JSX props.
*
* @see [jsx-props-no-multi-spaces](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-multi-spaces.md)
*/
'react/jsx-props-no-multi-spaces': JsxPropsNoMultiSpacesRuleConfig;
}
/**
* Option.
*/
type JsxPropsNoSpreadingOption = {
html?: 'enforce' | 'ignore';
custom?: 'enforce' | 'ignore';
exceptions?: string[];
[k: string]: any;
};
/**
* Options.
*/
type JsxPropsNoSpreadingOptions = [JsxPropsNoSpreadingOption?];
/**
* Disallow JSX prop spreading.
*
* @see [jsx-props-no-spreading](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md)
*/
type JsxPropsNoSpreadingRuleConfig =
RuleConfig<JsxPropsNoSpreadingOptions>;
/**
* Disallow JSX prop spreading.
*
* @see [jsx-props-no-spreading](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md)
*/
interface JsxPropsNoSpreadingRule {
/**
* Disallow JSX prop spreading.
*
* @see [jsx-props-no-spreading](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-props-no-spreading.md)
*/
'react/jsx-props-no-spreading': JsxPropsNoSpreadingRuleConfig;
}
/**
* Option.
*/
interface JsxSortDefaultPropsOption {
ignoreCase?: boolean;
}
/**
* Options.
*/
type JsxSortDefaultPropsOptions = [JsxSortDefaultPropsOption?];
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @deprecated
*
* @see [jsx-sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md)
*/
type JsxSortDefaultPropsRuleConfig =
RuleConfig<JsxSortDefaultPropsOptions>;
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @deprecated
*
* @see [jsx-sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md)
*/
interface JsxSortDefaultPropsRule {
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @deprecated
*
* @see [jsx-sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-default-props.md)
*/
'react/jsx-sort-default-props': JsxSortDefaultPropsRuleConfig;
}
/**
* Option.
*/
interface JsxSortPropsOption {
callbacksLast?: boolean;
shorthandFirst?: boolean;
shorthandLast?: boolean;
multiline?: 'ignore' | 'first' | 'last';
ignoreCase?: boolean;
noSortAlphabetically?: boolean;
reservedFirst?: any[] | boolean;
locale?: string;
}
/**
* Options.
*/
type JsxSortPropsOptions = [JsxSortPropsOption?];
/**
* Enforce props alphabetical sorting.
*
* @see [jsx-sort-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md)
*/
type JsxSortPropsRuleConfig = RuleConfig<JsxSortPropsOptions>;
/**
* Enforce props alphabetical sorting.
*
* @see [jsx-sort-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md)
*/
interface JsxSortPropsRule {
/**
* Enforce props alphabetical sorting.
*
* @see [jsx-sort-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-sort-props.md)
*/
'react/jsx-sort-props': JsxSortPropsRuleConfig;
}
/**
* Option.
*/
type JsxSpaceBeforeClosingOption = 'always' | 'never';
/**
* Options.
*/
type JsxSpaceBeforeClosingOptions = [JsxSpaceBeforeClosingOption?];
/**
* Enforce spacing before closing bracket in JSX.
*
* @deprecated
*
* @see [jsx-space-before-closing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md)
*/
type JsxSpaceBeforeClosingRuleConfig =
RuleConfig<JsxSpaceBeforeClosingOptions>;
/**
* Enforce spacing before closing bracket in JSX.
*
* @deprecated
*
* @see [jsx-space-before-closing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md)
*/
interface JsxSpaceBeforeClosingRule {
/**
* Enforce spacing before closing bracket in JSX.
*
* @deprecated
*
* @see [jsx-space-before-closing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-space-before-closing.md)
*/
'react/jsx-space-before-closing': JsxSpaceBeforeClosingRuleConfig;
}
/**
* Option.
*/
interface JsxTagSpacingOption {
closingSlash?: 'always' | 'never' | 'allow';
beforeSelfClosing?: 'always' | 'proportional-always' | 'never' | 'allow';
afterOpening?: 'always' | 'allow-multiline' | 'never' | 'allow';
beforeClosing?: 'always' | 'proportional-always' | 'never' | 'allow';
}
/**
* Options.
*/
type JsxTagSpacingOptions = [JsxTagSpacingOption?];
/**
* Enforce whitespace in and around the JSX opening and closing brackets.
*
* @see [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md)
*/
type JsxTagSpacingRuleConfig = RuleConfig<JsxTagSpacingOptions>;
/**
* Enforce whitespace in and around the JSX opening and closing brackets.
*
* @see [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md)
*/
interface JsxTagSpacingRule {
/**
* Enforce whitespace in and around the JSX opening and closing brackets.
*
* @see [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-tag-spacing.md)
*/
'react/jsx-tag-spacing': JsxTagSpacingRuleConfig;
}
/**
* Disallow React to be incorrectly marked as unused.
*
* @see [jsx-uses-react](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md)
*/
type JsxUsesReactRuleConfig = RuleConfig<[]>;
/**
* Disallow React to be incorrectly marked as unused.
*
* @see [jsx-uses-react](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md)
*/
interface JsxUsesReactRule {
/**
* Disallow React to be incorrectly marked as unused.
*
* @see [jsx-uses-react](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-react.md)
*/
'react/jsx-uses-react': JsxUsesReactRuleConfig;
}
/**
* Disallow variables used in JSX to be incorrectly marked as unused.
*
* @see [jsx-uses-vars](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md)
*/
type JsxUsesVarsRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow variables used in JSX to be incorrectly marked as unused.
*
* @see [jsx-uses-vars](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md)
*/
interface JsxUsesVarsRule$1 {
/**
* Disallow variables used in JSX to be incorrectly marked as unused.
*
* @see [jsx-uses-vars](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-uses-vars.md)
*/
'react/jsx-uses-vars': JsxUsesVarsRuleConfig$1;
}
/**
* Option.
*/
interface JsxWrapMultilinesOption {
declaration?: true | false | 'ignore' | 'parens' | 'parens-new-line';
assignment?: true | false | 'ignore' | 'parens' | 'parens-new-line';
return?: true | false | 'ignore' | 'parens' | 'parens-new-line';
arrow?: true | false | 'ignore' | 'parens' | 'parens-new-line';
condition?: true | false | 'ignore' | 'parens' | 'parens-new-line';
logical?: true | false | 'ignore' | 'parens' | 'parens-new-line';
prop?: true | false | 'ignore' | 'parens' | 'parens-new-line';
}
/**
* Options.
*/
type JsxWrapMultilinesOptions = [JsxWrapMultilinesOption?];
/**
* Disallow missing parentheses around multiline JSX.
*
* @see [jsx-wrap-multilines](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md)
*/
type JsxWrapMultilinesRuleConfig = RuleConfig<JsxWrapMultilinesOptions>;
/**
* Disallow missing parentheses around multiline JSX.
*
* @see [jsx-wrap-multilines](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md)
*/
interface JsxWrapMultilinesRule {
/**
* Disallow missing parentheses around multiline JSX.
*
* @see [jsx-wrap-multilines](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/jsx-wrap-multilines.md)
*/
'react/jsx-wrap-multilines': JsxWrapMultilinesRuleConfig;
}
/**
* Disallow when this.state is accessed within setState.
*
* @see [no-access-state-in-setstate](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md)
*/
type NoAccessStateInSetstateRuleConfig = RuleConfig<[]>;
/**
* Disallow when this.state is accessed within setState.
*
* @see [no-access-state-in-setstate](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md)
*/
interface NoAccessStateInSetstateRule {
/**
* Disallow when this.state is accessed within setState.
*
* @see [no-access-state-in-setstate](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-access-state-in-setstate.md)
*/
'react/no-access-state-in-setstate': NoAccessStateInSetstateRuleConfig;
}
/**
* Disallow adjacent inline elements not separated by whitespace.
*
* @see [no-adjacent-inline-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md)
*/
type NoAdjacentInlineElementsRuleConfig = RuleConfig<[]>;
/**
* Disallow adjacent inline elements not separated by whitespace.
*
* @see [no-adjacent-inline-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md)
*/
interface NoAdjacentInlineElementsRule {
/**
* Disallow adjacent inline elements not separated by whitespace.
*
* @see [no-adjacent-inline-elements](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-adjacent-inline-elements.md)
*/
'react/no-adjacent-inline-elements': NoAdjacentInlineElementsRuleConfig;
}
/**
* Disallow usage of Array index in keys.
*
* @see [no-array-index-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md)
*/
type NoArrayIndexKeyRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of Array index in keys.
*
* @see [no-array-index-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md)
*/
interface NoArrayIndexKeyRule {
/**
* Disallow usage of Array index in keys.
*
* @see [no-array-index-key](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-array-index-key.md)
*/
'react/no-array-index-key': NoArrayIndexKeyRuleConfig;
}
/**
* Lifecycle methods should be methods on the prototype, not class fields.
*
* @see [no-arrow-function-lifecycle](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md)
*/
type NoArrowFunctionLifecycleRuleConfig = RuleConfig<[]>;
/**
* Lifecycle methods should be methods on the prototype, not class fields.
*
* @see [no-arrow-function-lifecycle](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md)
*/
interface NoArrowFunctionLifecycleRule {
/**
* Lifecycle methods should be methods on the prototype, not class fields.
*
* @see [no-arrow-function-lifecycle](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-arrow-function-lifecycle.md)
*/
'react/no-arrow-function-lifecycle': NoArrowFunctionLifecycleRuleConfig;
}
/**
* Option.
*/
interface NoChildrenPropOption {
allowFunctions?: boolean;
}
/**
* Options.
*/
type NoChildrenPropOptions = [NoChildrenPropOption?];
/**
* Disallow passing of children as props.
*
* @see [no-children-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md)
*/
type NoChildrenPropRuleConfig = RuleConfig<NoChildrenPropOptions>;
/**
* Disallow passing of children as props.
*
* @see [no-children-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md)
*/
interface NoChildrenPropRule {
/**
* Disallow passing of children as props.
*
* @see [no-children-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-children-prop.md)
*/
'react/no-children-prop': NoChildrenPropRuleConfig;
}
/**
* Disallow usage of dangerous JSX properties.
*
* @see [no-danger](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md)
*/
type NoDangerRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of dangerous JSX properties.
*
* @see [no-danger](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md)
*/
interface NoDangerRule {
/**
* Disallow usage of dangerous JSX properties.
*
* @see [no-danger](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger.md)
*/
'react/no-danger': NoDangerRuleConfig;
}
/**
* Disallow when a DOM element is using both children and dangerouslySetInnerHTML.
*
* @see [no-danger-with-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md)
*/
type NoDangerWithChildrenRuleConfig = RuleConfig<[]>;
/**
* Disallow when a DOM element is using both children and dangerouslySetInnerHTML.
*
* @see [no-danger-with-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md)
*/
interface NoDangerWithChildrenRule {
/**
* Disallow when a DOM element is using both children and dangerouslySetInnerHTML.
*
* @see [no-danger-with-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-danger-with-children.md)
*/
'react/no-danger-with-children': NoDangerWithChildrenRuleConfig;
}
/**
* Disallow usage of deprecated methods.
*
* @see [no-deprecated](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md)
*/
type NoDeprecatedRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of deprecated methods.
*
* @see [no-deprecated](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md)
*/
interface NoDeprecatedRule {
/**
* Disallow usage of deprecated methods.
*
* @see [no-deprecated](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-deprecated.md)
*/
'react/no-deprecated': NoDeprecatedRuleConfig;
}
/**
* Option.
*/
type NoDidMountSetStateOption = 'disallow-in-func';
/**
* Options.
*/
type NoDidMountSetStateOptions = [NoDidMountSetStateOption?];
/**
* Disallow usage of setState in componentDidMount.
*
* @see [no-did-mount-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md)
*/
type NoDidMountSetStateRuleConfig =
RuleConfig<NoDidMountSetStateOptions>;
/**
* Disallow usage of setState in componentDidMount.
*
* @see [no-did-mount-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md)
*/
interface NoDidMountSetStateRule {
/**
* Disallow usage of setState in componentDidMount.
*
* @see [no-did-mount-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-mount-set-state.md)
*/
'react/no-did-mount-set-state': NoDidMountSetStateRuleConfig;
}
/**
* Option.
*/
type NoDidUpdateSetStateOption = 'disallow-in-func';
/**
* Options.
*/
type NoDidUpdateSetStateOptions = [NoDidUpdateSetStateOption?];
/**
* Disallow usage of setState in componentDidUpdate.
*
* @see [no-did-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md)
*/
type NoDidUpdateSetStateRuleConfig =
RuleConfig<NoDidUpdateSetStateOptions>;
/**
* Disallow usage of setState in componentDidUpdate.
*
* @see [no-did-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md)
*/
interface NoDidUpdateSetStateRule {
/**
* Disallow usage of setState in componentDidUpdate.
*
* @see [no-did-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-did-update-set-state.md)
*/
'react/no-did-update-set-state': NoDidUpdateSetStateRuleConfig;
}
/**
* Disallow direct mutation of this.state.
*
* @see [no-direct-mutation-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md)
*/
type NoDirectMutationStateRuleConfig = RuleConfig<[]>;
/**
* Disallow direct mutation of this.state.
*
* @see [no-direct-mutation-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md)
*/
interface NoDirectMutationStateRule {
/**
* Disallow direct mutation of this.state.
*
* @see [no-direct-mutation-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-direct-mutation-state.md)
*/
'react/no-direct-mutation-state': NoDirectMutationStateRuleConfig;
}
/**
* Disallow usage of findDOMNode.
*
* @see [no-find-dom-node](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md)
*/
type NoFindDomNodeRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of findDOMNode.
*
* @see [no-find-dom-node](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md)
*/
interface NoFindDomNodeRule {
/**
* Disallow usage of findDOMNode.
*
* @see [no-find-dom-node](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-find-dom-node.md)
*/
'react/no-find-dom-node': NoFindDomNodeRuleConfig;
}
/**
* Option.
*/
type NoInvalidHtmlAttributeOption = 'rel'[];
/**
* Options.
*/
type NoInvalidHtmlAttributeOptions = [NoInvalidHtmlAttributeOption?];
/**
* Disallow usage of invalid attributes.
*
* @see [no-invalid-html-attribute](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md)
*/
type NoInvalidHtmlAttributeRuleConfig =
RuleConfig<NoInvalidHtmlAttributeOptions>;
/**
* Disallow usage of invalid attributes.
*
* @see [no-invalid-html-attribute](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md)
*/
interface NoInvalidHtmlAttributeRule {
/**
* Disallow usage of invalid attributes.
*
* @see [no-invalid-html-attribute](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-invalid-html-attribute.md)
*/
'react/no-invalid-html-attribute': NoInvalidHtmlAttributeRuleConfig;
}
/**
* Disallow usage of isMounted.
*
* @see [no-is-mounted](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md)
*/
type NoIsMountedRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of isMounted.
*
* @see [no-is-mounted](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md)
*/
interface NoIsMountedRule {
/**
* Disallow usage of isMounted.
*
* @see [no-is-mounted](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-is-mounted.md)
*/
'react/no-is-mounted': NoIsMountedRuleConfig;
}
/**
* Option.
*/
interface NoMultiCompOption {
ignoreStateless?: boolean;
}
/**
* Options.
*/
type NoMultiCompOptions = [NoMultiCompOption?];
/**
* Disallow multiple component definition per file.
*
* @see [no-multi-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md)
*/
type NoMultiCompRuleConfig = RuleConfig<NoMultiCompOptions>;
/**
* Disallow multiple component definition per file.
*
* @see [no-multi-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md)
*/
interface NoMultiCompRule {
/**
* Disallow multiple component definition per file.
*
* @see [no-multi-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-multi-comp.md)
*/
'react/no-multi-comp': NoMultiCompRuleConfig;
}
/**
* Enforce that namespaces are not used in React elements.
*
* @see [no-namespace](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md)
*/
type NoNamespaceRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce that namespaces are not used in React elements.
*
* @see [no-namespace](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md)
*/
interface NoNamespaceRule$1 {
/**
* Enforce that namespaces are not used in React elements.
*
* @see [no-namespace](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-namespace.md)
*/
'react/no-namespace': NoNamespaceRuleConfig$1;
}
/**
* Disallow usage of referential-type variables as default param in functional component.
*
* @see [no-object-type-as-default-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md)
*/
type NoObjectTypeAsDefaultPropRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of referential-type variables as default param in functional component.
*
* @see [no-object-type-as-default-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md)
*/
interface NoObjectTypeAsDefaultPropRule {
/**
* Disallow usage of referential-type variables as default param in functional component.
*
* @see [no-object-type-as-default-prop](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-object-type-as-default-prop.md)
*/
'react/no-object-type-as-default-prop': NoObjectTypeAsDefaultPropRuleConfig;
}
/**
* Disallow usage of shouldComponentUpdate when extending React.PureComponent.
*
* @see [no-redundant-should-component-update](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md)
*/
type NoRedundantShouldComponentUpdateRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of shouldComponentUpdate when extending React.PureComponent.
*
* @see [no-redundant-should-component-update](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md)
*/
interface NoRedundantShouldComponentUpdateRule {
/**
* Disallow usage of shouldComponentUpdate when extending React.PureComponent.
*
* @see [no-redundant-should-component-update](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-redundant-should-component-update.md)
*/
'react/no-redundant-should-component-update': NoRedundantShouldComponentUpdateRuleConfig;
}
/**
* Disallow usage of the return value of ReactDOM.render.
*
* @see [no-render-return-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md)
*/
type NoRenderReturnValueRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of the return value of ReactDOM.render.
*
* @see [no-render-return-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md)
*/
interface NoRenderReturnValueRule {
/**
* Disallow usage of the return value of ReactDOM.render.
*
* @see [no-render-return-value](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-render-return-value.md)
*/
'react/no-render-return-value': NoRenderReturnValueRuleConfig;
}
/**
* Disallow usage of setState.
*
* @see [no-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md)
*/
type NoSetStateRuleConfig = RuleConfig<[]>;
/**
* Disallow usage of setState.
*
* @see [no-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md)
*/
interface NoSetStateRule {
/**
* Disallow usage of setState.
*
* @see [no-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-set-state.md)
*/
'react/no-set-state': NoSetStateRuleConfig;
}
/**
* Option.
*/
interface NoStringRefsOption {
noTemplateLiterals?: boolean;
}
/**
* Options.
*/
type NoStringRefsOptions = [NoStringRefsOption?];
/**
* Disallow using string references.
*
* @see [no-string-refs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md)
*/
type NoStringRefsRuleConfig = RuleConfig<NoStringRefsOptions>;
/**
* Disallow using string references.
*
* @see [no-string-refs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md)
*/
interface NoStringRefsRule {
/**
* Disallow using string references.
*
* @see [no-string-refs](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-string-refs.md)
*/
'react/no-string-refs': NoStringRefsRuleConfig;
}
/**
* Disallow `this` from being used in stateless functional components.
*
* @see [no-this-in-sfc](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md)
*/
type NoThisInSfcRuleConfig = RuleConfig<[]>;
/**
* Disallow `this` from being used in stateless functional components.
*
* @see [no-this-in-sfc](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md)
*/
interface NoThisInSfcRule {
/**
* Disallow `this` from being used in stateless functional components.
*
* @see [no-this-in-sfc](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-this-in-sfc.md)
*/
'react/no-this-in-sfc': NoThisInSfcRuleConfig;
}
/**
* Disallow common typos.
*
* @see [no-typos](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md)
*/
type NoTyposRuleConfig = RuleConfig<[]>;
/**
* Disallow common typos.
*
* @see [no-typos](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md)
*/
interface NoTyposRule {
/**
* Disallow common typos.
*
* @see [no-typos](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-typos.md)
*/
'react/no-typos': NoTyposRuleConfig;
}
/**
* Option.
*/
interface NoUnescapedEntitiesOption {
forbid?: (
| string
| {
char?: string;
alternatives?: string[];
[k: string]: any;
}
)[];
}
/**
* Options.
*/
type NoUnescapedEntitiesOptions = [NoUnescapedEntitiesOption?];
/**
* Disallow unescaped HTML entities from appearing in markup.
*
* @see [no-unescaped-entities](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md)
*/
type NoUnescapedEntitiesRuleConfig =
RuleConfig<NoUnescapedEntitiesOptions>;
/**
* Disallow unescaped HTML entities from appearing in markup.
*
* @see [no-unescaped-entities](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md)
*/
interface NoUnescapedEntitiesRule {
/**
* Disallow unescaped HTML entities from appearing in markup.
*
* @see [no-unescaped-entities](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unescaped-entities.md)
*/
'react/no-unescaped-entities': NoUnescapedEntitiesRuleConfig;
}
/**
* Option.
*/
interface NoUnknownPropertyOption {
ignore?: string[];
}
/**
* Options.
*/
type NoUnknownPropertyOptions = [NoUnknownPropertyOption?];
/**
* Disallow usage of unknown DOM property.
*
* @see [no-unknown-property](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md)
*/
type NoUnknownPropertyRuleConfig = RuleConfig<NoUnknownPropertyOptions>;
/**
* Disallow usage of unknown DOM property.
*
* @see [no-unknown-property](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md)
*/
interface NoUnknownPropertyRule {
/**
* Disallow usage of unknown DOM property.
*
* @see [no-unknown-property](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unknown-property.md)
*/
'react/no-unknown-property': NoUnknownPropertyRuleConfig;
}
/**
* Option.
*/
interface NoUnsafeOption {
checkAliases?: boolean;
}
/**
* Options.
*/
type NoUnsafeOptions = [NoUnsafeOption?];
/**
* Disallow usage of unsafe lifecycle methods.
*
* @see [no-unsafe](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md)
*/
type NoUnsafeRuleConfig = RuleConfig<NoUnsafeOptions>;
/**
* Disallow usage of unsafe lifecycle methods.
*
* @see [no-unsafe](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md)
*/
interface NoUnsafeRule {
/**
* Disallow usage of unsafe lifecycle methods.
*
* @see [no-unsafe](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unsafe.md)
*/
'react/no-unsafe': NoUnsafeRuleConfig;
}
/**
* Option.
*/
interface NoUnstableNestedComponentsOption {
customValidators?: string[];
allowAsProps?: boolean;
}
/**
* Options.
*/
type NoUnstableNestedComponentsOptions = [
NoUnstableNestedComponentsOption?,
];
/**
* Disallow creating unstable components inside components.
*
* @see [no-unstable-nested-components](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md)
*/
type NoUnstableNestedComponentsRuleConfig =
RuleConfig<NoUnstableNestedComponentsOptions>;
/**
* Disallow creating unstable components inside components.
*
* @see [no-unstable-nested-components](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md)
*/
interface NoUnstableNestedComponentsRule {
/**
* Disallow creating unstable components inside components.
*
* @see [no-unstable-nested-components](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unstable-nested-components.md)
*/
'react/no-unstable-nested-components': NoUnstableNestedComponentsRuleConfig;
}
/**
* Disallow declaring unused methods of component class.
*
* @see [no-unused-class-component-methods](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md)
*/
type NoUnusedClassComponentMethodsRuleConfig = RuleConfig<[]>;
/**
* Disallow declaring unused methods of component class.
*
* @see [no-unused-class-component-methods](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md)
*/
interface NoUnusedClassComponentMethodsRule {
/**
* Disallow declaring unused methods of component class.
*
* @see [no-unused-class-component-methods](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-class-component-methods.md)
*/
'react/no-unused-class-component-methods': NoUnusedClassComponentMethodsRuleConfig;
}
/**
* Option.
*/
interface NoUnusedPropTypesOption {
ignore?: string[];
customValidators?: string[];
skipShapeProps?: boolean;
}
/**
* Options.
*/
type NoUnusedPropTypesOptions = [NoUnusedPropTypesOption?];
/**
* Disallow definitions of unused propTypes.
*
* @see [no-unused-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md)
*/
type NoUnusedPropTypesRuleConfig = RuleConfig<NoUnusedPropTypesOptions>;
/**
* Disallow definitions of unused propTypes.
*
* @see [no-unused-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md)
*/
interface NoUnusedPropTypesRule {
/**
* Disallow definitions of unused propTypes.
*
* @see [no-unused-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-prop-types.md)
*/
'react/no-unused-prop-types': NoUnusedPropTypesRuleConfig;
}
/**
* Disallow definitions of unused state.
*
* @see [no-unused-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md)
*/
type NoUnusedStateRuleConfig = RuleConfig<[]>;
/**
* Disallow definitions of unused state.
*
* @see [no-unused-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md)
*/
interface NoUnusedStateRule {
/**
* Disallow definitions of unused state.
*
* @see [no-unused-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-unused-state.md)
*/
'react/no-unused-state': NoUnusedStateRuleConfig;
}
/**
* Option.
*/
type NoWillUpdateSetStateOption = 'disallow-in-func';
/**
* Options.
*/
type NoWillUpdateSetStateOptions = [NoWillUpdateSetStateOption?];
/**
* Disallow usage of setState in componentWillUpdate.
*
* @see [no-will-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md)
*/
type NoWillUpdateSetStateRuleConfig =
RuleConfig<NoWillUpdateSetStateOptions>;
/**
* Disallow usage of setState in componentWillUpdate.
*
* @see [no-will-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md)
*/
interface NoWillUpdateSetStateRule {
/**
* Disallow usage of setState in componentWillUpdate.
*
* @see [no-will-update-set-state](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/no-will-update-set-state.md)
*/
'react/no-will-update-set-state': NoWillUpdateSetStateRuleConfig;
}
/**
* Option.
*/
type PreferEs6ClassOption = 'always' | 'never';
/**
* Options.
*/
type PreferEs6ClassOptions = [PreferEs6ClassOption?];
/**
* Enforce ES5 or ES6 class for React Components.
*
* @see [prefer-es6-class](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md)
*/
type PreferEs6ClassRuleConfig = RuleConfig<PreferEs6ClassOptions>;
/**
* Enforce ES5 or ES6 class for React Components.
*
* @see [prefer-es6-class](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md)
*/
interface PreferEs6ClassRule {
/**
* Enforce ES5 or ES6 class for React Components.
*
* @see [prefer-es6-class](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-es6-class.md)
*/
'react/prefer-es6-class': PreferEs6ClassRuleConfig;
}
/**
* Prefer exact proptype definitions.
*
* @see [prefer-exact-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md)
*/
type PreferExactPropsRuleConfig = RuleConfig<[]>;
/**
* Prefer exact proptype definitions.
*
* @see [prefer-exact-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md)
*/
interface PreferExactPropsRule {
/**
* Prefer exact proptype definitions.
*
* @see [prefer-exact-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-exact-props.md)
*/
'react/prefer-exact-props': PreferExactPropsRuleConfig;
}
/**
* Enforce that props are read-only.
*
* @see [prefer-read-only-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md)
*/
type PreferReadOnlyPropsRuleConfig = RuleConfig<[]>;
/**
* Enforce that props are read-only.
*
* @see [prefer-read-only-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md)
*/
interface PreferReadOnlyPropsRule {
/**
* Enforce that props are read-only.
*
* @see [prefer-read-only-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-read-only-props.md)
*/
'react/prefer-read-only-props': PreferReadOnlyPropsRuleConfig;
}
/**
* Option.
*/
interface PreferStatelessFunctionOption {
ignorePureComponents?: boolean;
}
/**
* Options.
*/
type PreferStatelessFunctionOptions = [PreferStatelessFunctionOption?];
/**
* Enforce stateless components to be written as a pure function.
*
* @see [prefer-stateless-function](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md)
*/
type PreferStatelessFunctionRuleConfig =
RuleConfig<PreferStatelessFunctionOptions>;
/**
* Enforce stateless components to be written as a pure function.
*
* @see [prefer-stateless-function](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md)
*/
interface PreferStatelessFunctionRule {
/**
* Enforce stateless components to be written as a pure function.
*
* @see [prefer-stateless-function](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prefer-stateless-function.md)
*/
'react/prefer-stateless-function': PreferStatelessFunctionRuleConfig;
}
/**
* Option.
*/
interface PropTypesOption {
ignore?: string[];
customValidators?: string[];
skipUndeclared?: boolean;
}
/**
* Options.
*/
type PropTypesOptions = [PropTypesOption?];
/**
* Disallow missing props validation in a React component definition.
*
* @see [prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md)
*/
type PropTypesRuleConfig = RuleConfig<PropTypesOptions>;
/**
* Disallow missing props validation in a React component definition.
*
* @see [prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md)
*/
interface PropTypesRule {
/**
* Disallow missing props validation in a React component definition.
*
* @see [prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/prop-types.md)
*/
'react/prop-types': PropTypesRuleConfig;
}
/**
* Disallow missing React when using JSX.
*
* @see [react-in-jsx-scope](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md)
*/
type ReactInJsxScopeRuleConfig = RuleConfig<[]>;
/**
* Disallow missing React when using JSX.
*
* @see [react-in-jsx-scope](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md)
*/
interface ReactInJsxScopeRule {
/**
* Disallow missing React when using JSX.
*
* @see [react-in-jsx-scope](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/react-in-jsx-scope.md)
*/
'react/react-in-jsx-scope': ReactInJsxScopeRuleConfig;
}
/**
* Option.
*/
interface RequireDefaultPropsOption {
forbidDefaultForRequired?: boolean;
classes?: 'defaultProps' | 'ignore';
functions?: 'defaultArguments' | 'defaultProps' | 'ignore';
ignoreFunctionalComponents?: boolean;
}
/**
* Options.
*/
type RequireDefaultPropsOptions = [RequireDefaultPropsOption?];
/**
* Enforce a defaultProps definition for every prop that is not a required prop.
*
* @see [require-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md)
*/
type RequireDefaultPropsRuleConfig =
RuleConfig<RequireDefaultPropsOptions>;
/**
* Enforce a defaultProps definition for every prop that is not a required prop.
*
* @see [require-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md)
*/
interface RequireDefaultPropsRule {
/**
* Enforce a defaultProps definition for every prop that is not a required prop.
*
* @see [require-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-default-props.md)
*/
'react/require-default-props': RequireDefaultPropsRuleConfig;
}
/**
* Option.
*/
interface RequireOptimizationOption {
allowDecorators?: string[];
}
/**
* Options.
*/
type RequireOptimizationOptions = [RequireOptimizationOption?];
/**
* Enforce React components to have a shouldComponentUpdate method.
*
* @see [require-optimization](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md)
*/
type RequireOptimizationRuleConfig =
RuleConfig<RequireOptimizationOptions>;
/**
* Enforce React components to have a shouldComponentUpdate method.
*
* @see [require-optimization](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md)
*/
interface RequireOptimizationRule {
/**
* Enforce React components to have a shouldComponentUpdate method.
*
* @see [require-optimization](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-optimization.md)
*/
'react/require-optimization': RequireOptimizationRuleConfig;
}
/**
* Enforce ES5 or ES6 class for returning value in render function.
*
* @see [require-render-return](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md)
*/
type RequireRenderReturnRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce ES5 or ES6 class for returning value in render function.
*
* @see [require-render-return](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md)
*/
interface RequireRenderReturnRule$1 {
/**
* Enforce ES5 or ES6 class for returning value in render function.
*
* @see [require-render-return](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/require-render-return.md)
*/
'react/require-render-return': RequireRenderReturnRuleConfig$1;
}
/**
* Option.
*/
interface SelfClosingCompOption {
component?: boolean;
html?: boolean;
}
/**
* Options.
*/
type SelfClosingCompOptions = [SelfClosingCompOption?];
/**
* Disallow extra closing tags for components without children.
*
* @see [self-closing-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md)
*/
type SelfClosingCompRuleConfig = RuleConfig<SelfClosingCompOptions>;
/**
* Disallow extra closing tags for components without children.
*
* @see [self-closing-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md)
*/
interface SelfClosingCompRule {
/**
* Disallow extra closing tags for components without children.
*
* @see [self-closing-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/self-closing-comp.md)
*/
'react/self-closing-comp': SelfClosingCompRuleConfig;
}
/**
* Option.
*/
interface SortCompOption {
order?: string[];
groups?: {
/**
*/
[k: string]: string[];
};
}
/**
* Options.
*/
type SortCompOptions = [SortCompOption?];
/**
* Enforce component methods order.
*
* @see [sort-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md)
*/
type SortCompRuleConfig = RuleConfig<SortCompOptions>;
/**
* Enforce component methods order.
*
* @see [sort-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md)
*/
interface SortCompRule {
/**
* Enforce component methods order.
*
* @see [sort-comp](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-comp.md)
*/
'react/sort-comp': SortCompRuleConfig;
}
/**
* Option.
*/
interface SortDefaultPropsOption {
ignoreCase?: boolean;
}
/**
* Options.
*/
type SortDefaultPropsOptions = [SortDefaultPropsOption?];
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @see [sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md)
*/
type SortDefaultPropsRuleConfig = RuleConfig<SortDefaultPropsOptions>;
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @see [sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md)
*/
interface SortDefaultPropsRule {
/**
* Enforce defaultProps declarations alphabetical sorting.
*
* @see [sort-default-props](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-default-props.md)
*/
'react/sort-default-props': SortDefaultPropsRuleConfig;
}
/**
* Option.
*/
interface SortPropTypesOption {
requiredFirst?: boolean;
callbacksLast?: boolean;
ignoreCase?: boolean;
noSortAlphabetically?: boolean;
sortShapeProp?: boolean;
}
/**
* Options.
*/
type SortPropTypesOptions = [SortPropTypesOption?];
/**
* Enforce propTypes declarations alphabetical sorting.
*
* @see [sort-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md)
*/
type SortPropTypesRuleConfig = RuleConfig<SortPropTypesOptions>;
/**
* Enforce propTypes declarations alphabetical sorting.
*
* @see [sort-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md)
*/
interface SortPropTypesRule {
/**
* Enforce propTypes declarations alphabetical sorting.
*
* @see [sort-prop-types](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/sort-prop-types.md)
*/
'react/sort-prop-types': SortPropTypesRuleConfig;
}
/**
* Option.
*/
type StateInConstructorOption = 'always' | 'never';
/**
* Options.
*/
type StateInConstructorOptions = [StateInConstructorOption?];
/**
* Enforce class component state initialization style.
*
* @see [state-in-constructor](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md)
*/
type StateInConstructorRuleConfig =
RuleConfig<StateInConstructorOptions>;
/**
* Enforce class component state initialization style.
*
* @see [state-in-constructor](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md)
*/
interface StateInConstructorRule {
/**
* Enforce class component state initialization style.
*
* @see [state-in-constructor](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/state-in-constructor.md)
*/
'react/state-in-constructor': StateInConstructorRuleConfig;
}
/**
* Config.
*/
interface StaticPropertyPlacementConfig {
propTypes?: 'static public field' | 'static getter' | 'property assignment';
defaultProps?:
| 'static public field'
| 'static getter'
| 'property assignment';
childContextTypes?:
| 'static public field'
| 'static getter'
| 'property assignment';
contextTypes?:
| 'static public field'
| 'static getter'
| 'property assignment';
contextType?: 'static public field' | 'static getter' | 'property assignment';
displayName?: 'static public field' | 'static getter' | 'property assignment';
}
/**
* Option.
*/
type StaticPropertyPlacementOption =
| 'static public field'
| 'static getter'
| 'property assignment';
/**
* Options.
*/
type StaticPropertyPlacementOptions = [
StaticPropertyPlacementOption?,
StaticPropertyPlacementConfig?,
];
/**
* Enforces where React component static properties should be positioned.
*
* @see [static-property-placement](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md)
*/
type StaticPropertyPlacementRuleConfig =
RuleConfig<StaticPropertyPlacementOptions>;
/**
* Enforces where React component static properties should be positioned.
*
* @see [static-property-placement](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md)
*/
interface StaticPropertyPlacementRule {
/**
* Enforces where React component static properties should be positioned.
*
* @see [static-property-placement](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/static-property-placement.md)
*/
'react/static-property-placement': StaticPropertyPlacementRuleConfig;
}
/**
* Option.
*/
interface StylePropObjectOption {
allow?: string[];
[k: string]: any;
}
/**
* Options.
*/
type StylePropObjectOptions = [StylePropObjectOption?];
/**
* Enforce style prop value is an object.
*
* @see [style-prop-object](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md)
*/
type StylePropObjectRuleConfig = RuleConfig<StylePropObjectOptions>;
/**
* Enforce style prop value is an object.
*
* @see [style-prop-object](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md)
*/
interface StylePropObjectRule {
/**
* Enforce style prop value is an object.
*
* @see [style-prop-object](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/style-prop-object.md)
*/
'react/style-prop-object': StylePropObjectRuleConfig;
}
/**
* Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children.
*
* @see [void-dom-elements-no-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md)
*/
type VoidDomElementsNoChildrenRuleConfig = RuleConfig<[]>;
/**
* Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children.
*
* @see [void-dom-elements-no-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md)
*/
interface VoidDomElementsNoChildrenRule {
/**
* Disallow void DOM elements (e.g. `<img />`, `<br />`) from receiving children.
*
* @see [void-dom-elements-no-children](https://github.com/jsx-eslint/eslint-plugin-react/tree/master/docs/rules/void-dom-elements-no-children.md)
*/
'react/void-dom-elements-no-children': VoidDomElementsNoChildrenRuleConfig;
}
/**
* All React rules.
*/
type ReactRules = BooleanPropNamingRule &
ButtonHasTypeRule &
DefaultPropsMatchPropTypesRule &
DestructuringAssignmentRule &
DisplayNameRule &
ForbidComponentPropsRule &
ForbidDomPropsRule &
ForbidElementsRule &
ForbidForeignPropTypesRule &
ForbidPropTypesRule &
FunctionComponentDefinitionRule &
HookUseStateRule &
IframeMissingSandboxRule &
JsxBooleanValueRule &
JsxChildElementSpacingRule &
JsxClosingBracketLocationRule &
JsxClosingTagLocationRule &
JsxCurlySpacingRule &
JsxCurlyNewlineRule &
JsxEqualsSpacingRule &
JsxFilenameExtensionRule &
JsxFirstPropNewLineRule &
JsxHandlerNamesRule &
JsxIndentRule &
JsxIndentPropsRule &
JsxKeyRule &
JsxMaxDepthRule &
JsxMaxPropsPerLineRule &
JsxNewlineRule &
JsxNoBindRule &
JsxNoCommentTextnodesRule &
JsxNoConstructedContextValuesRule &
JsxNoDuplicatePropsRule &
JsxNoLeakedRenderRule &
JsxNoLiteralsRule &
JsxNoScriptUrlRule &
JsxNoTargetBlankRule &
JsxNoUselessFragmentRule &
JsxOneExpressionPerLineRule &
JsxNoUndefRule &
JsxCurlyBracePresenceRule &
JsxPascalCaseRule &
JsxFragmentsRule &
JsxPropsNoMultiSpacesRule &
JsxPropsNoSpreadingRule &
JsxSortDefaultPropsRule &
JsxSortPropsRule &
JsxSpaceBeforeClosingRule &
JsxTagSpacingRule &
JsxUsesReactRule &
JsxUsesVarsRule$1 &
JsxWrapMultilinesRule &
NoInvalidHtmlAttributeRule &
NoAccessStateInSetstateRule &
NoAdjacentInlineElementsRule &
NoArrayIndexKeyRule &
NoArrowFunctionLifecycleRule &
NoChildrenPropRule &
NoDangerRule &
NoDangerWithChildrenRule &
NoDeprecatedRule &
NoDidMountSetStateRule &
NoDidUpdateSetStateRule &
NoDirectMutationStateRule &
NoFindDomNodeRule &
NoIsMountedRule &
NoMultiCompRule &
NoNamespaceRule$1 &
NoSetStateRule &
NoStringRefsRule &
NoRedundantShouldComponentUpdateRule &
NoRenderReturnValueRule &
NoThisInSfcRule &
NoTyposRule &
NoUnescapedEntitiesRule &
NoUnknownPropertyRule &
NoUnsafeRule &
NoUnstableNestedComponentsRule &
NoUnusedClassComponentMethodsRule &
NoUnusedPropTypesRule &
NoUnusedStateRule &
NoObjectTypeAsDefaultPropRule &
NoWillUpdateSetStateRule &
PreferEs6ClassRule &
PreferExactPropsRule &
PreferReadOnlyPropsRule &
PreferStatelessFunctionRule &
PropTypesRule &
ReactInJsxScopeRule &
RequireDefaultPropsRule &
RequireOptimizationRule &
RequireRenderReturnRule$1 &
SelfClosingCompRule &
SortCompRule &
SortDefaultPropsRule &
SortPropTypesRule &
StateInConstructorRule &
StaticPropertyPlacementRule &
StylePropObjectRule &
VoidDomElementsNoChildrenRule;
/**
* Option.
*/
interface ExhaustiveDepsOption {
additionalHooks?: string;
enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean;
}
/**
* Options.
*/
type ExhaustiveDepsOptions = [ExhaustiveDepsOption?];
/**
* Verifies the list of dependencies for Hooks like useEffect and similar.
*
* @see [exhaustive-deps](https://github.com/facebook/react/issues/14920)
*/
type ExhaustiveDepsRuleConfig = RuleConfig<ExhaustiveDepsOptions>;
/**
* Verifies the list of dependencies for Hooks like useEffect and similar.
*
* @see [exhaustive-deps](https://github.com/facebook/react/issues/14920)
*/
interface ExhaustiveDepsRule {
/**
* Verifies the list of dependencies for Hooks like useEffect and similar.
*
* @see [exhaustive-deps](https://github.com/facebook/react/issues/14920)
*/
'react-hooks/exhaustive-deps': ExhaustiveDepsRuleConfig;
}
/**
* Enforces the Rules of Hooks.
*
* @see [rules-of-hooks](https://reactjs.org/docs/hooks-rules.html)
*/
type RulesOfHooksRuleConfig = RuleConfig<[]>;
/**
* Enforces the Rules of Hooks.
*
* @see [rules-of-hooks](https://reactjs.org/docs/hooks-rules.html)
*/
interface RulesOfHooksRule {
/**
* Enforces the Rules of Hooks.
*
* @see [rules-of-hooks](https://reactjs.org/docs/hooks-rules.html)
*/
'react-hooks/rules-of-hooks': RulesOfHooksRuleConfig;
}
/**
* All ReactHooks rules.
*/
type ReactHooksRules = RulesOfHooksRule & ExhaustiveDepsRule;
/**
* Config.
*/
type CognitiveComplexityConfig = 'sonar-runtime' | 'metric';
/**
* Option.
*/
type CognitiveComplexityOption = number;
/**
* Options.
*/
type CognitiveComplexityOptions = [
CognitiveComplexityOption?,
CognitiveComplexityConfig?,
];
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
type CognitiveComplexityRuleConfig =
RuleConfig<CognitiveComplexityOptions>;
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
interface CognitiveComplexityRule {
/**
* Cognitive Complexity of functions should not be too high.
*
* @see [cognitive-complexity](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/cognitive-complexity.md)
*/
'sonarjs/cognitive-complexity': CognitiveComplexityRuleConfig;
}
/**
* "if ... else if" constructs should end with "else" clauses.
*
* @see [elseif-without-else](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/elseif-without-else.md)
*/
type ElseifWithoutElseRuleConfig = RuleConfig<[]>;
/**
* "if ... else if" constructs should end with "else" clauses.
*
* @see [elseif-without-else](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/elseif-without-else.md)
*/
interface ElseifWithoutElseRule {
/**
* "if ... else if" constructs should end with "else" clauses.
*
* @see [elseif-without-else](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/elseif-without-else.md)
*/
'sonarjs/elseif-without-else': ElseifWithoutElseRuleConfig;
}
/**
* Option.
*/
type MaxSwitchCasesOption = number;
/**
* Options.
*/
type MaxSwitchCasesOptions = [MaxSwitchCasesOption?];
/**
* "switch" statements should not have too many "case" clauses.
*
* @see [max-switch-cases](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/max-switch-cases.md)
*/
type MaxSwitchCasesRuleConfig = RuleConfig<MaxSwitchCasesOptions>;
/**
* "switch" statements should not have too many "case" clauses.
*
* @see [max-switch-cases](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/max-switch-cases.md)
*/
interface MaxSwitchCasesRule {
/**
* "switch" statements should not have too many "case" clauses.
*
* @see [max-switch-cases](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/max-switch-cases.md)
*/
'sonarjs/max-switch-cases': MaxSwitchCasesRuleConfig;
}
/**
* All branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-all-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-all-duplicated-branches.md)
*/
type NoAllDuplicatedBranchesRuleConfig = RuleConfig<[]>;
/**
* All branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-all-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-all-duplicated-branches.md)
*/
interface NoAllDuplicatedBranchesRule {
/**
* All branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-all-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-all-duplicated-branches.md)
*/
'sonarjs/no-all-duplicated-branches': NoAllDuplicatedBranchesRuleConfig;
}
/**
* Option.
*/
type NoCollapsibleIfOption = 'sonar-runtime';
/**
* Options.
*/
type NoCollapsibleIfOptions = [NoCollapsibleIfOption?];
/**
* Collapsible "if" statements should be merged.
*
* @see [no-collapsible-if](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collapsible-if.md)
*/
type NoCollapsibleIfRuleConfig = RuleConfig<NoCollapsibleIfOptions>;
/**
* Collapsible "if" statements should be merged.
*
* @see [no-collapsible-if](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collapsible-if.md)
*/
interface NoCollapsibleIfRule {
/**
* Collapsible "if" statements should be merged.
*
* @see [no-collapsible-if](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collapsible-if.md)
*/
'sonarjs/no-collapsible-if': NoCollapsibleIfRuleConfig;
}
/**
* Collection sizes and array length comparisons should make sense.
*
* @see [no-collection-size-mischeck](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collection-size-mischeck.md)
*/
type NoCollectionSizeMischeckRuleConfig = RuleConfig<[]>;
/**
* Collection sizes and array length comparisons should make sense.
*
* @see [no-collection-size-mischeck](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collection-size-mischeck.md)
*/
interface NoCollectionSizeMischeckRule {
/**
* Collection sizes and array length comparisons should make sense.
*
* @see [no-collection-size-mischeck](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-collection-size-mischeck.md)
*/
'sonarjs/no-collection-size-mischeck': NoCollectionSizeMischeckRuleConfig;
}
/**
* Config.
*/
type NoDuplicateStringConfig = 'sonar-runtime';
/**
* Option.
*/
interface NoDuplicateStringOption {
threshold?: number;
ignoreStrings?: string;
[k: string]: any;
}
/**
* Options.
*/
type NoDuplicateStringOptions = [
NoDuplicateStringOption?,
NoDuplicateStringConfig?,
];
/**
* String literals should not be duplicated.
*
* @see [no-duplicate-string](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicate-string.md)
*/
type NoDuplicateStringRuleConfig = RuleConfig<NoDuplicateStringOptions>;
/**
* String literals should not be duplicated.
*
* @see [no-duplicate-string](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicate-string.md)
*/
interface NoDuplicateStringRule {
/**
* String literals should not be duplicated.
*
* @see [no-duplicate-string](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicate-string.md)
*/
'sonarjs/no-duplicate-string': NoDuplicateStringRuleConfig;
}
/**
* Option.
*/
type NoDuplicatedBranchesOption = 'sonar-runtime';
/**
* Options.
*/
type NoDuplicatedBranchesOptions = [NoDuplicatedBranchesOption?];
/**
* Two branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicated-branches.md)
*/
type NoDuplicatedBranchesRuleConfig =
RuleConfig<NoDuplicatedBranchesOptions>;
/**
* Two branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicated-branches.md)
*/
interface NoDuplicatedBranchesRule {
/**
* Two branches in a conditional structure should not have exactly the same implementation.
*
* @see [no-duplicated-branches](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-duplicated-branches.md)
*/
'sonarjs/no-duplicated-branches': NoDuplicatedBranchesRuleConfig;
}
/**
* Option.
*/
type NoElementOverwriteOption = 'sonar-runtime';
/**
* Options.
*/
type NoElementOverwriteOptions = [NoElementOverwriteOption?];
/**
* Collection elements should not be replaced unconditionally.
*
* @see [no-element-overwrite](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-element-overwrite.md)
*/
type NoElementOverwriteRuleConfig =
RuleConfig<NoElementOverwriteOptions>;
/**
* Collection elements should not be replaced unconditionally.
*
* @see [no-element-overwrite](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-element-overwrite.md)
*/
interface NoElementOverwriteRule {
/**
* Collection elements should not be replaced unconditionally.
*
* @see [no-element-overwrite](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-element-overwrite.md)
*/
'sonarjs/no-element-overwrite': NoElementOverwriteRuleConfig;
}
/**
* Empty collections should not be accessed or iterated.
*
* @see [no-empty-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-empty-collection.md)
*/
type NoEmptyCollectionRuleConfig = RuleConfig<[]>;
/**
* Empty collections should not be accessed or iterated.
*
* @see [no-empty-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-empty-collection.md)
*/
interface NoEmptyCollectionRule {
/**
* Empty collections should not be accessed or iterated.
*
* @see [no-empty-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-empty-collection.md)
*/
'sonarjs/no-empty-collection': NoEmptyCollectionRuleConfig;
}
/**
* Option.
*/
type NoExtraArgumentsOption = 'sonar-runtime';
/**
* Options.
*/
type NoExtraArgumentsOptions = [NoExtraArgumentsOption?];
/**
* Function calls should not pass extra arguments.
*
* @see [no-extra-arguments](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-extra-arguments.md)
*/
type NoExtraArgumentsRuleConfig = RuleConfig<NoExtraArgumentsOptions>;
/**
* Function calls should not pass extra arguments.
*
* @see [no-extra-arguments](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-extra-arguments.md)
*/
interface NoExtraArgumentsRule {
/**
* Function calls should not pass extra arguments.
*
* @see [no-extra-arguments](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-extra-arguments.md)
*/
'sonarjs/no-extra-arguments': NoExtraArgumentsRuleConfig;
}
/**
* Option.
*/
type NoGratuitousExpressionsOption = 'sonar-runtime';
/**
* Options.
*/
type NoGratuitousExpressionsOptions = [NoGratuitousExpressionsOption?];
/**
* Boolean expressions should not be gratuitous.
*
* @see [no-gratuitous-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-gratuitous-expressions.md)
*/
type NoGratuitousExpressionsRuleConfig =
RuleConfig<NoGratuitousExpressionsOptions>;
/**
* Boolean expressions should not be gratuitous.
*
* @see [no-gratuitous-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-gratuitous-expressions.md)
*/
interface NoGratuitousExpressionsRule {
/**
* Boolean expressions should not be gratuitous.
*
* @see [no-gratuitous-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-gratuitous-expressions.md)
*/
'sonarjs/no-gratuitous-expressions': NoGratuitousExpressionsRuleConfig;
}
/**
* Option.
*/
type NoIdenticalConditionsOption = 'sonar-runtime';
/**
* Options.
*/
type NoIdenticalConditionsOptions = [NoIdenticalConditionsOption?];
/**
* Related "if-else-if" and "switch-case" statements should not have the same condition.
*
* @see [no-identical-conditions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-conditions.md)
*/
type NoIdenticalConditionsRuleConfig =
RuleConfig<NoIdenticalConditionsOptions>;
/**
* Related "if-else-if" and "switch-case" statements should not have the same condition.
*
* @see [no-identical-conditions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-conditions.md)
*/
interface NoIdenticalConditionsRule {
/**
* Related "if-else-if" and "switch-case" statements should not have the same condition.
*
* @see [no-identical-conditions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-conditions.md)
*/
'sonarjs/no-identical-conditions': NoIdenticalConditionsRuleConfig;
}
/**
* Option.
*/
type NoIdenticalExpressionsOption = 'sonar-runtime';
/**
* Options.
*/
type NoIdenticalExpressionsOptions = [NoIdenticalExpressionsOption?];
/**
* Identical expressions should not be used on both sides of a binary operator.
*
* @see [no-identical-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-expressions.md)
*/
type NoIdenticalExpressionsRuleConfig =
RuleConfig<NoIdenticalExpressionsOptions>;
/**
* Identical expressions should not be used on both sides of a binary operator.
*
* @see [no-identical-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-expressions.md)
*/
interface NoIdenticalExpressionsRule {
/**
* Identical expressions should not be used on both sides of a binary operator.
*
* @see [no-identical-expressions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-expressions.md)
*/
'sonarjs/no-identical-expressions': NoIdenticalExpressionsRuleConfig;
}
/**
* Config.
*/
type NoIdenticalFunctionsConfig = 'sonar-runtime';
/**
* Option.
*/
type NoIdenticalFunctionsOption = number;
/**
* Options.
*/
type NoIdenticalFunctionsOptions = [
NoIdenticalFunctionsOption?,
NoIdenticalFunctionsConfig?,
];
/**
* Functions should not have identical implementations.
*
* @see [no-identical-functions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-functions.md)
*/
type NoIdenticalFunctionsRuleConfig =
RuleConfig<NoIdenticalFunctionsOptions>;
/**
* Functions should not have identical implementations.
*
* @see [no-identical-functions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-functions.md)
*/
interface NoIdenticalFunctionsRule {
/**
* Functions should not have identical implementations.
*
* @see [no-identical-functions](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-identical-functions.md)
*/
'sonarjs/no-identical-functions': NoIdenticalFunctionsRuleConfig;
}
/**
* Return values from functions without side effects should not be ignored.
*
* @see [no-ignored-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-ignored-return.md)
*/
type NoIgnoredReturnRuleConfig = RuleConfig<[]>;
/**
* Return values from functions without side effects should not be ignored.
*
* @see [no-ignored-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-ignored-return.md)
*/
interface NoIgnoredReturnRule {
/**
* Return values from functions without side effects should not be ignored.
*
* @see [no-ignored-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-ignored-return.md)
*/
'sonarjs/no-ignored-return': NoIgnoredReturnRuleConfig;
}
/**
* Boolean checks should not be inverted.
*
* @see [no-inverted-boolean-check](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-inverted-boolean-check.md)
*/
type NoInvertedBooleanCheckRuleConfig = RuleConfig<[]>;
/**
* Boolean checks should not be inverted.
*
* @see [no-inverted-boolean-check](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-inverted-boolean-check.md)
*/
interface NoInvertedBooleanCheckRule {
/**
* Boolean checks should not be inverted.
*
* @see [no-inverted-boolean-check](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-inverted-boolean-check.md)
*/
'sonarjs/no-inverted-boolean-check': NoInvertedBooleanCheckRuleConfig;
}
/**
* "switch" statements should not be nested.
*
* @see [no-nested-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-switch.md)
*/
type NoNestedSwitchRuleConfig = RuleConfig<[]>;
/**
* "switch" statements should not be nested.
*
* @see [no-nested-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-switch.md)
*/
interface NoNestedSwitchRule {
/**
* "switch" statements should not be nested.
*
* @see [no-nested-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-switch.md)
*/
'sonarjs/no-nested-switch': NoNestedSwitchRuleConfig;
}
/**
* Template literals should not be nested.
*
* @see [no-nested-template-literals](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-template-literals.md)
*/
type NoNestedTemplateLiteralsRuleConfig = RuleConfig<[]>;
/**
* Template literals should not be nested.
*
* @see [no-nested-template-literals](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-template-literals.md)
*/
interface NoNestedTemplateLiteralsRule {
/**
* Template literals should not be nested.
*
* @see [no-nested-template-literals](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-nested-template-literals.md)
*/
'sonarjs/no-nested-template-literals': NoNestedTemplateLiteralsRuleConfig;
}
/**
* Loops with at most one iteration should be refactored.
*
* @see [no-one-iteration-loop](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-one-iteration-loop.md)
*/
type NoOneIterationLoopRuleConfig = RuleConfig<[]>;
/**
* Loops with at most one iteration should be refactored.
*
* @see [no-one-iteration-loop](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-one-iteration-loop.md)
*/
interface NoOneIterationLoopRule {
/**
* Loops with at most one iteration should be refactored.
*
* @see [no-one-iteration-loop](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-one-iteration-loop.md)
*/
'sonarjs/no-one-iteration-loop': NoOneIterationLoopRuleConfig;
}
/**
* Boolean literals should not be redundant.
*
* @see [no-redundant-boolean](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-boolean.md)
*/
type NoRedundantBooleanRuleConfig = RuleConfig<[]>;
/**
* Boolean literals should not be redundant.
*
* @see [no-redundant-boolean](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-boolean.md)
*/
interface NoRedundantBooleanRule {
/**
* Boolean literals should not be redundant.
*
* @see [no-redundant-boolean](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-boolean.md)
*/
'sonarjs/no-redundant-boolean': NoRedundantBooleanRuleConfig;
}
/**
* Jump statements should not be redundant.
*
* @see [no-redundant-jump](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-jump.md)
*/
type NoRedundantJumpRuleConfig = RuleConfig<[]>;
/**
* Jump statements should not be redundant.
*
* @see [no-redundant-jump](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-jump.md)
*/
interface NoRedundantJumpRule {
/**
* Jump statements should not be redundant.
*
* @see [no-redundant-jump](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-redundant-jump.md)
*/
'sonarjs/no-redundant-jump': NoRedundantJumpRuleConfig;
}
/**
* Option.
*/
type NoSameLineConditionalOption = 'sonar-runtime';
/**
* Options.
*/
type NoSameLineConditionalOptions = [NoSameLineConditionalOption?];
/**
* Conditionals should start on new lines.
*
* @see [no-same-line-conditional](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-same-line-conditional.md)
*/
type NoSameLineConditionalRuleConfig =
RuleConfig<NoSameLineConditionalOptions>;
/**
* Conditionals should start on new lines.
*
* @see [no-same-line-conditional](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-same-line-conditional.md)
*/
interface NoSameLineConditionalRule {
/**
* Conditionals should start on new lines.
*
* @see [no-same-line-conditional](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-same-line-conditional.md)
*/
'sonarjs/no-same-line-conditional': NoSameLineConditionalRuleConfig;
}
/**
* "switch" statements should have at least 3 "case" clauses.
*
* @see [no-small-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-small-switch.md)
*/
type NoSmallSwitchRuleConfig = RuleConfig<[]>;
/**
* "switch" statements should have at least 3 "case" clauses.
*
* @see [no-small-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-small-switch.md)
*/
interface NoSmallSwitchRule {
/**
* "switch" statements should have at least 3 "case" clauses.
*
* @see [no-small-switch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-small-switch.md)
*/
'sonarjs/no-small-switch': NoSmallSwitchRuleConfig;
}
/**
* Collection and array contents should be used.
*
* @see [no-unused-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-unused-collection.md)
*/
type NoUnusedCollectionRuleConfig = RuleConfig<[]>;
/**
* Collection and array contents should be used.
*
* @see [no-unused-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-unused-collection.md)
*/
interface NoUnusedCollectionRule {
/**
* Collection and array contents should be used.
*
* @see [no-unused-collection](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-unused-collection.md)
*/
'sonarjs/no-unused-collection': NoUnusedCollectionRuleConfig;
}
/**
* The output of functions that don't return anything should not be used.
*
* @see [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)
*/
type NoUseOfEmptyReturnValueRuleConfig = RuleConfig<[]>;
/**
* The output of functions that don't return anything should not be used.
*
* @see [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)
*/
interface NoUseOfEmptyReturnValueRule {
/**
* The output of functions that don't return anything should not be used.
*
* @see [no-use-of-empty-return-value](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-use-of-empty-return-value.md)
*/
'sonarjs/no-use-of-empty-return-value': NoUseOfEmptyReturnValueRuleConfig;
}
/**
* "catch" clauses should do more than rethrow.
*
* @see [no-useless-catch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-useless-catch.md)
*/
type NoUselessCatchRuleConfig = RuleConfig<[]>;
/**
* "catch" clauses should do more than rethrow.
*
* @see [no-useless-catch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-useless-catch.md)
*/
interface NoUselessCatchRule {
/**
* "catch" clauses should do more than rethrow.
*
* @see [no-useless-catch](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/no-useless-catch.md)
*/
'sonarjs/no-useless-catch': NoUselessCatchRuleConfig;
}
/**
* Non-existent operators "=+", "=-" and "=!" should not be used.
*
* @see [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)
*/
type NonExistentOperatorRuleConfig = RuleConfig<[]>;
/**
* Non-existent operators "=+", "=-" and "=!" should not be used.
*
* @see [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)
*/
interface NonExistentOperatorRule {
/**
* Non-existent operators "=+", "=-" and "=!" should not be used.
*
* @see [non-existent-operator](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/non-existent-operator.md)
*/
'sonarjs/non-existent-operator': NonExistentOperatorRuleConfig;
}
/**
* Local variables should not be declared and then immediately returned or thrown.
*
* @see [prefer-immediate-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md)
*/
type PreferImmediateReturnRuleConfig = RuleConfig<[]>;
/**
* Local variables should not be declared and then immediately returned or thrown.
*
* @see [prefer-immediate-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md)
*/
interface PreferImmediateReturnRule {
/**
* Local variables should not be declared and then immediately returned or thrown.
*
* @see [prefer-immediate-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-immediate-return.md)
*/
'sonarjs/prefer-immediate-return': PreferImmediateReturnRuleConfig;
}
/**
* Object literal syntax should be used.
*
* @see [prefer-object-literal](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-object-literal.md)
*/
type PreferObjectLiteralRuleConfig = RuleConfig<[]>;
/**
* Object literal syntax should be used.
*
* @see [prefer-object-literal](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-object-literal.md)
*/
interface PreferObjectLiteralRule {
/**
* Object literal syntax should be used.
*
* @see [prefer-object-literal](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-object-literal.md)
*/
'sonarjs/prefer-object-literal': PreferObjectLiteralRuleConfig;
}
/**
* Return of boolean expressions should not be wrapped into an "if-then-else" statement.
*
* @see [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)
*/
type PreferSingleBooleanReturnRuleConfig = RuleConfig<[]>;
/**
* Return of boolean expressions should not be wrapped into an "if-then-else" statement.
*
* @see [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)
*/
interface PreferSingleBooleanReturnRule {
/**
* Return of boolean expressions should not be wrapped into an "if-then-else" statement.
*
* @see [prefer-single-boolean-return](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-single-boolean-return.md)
*/
'sonarjs/prefer-single-boolean-return': PreferSingleBooleanReturnRuleConfig;
}
/**
* A "while" loop should be used instead of a "for" loop.
*
* @see [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)
*/
type PreferWhileRuleConfig = RuleConfig<[]>;
/**
* A "while" loop should be used instead of a "for" loop.
*
* @see [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)
*/
interface PreferWhileRule {
/**
* A "while" loop should be used instead of a "for" loop.
*
* @see [prefer-while](https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/docs/rules/prefer-while.md)
*/
'sonarjs/prefer-while': PreferWhileRuleConfig;
}
/**
* All SonarJS rules.
*/
type SonarJSRules = CognitiveComplexityRule &
ElseifWithoutElseRule &
MaxSwitchCasesRule &
NoAllDuplicatedBranchesRule &
NoCollapsibleIfRule &
NoCollectionSizeMischeckRule &
NoDuplicateStringRule &
NoDuplicatedBranchesRule &
NoElementOverwriteRule &
NoEmptyCollectionRule &
NoExtraArgumentsRule &
NoGratuitousExpressionsRule &
NoIdenticalConditionsRule &
NoIdenticalExpressionsRule &
NoIdenticalFunctionsRule &
NoIgnoredReturnRule &
NoInvertedBooleanCheckRule &
NoNestedSwitchRule &
NoNestedTemplateLiteralsRule &
NoOneIterationLoopRule &
NoRedundantBooleanRule &
NoRedundantJumpRule &
NoSameLineConditionalRule &
NoSmallSwitchRule &
NoUnusedCollectionRule &
NoUseOfEmptyReturnValueRule &
NoUselessCatchRule &
NonExistentOperatorRule &
PreferImmediateReturnRule &
PreferObjectLiteralRule &
PreferSingleBooleanReturnRule &
PreferWhileRule;
/**
* Option.
*/
interface SpellCheckerOption {
comments?: boolean;
strings?: boolean;
identifiers?: boolean;
ignoreRequire?: boolean;
enableUpperCaseUnderscoreCheck?: boolean;
templates?: boolean;
lang?: string;
langDir?: string;
skipWords?: any[];
skipIfMatch?: any[];
skipWordIfMatch?: any[];
minLength?: number;
}
/**
* Options.
*/
type SpellCheckerOptions = [SpellCheckerOption?];
/**
* Spell check.
*
*/
type SpellCheckerRuleConfig = RuleConfig<SpellCheckerOptions>;
/**
* Spell check.
*
*/
interface SpellCheckerRule {
/**
* Spell check.
*
*/
'spellcheck/spell-checker': SpellCheckerRuleConfig;
}
/**
* All Spellcheck rules.
*/
type SpellcheckRules = SpellCheckerRule;
/**
* Option.
*/
interface AwaitAsyncEventsOption {
eventModule?: ('fireEvent' | 'userEvent') | ('fireEvent' | 'userEvent')[];
}
/**
* Options.
*/
type AwaitAsyncEventsOptions = [AwaitAsyncEventsOption?];
/**
* Enforce promises from async event methods are handled.
*
* @see [await-async-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-events.md)
*/
type AwaitAsyncEventsRuleConfig = RuleConfig<AwaitAsyncEventsOptions>;
/**
* Enforce promises from async event methods are handled.
*
* @see [await-async-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-events.md)
*/
interface AwaitAsyncEventsRule {
/**
* Enforce promises from async event methods are handled.
*
* @see [await-async-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-events.md)
*/
'testing-library/await-async-events': AwaitAsyncEventsRuleConfig;
}
/**
* Enforce promises from async queries to be handled.
*
* @see [await-async-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-queries.md)
*/
type AwaitAsyncQueriesRuleConfig = RuleConfig<[]>;
/**
* Enforce promises from async queries to be handled.
*
* @see [await-async-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-queries.md)
*/
interface AwaitAsyncQueriesRule {
/**
* Enforce promises from async queries to be handled.
*
* @see [await-async-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-queries.md)
*/
'testing-library/await-async-queries': AwaitAsyncQueriesRuleConfig;
}
/**
* Enforce promises from async utils to be awaited properly.
*
* @see [await-async-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-utils.md)
*/
type AwaitAsyncUtilsRuleConfig = RuleConfig<[]>;
/**
* Enforce promises from async utils to be awaited properly.
*
* @see [await-async-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-utils.md)
*/
interface AwaitAsyncUtilsRule {
/**
* Enforce promises from async utils to be awaited properly.
*
* @see [await-async-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/await-async-utils.md)
*/
'testing-library/await-async-utils': AwaitAsyncUtilsRuleConfig;
}
/**
* Option.
*/
interface ConsistentDataTestidOption {
testIdPattern: string;
testIdAttribute?: string | string[];
customMessage?: string;
}
/**
* Options.
*/
type ConsistentDataTestidOptions = [ConsistentDataTestidOption?];
/**
* Ensures consistent usage of `data-testid`.
*
* @see [consistent-data-testid](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/consistent-data-testid.md)
*/
type ConsistentDataTestidRuleConfig =
RuleConfig<ConsistentDataTestidOptions>;
/**
* Ensures consistent usage of `data-testid`.
*
* @see [consistent-data-testid](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/consistent-data-testid.md)
*/
interface ConsistentDataTestidRule {
/**
* Ensures consistent usage of `data-testid`.
*
* @see [consistent-data-testid](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/consistent-data-testid.md)
*/
'testing-library/consistent-data-testid': ConsistentDataTestidRuleConfig;
}
/**
* Option.
*/
interface NoAwaitSyncEventsOption {
/**
* @minItems 1
*/
eventModules?: [
'fire-event' | 'user-event',
...('fire-event' | 'user-event')[],
];
}
/**
* Options.
*/
type NoAwaitSyncEventsOptions = [NoAwaitSyncEventsOption?];
/**
* Disallow unnecessary `await` for sync events.
*
* @see [no-await-sync-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-events.md)
*/
type NoAwaitSyncEventsRuleConfig = RuleConfig<NoAwaitSyncEventsOptions>;
/**
* Disallow unnecessary `await` for sync events.
*
* @see [no-await-sync-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-events.md)
*/
interface NoAwaitSyncEventsRule {
/**
* Disallow unnecessary `await` for sync events.
*
* @see [no-await-sync-events](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-events.md)
*/
'testing-library/no-await-sync-events': NoAwaitSyncEventsRuleConfig;
}
/**
* Disallow unnecessary `await` for sync queries.
*
* @see [no-await-sync-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-queries.md)
*/
type NoAwaitSyncQueriesRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary `await` for sync queries.
*
* @see [no-await-sync-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-queries.md)
*/
interface NoAwaitSyncQueriesRule {
/**
* Disallow unnecessary `await` for sync queries.
*
* @see [no-await-sync-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-await-sync-queries.md)
*/
'testing-library/no-await-sync-queries': NoAwaitSyncQueriesRuleConfig;
}
/**
* Disallow the use of `container` methods.
*
* @see [no-container](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-container.md)
*/
type NoContainerRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `container` methods.
*
* @see [no-container](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-container.md)
*/
interface NoContainerRule {
/**
* Disallow the use of `container` methods.
*
* @see [no-container](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-container.md)
*/
'testing-library/no-container': NoContainerRuleConfig;
}
/**
* Option.
*/
interface NoDebuggingUtilsOption {
utilsToCheckFor?: {
prettyFormat?: boolean;
logDOM?: boolean;
logRoles?: boolean;
prettyDOM?: boolean;
logTestingPlaygroundURL?: boolean;
debug?: boolean;
};
}
/**
* Options.
*/
type NoDebuggingUtilsOptions = [NoDebuggingUtilsOption?];
/**
* Disallow the use of debugging utilities like `debug`.
*
* @see [no-debugging-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-debugging-utils.md)
*/
type NoDebuggingUtilsRuleConfig = RuleConfig<NoDebuggingUtilsOptions>;
/**
* Disallow the use of debugging utilities like `debug`.
*
* @see [no-debugging-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-debugging-utils.md)
*/
interface NoDebuggingUtilsRule {
/**
* Disallow the use of debugging utilities like `debug`.
*
* @see [no-debugging-utils](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-debugging-utils.md)
*/
'testing-library/no-debugging-utils': NoDebuggingUtilsRuleConfig;
}
/**
* Option.
*/
type NoDomImportOption = string;
/**
* Options.
*/
type NoDomImportOptions = [NoDomImportOption?];
/**
* Disallow importing from DOM Testing Library.
*
* @see [no-dom-import](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-dom-import.md)
*/
type NoDomImportRuleConfig = RuleConfig<NoDomImportOptions>;
/**
* Disallow importing from DOM Testing Library.
*
* @see [no-dom-import](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-dom-import.md)
*/
interface NoDomImportRule {
/**
* Disallow importing from DOM Testing Library.
*
* @see [no-dom-import](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-dom-import.md)
*/
'testing-library/no-dom-import': NoDomImportRuleConfig;
}
/**
* Disallow the use of the global RegExp flag (/g) in queries.
*
* @see [no-global-regexp-flag-in-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-global-regexp-flag-in-query.md)
*/
type NoGlobalRegexpFlagInQueryRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of the global RegExp flag (/g) in queries.
*
* @see [no-global-regexp-flag-in-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-global-regexp-flag-in-query.md)
*/
interface NoGlobalRegexpFlagInQueryRule {
/**
* Disallow the use of the global RegExp flag (/g) in queries.
*
* @see [no-global-regexp-flag-in-query](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-global-regexp-flag-in-query.md)
*/
'testing-library/no-global-regexp-flag-in-query': NoGlobalRegexpFlagInQueryRuleConfig;
}
/**
* Disallow the use of `cleanup`.
*
* @see [no-manual-cleanup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-manual-cleanup.md)
*/
type NoManualCleanupRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `cleanup`.
*
* @see [no-manual-cleanup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-manual-cleanup.md)
*/
interface NoManualCleanupRule {
/**
* Disallow the use of `cleanup`.
*
* @see [no-manual-cleanup](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-manual-cleanup.md)
*/
'testing-library/no-manual-cleanup': NoManualCleanupRuleConfig;
}
/**
* Option.
*/
interface NoNodeAccessOption {
allowContainerFirstChild?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type NoNodeAccessOptions = [NoNodeAccessOption?];
/**
* Disallow direct Node access.
*
* @see [no-node-access](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-node-access.md)
*/
type NoNodeAccessRuleConfig = RuleConfig<NoNodeAccessOptions>;
/**
* Disallow direct Node access.
*
* @see [no-node-access](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-node-access.md)
*/
interface NoNodeAccessRule {
/**
* Disallow direct Node access.
*
* @see [no-node-access](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-node-access.md)
*/
'testing-library/no-node-access': NoNodeAccessRuleConfig;
}
/**
* Disallow the use of promises passed to a `fireEvent` method.
*
* @see [no-promise-in-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-promise-in-fire-event.md)
*/
type NoPromiseInFireEventRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of promises passed to a `fireEvent` method.
*
* @see [no-promise-in-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-promise-in-fire-event.md)
*/
interface NoPromiseInFireEventRule {
/**
* Disallow the use of promises passed to a `fireEvent` method.
*
* @see [no-promise-in-fire-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-promise-in-fire-event.md)
*/
'testing-library/no-promise-in-fire-event': NoPromiseInFireEventRuleConfig;
}
/**
* Option.
*/
interface NoRenderInLifecycleOption {
allowTestingFrameworkSetupHook?: 'beforeEach' | 'beforeAll';
[k: string]: any;
}
/**
* Options.
*/
type NoRenderInLifecycleOptions = [NoRenderInLifecycleOption?];
/**
* Disallow the use of `render` in testing frameworks setup functions.
*
* @see [no-render-in-lifecycle](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-lifecycle.md)
*/
type NoRenderInLifecycleRuleConfig =
RuleConfig<NoRenderInLifecycleOptions>;
/**
* Disallow the use of `render` in testing frameworks setup functions.
*
* @see [no-render-in-lifecycle](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-lifecycle.md)
*/
interface NoRenderInLifecycleRule {
/**
* Disallow the use of `render` in testing frameworks setup functions.
*
* @see [no-render-in-lifecycle](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-render-in-lifecycle.md)
*/
'testing-library/no-render-in-lifecycle': NoRenderInLifecycleRuleConfig;
}
/**
* Option.
*/
interface NoUnnecessaryActOption {
isStrict?: boolean;
[k: string]: any;
}
/**
* Options.
*/
type NoUnnecessaryActOptions = [NoUnnecessaryActOption?];
/**
* Disallow wrapping Testing Library utils or empty callbacks in `act`.
*
* @see [no-unnecessary-act](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-unnecessary-act.md)
*/
type NoUnnecessaryActRuleConfig = RuleConfig<NoUnnecessaryActOptions>;
/**
* Disallow wrapping Testing Library utils or empty callbacks in `act`.
*
* @see [no-unnecessary-act](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-unnecessary-act.md)
*/
interface NoUnnecessaryActRule {
/**
* Disallow wrapping Testing Library utils or empty callbacks in `act`.
*
* @see [no-unnecessary-act](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-unnecessary-act.md)
*/
'testing-library/no-unnecessary-act': NoUnnecessaryActRuleConfig;
}
/**
* Disallow the use of multiple `expect` calls inside `waitFor`.
*
* @see [no-wait-for-multiple-assertions](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-multiple-assertions.md)
*/
type NoWaitForMultipleAssertionsRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of multiple `expect` calls inside `waitFor`.
*
* @see [no-wait-for-multiple-assertions](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-multiple-assertions.md)
*/
interface NoWaitForMultipleAssertionsRule {
/**
* Disallow the use of multiple `expect` calls inside `waitFor`.
*
* @see [no-wait-for-multiple-assertions](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-multiple-assertions.md)
*/
'testing-library/no-wait-for-multiple-assertions': NoWaitForMultipleAssertionsRuleConfig;
}
/**
* Disallow the use of side effects in `waitFor`.
*
* @see [no-wait-for-side-effects](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-side-effects.md)
*/
type NoWaitForSideEffectsRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of side effects in `waitFor`.
*
* @see [no-wait-for-side-effects](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-side-effects.md)
*/
interface NoWaitForSideEffectsRule {
/**
* Disallow the use of side effects in `waitFor`.
*
* @see [no-wait-for-side-effects](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-side-effects.md)
*/
'testing-library/no-wait-for-side-effects': NoWaitForSideEffectsRuleConfig;
}
/**
* Ensures no snapshot is generated inside of a `waitFor` call.
*
* @see [no-wait-for-snapshot](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-snapshot.md)
*/
type NoWaitForSnapshotRuleConfig = RuleConfig<[]>;
/**
* Ensures no snapshot is generated inside of a `waitFor` call.
*
* @see [no-wait-for-snapshot](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-snapshot.md)
*/
interface NoWaitForSnapshotRule {
/**
* Ensures no snapshot is generated inside of a `waitFor` call.
*
* @see [no-wait-for-snapshot](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/no-wait-for-snapshot.md)
*/
'testing-library/no-wait-for-snapshot': NoWaitForSnapshotRuleConfig;
}
/**
* Option.
*/
interface PreferExplicitAssertOption {
assertion?: 'toBeInTheDocument' | 'toBeTruthy' | 'toBeDefined';
includeFindQueries?: boolean;
}
/**
* Options.
*/
type PreferExplicitAssertOptions = [PreferExplicitAssertOption?];
/**
* Suggest using explicit assertions rather than standalone queries.
*
* @see [prefer-explicit-assert](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-explicit-assert.md)
*/
type PreferExplicitAssertRuleConfig =
RuleConfig<PreferExplicitAssertOptions>;
/**
* Suggest using explicit assertions rather than standalone queries.
*
* @see [prefer-explicit-assert](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-explicit-assert.md)
*/
interface PreferExplicitAssertRule {
/**
* Suggest using explicit assertions rather than standalone queries.
*
* @see [prefer-explicit-assert](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-explicit-assert.md)
*/
'testing-library/prefer-explicit-assert': PreferExplicitAssertRuleConfig;
}
/**
* Suggest using `find(All)By*` query instead of `waitFor` + `get(All)By*` to wait for elements.
*
* @see [prefer-find-by](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-find-by.md)
*/
type PreferFindByRuleConfig = RuleConfig<[]>;
/**
* Suggest using `find(All)By*` query instead of `waitFor` + `get(All)By*` to wait for elements.
*
* @see [prefer-find-by](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-find-by.md)
*/
interface PreferFindByRule {
/**
* Suggest using `find(All)By*` query instead of `waitFor` + `get(All)By*` to wait for elements.
*
* @see [prefer-find-by](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-find-by.md)
*/
'testing-library/prefer-find-by': PreferFindByRuleConfig;
}
/**
* Option.
*/
interface PreferPresenceQueriesOption {
presence?: boolean;
absence?: boolean;
}
/**
* Options.
*/
type PreferPresenceQueriesOptions = [PreferPresenceQueriesOption?];
/**
* Ensure appropriate `get*`/`query*` queries are used with their respective matchers.
*
* @see [prefer-presence-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-presence-queries.md)
*/
type PreferPresenceQueriesRuleConfig =
RuleConfig<PreferPresenceQueriesOptions>;
/**
* Ensure appropriate `get*`/`query*` queries are used with their respective matchers.
*
* @see [prefer-presence-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-presence-queries.md)
*/
interface PreferPresenceQueriesRule {
/**
* Ensure appropriate `get*`/`query*` queries are used with their respective matchers.
*
* @see [prefer-presence-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-presence-queries.md)
*/
'testing-library/prefer-presence-queries': PreferPresenceQueriesRuleConfig;
}
/**
* Suggest using `queryBy*` queries when waiting for disappearance.
*
* @see [prefer-query-by-disappearance](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-by-disappearance.md)
*/
type PreferQueryByDisappearanceRuleConfig = RuleConfig<[]>;
/**
* Suggest using `queryBy*` queries when waiting for disappearance.
*
* @see [prefer-query-by-disappearance](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-by-disappearance.md)
*/
interface PreferQueryByDisappearanceRule {
/**
* Suggest using `queryBy*` queries when waiting for disappearance.
*
* @see [prefer-query-by-disappearance](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-by-disappearance.md)
*/
'testing-library/prefer-query-by-disappearance': PreferQueryByDisappearanceRuleConfig;
}
/**
* Option.
*/
interface PreferQueryMatchersOption {
validEntries?: {
query?: 'get' | 'query';
matcher?: string;
[k: string]: any;
}[];
}
/**
* Options.
*/
type PreferQueryMatchersOptions = [PreferQueryMatchersOption?];
/**
* Ensure the configured `get*`/`query*` query is used with the corresponding matchers.
*
* @see [prefer-query-matchers](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-matchers.md)
*/
type PreferQueryMatchersRuleConfig =
RuleConfig<PreferQueryMatchersOptions>;
/**
* Ensure the configured `get*`/`query*` query is used with the corresponding matchers.
*
* @see [prefer-query-matchers](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-matchers.md)
*/
interface PreferQueryMatchersRule {
/**
* Ensure the configured `get*`/`query*` query is used with the corresponding matchers.
*
* @see [prefer-query-matchers](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-query-matchers.md)
*/
'testing-library/prefer-query-matchers': PreferQueryMatchersRuleConfig;
}
/**
* Suggest using `screen` while querying.
*
* @see [prefer-screen-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-screen-queries.md)
*/
type PreferScreenQueriesRuleConfig = RuleConfig<[]>;
/**
* Suggest using `screen` while querying.
*
* @see [prefer-screen-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-screen-queries.md)
*/
interface PreferScreenQueriesRule {
/**
* Suggest using `screen` while querying.
*
* @see [prefer-screen-queries](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-screen-queries.md)
*/
'testing-library/prefer-screen-queries': PreferScreenQueriesRuleConfig;
}
/**
* Option.
*/
interface PreferUserEventOption {
allowedMethods?: any[];
[k: string]: any;
}
/**
* Options.
*/
type PreferUserEventOptions = [PreferUserEventOption?];
/**
* Suggest using `userEvent` over `fireEvent` for simulating user interactions.
*
* @see [prefer-user-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-user-event.md)
*/
type PreferUserEventRuleConfig = RuleConfig<PreferUserEventOptions>;
/**
* Suggest using `userEvent` over `fireEvent` for simulating user interactions.
*
* @see [prefer-user-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-user-event.md)
*/
interface PreferUserEventRule {
/**
* Suggest using `userEvent` over `fireEvent` for simulating user interactions.
*
* @see [prefer-user-event](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/prefer-user-event.md)
*/
'testing-library/prefer-user-event': PreferUserEventRuleConfig;
}
/**
* Enforce a valid naming for return value from `render`.
*
* @see [render-result-naming-convention](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/render-result-naming-convention.md)
*/
type RenderResultNamingConventionRuleConfig = RuleConfig<[]>;
/**
* Enforce a valid naming for return value from `render`.
*
* @see [render-result-naming-convention](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/render-result-naming-convention.md)
*/
interface RenderResultNamingConventionRule {
/**
* Enforce a valid naming for return value from `render`.
*
* @see [render-result-naming-convention](https://github.com/testing-library/eslint-plugin-testing-library/tree/main/docs/rules/render-result-naming-convention.md)
*/
'testing-library/render-result-naming-convention': RenderResultNamingConventionRuleConfig;
}
/**
* All TestingLibrary rules.
*/
type TestingLibraryRules = AwaitAsyncEventsRule &
AwaitAsyncQueriesRule &
AwaitAsyncUtilsRule &
ConsistentDataTestidRule &
NoAwaitSyncEventsRule &
NoAwaitSyncQueriesRule &
NoContainerRule &
NoDebuggingUtilsRule &
NoDomImportRule &
NoGlobalRegexpFlagInQueryRule &
NoManualCleanupRule &
NoNodeAccessRule &
NoPromiseInFireEventRule &
NoRenderInLifecycleRule &
NoUnnecessaryActRule &
NoWaitForMultipleAssertionsRule &
NoWaitForSideEffectsRule &
NoWaitForSnapshotRule &
PreferExplicitAssertRule &
PreferFindByRule &
PreferPresenceQueriesRule &
PreferQueryByDisappearanceRule &
PreferQueryMatchersRule &
PreferScreenQueriesRule &
PreferUserEventRule &
RenderResultNamingConventionRule;
/**
* Require that function overload signatures be consecutive.
*
* @see [adjacent-overload-signatures](https://typescript-eslint.io/rules/adjacent-overload-signatures)
*/
type AdjacentOverloadSignaturesRuleConfig = RuleConfig<[]>;
/**
* Require that function overload signatures be consecutive.
*
* @see [adjacent-overload-signatures](https://typescript-eslint.io/rules/adjacent-overload-signatures)
*/
interface AdjacentOverloadSignaturesRule {
/**
* Require that function overload signatures be consecutive.
*
* @see [adjacent-overload-signatures](https://typescript-eslint.io/rules/adjacent-overload-signatures)
*/
'@typescript-eslint/adjacent-overload-signatures': AdjacentOverloadSignaturesRuleConfig;
}
/**
* Option.
*/
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';
}
/**
* Options.
*/
type ArrayTypeOptions = [ArrayTypeOption?];
/**
* Require consistently using either `T[]` or `Array<T>` for arrays.
*
* @see [array-type](https://typescript-eslint.io/rules/array-type)
*/
type ArrayTypeRuleConfig = RuleConfig<ArrayTypeOptions>;
/**
* Require consistently using either `T[]` or `Array<T>` for arrays.
*
* @see [array-type](https://typescript-eslint.io/rules/array-type)
*/
interface ArrayTypeRule {
/**
* Require consistently using either `T[]` or `Array<T>` for arrays.
*
* @see [array-type](https://typescript-eslint.io/rules/array-type)
*/
'@typescript-eslint/array-type': ArrayTypeRuleConfig;
}
/**
* Disallow awaiting a value that is not a Thenable.
*
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
*/
type AwaitThenableRuleConfig = RuleConfig<[]>;
/**
* Disallow awaiting a value that is not a Thenable.
*
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
*/
interface AwaitThenableRule {
/**
* Disallow awaiting a value that is not a Thenable.
*
* @see [await-thenable](https://typescript-eslint.io/rules/await-thenable)
*/
'@typescript-eslint/await-thenable': AwaitThenableRuleConfig;
}
/**
* Option.
*/
type DirectiveConfigSchema =
| boolean
| 'allow-with-description'
| {
descriptionFormat?: string;
};
interface BanTsCommentOption {
'ts-expect-error'?: DirectiveConfigSchema;
'ts-ignore'?: DirectiveConfigSchema;
'ts-nocheck'?: DirectiveConfigSchema;
'ts-check'?: DirectiveConfigSchema;
minimumDescriptionLength?: number;
}
/**
* Options.
*/
type BanTsCommentOptions = [BanTsCommentOption?];
/**
* Disallow `@ts-<directive>` comments or require descriptions after directives.
*
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
*/
type BanTsCommentRuleConfig = RuleConfig<BanTsCommentOptions>;
/**
* Disallow `@ts-<directive>` comments or require descriptions after directives.
*
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
*/
interface BanTsCommentRule {
/**
* Disallow `@ts-<directive>` comments or require descriptions after directives.
*
* @see [ban-ts-comment](https://typescript-eslint.io/rules/ban-ts-comment)
*/
'@typescript-eslint/ban-ts-comment': BanTsCommentRuleConfig;
}
/**
* Disallow `// tslint:<rule-flag>` comments.
*
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
*/
type BanTslintCommentRuleConfig = RuleConfig<[]>;
/**
* Disallow `// tslint:<rule-flag>` comments.
*
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
*/
interface BanTslintCommentRule {
/**
* Disallow `// tslint:<rule-flag>` comments.
*
* @see [ban-tslint-comment](https://typescript-eslint.io/rules/ban-tslint-comment)
*/
'@typescript-eslint/ban-tslint-comment': BanTslintCommentRuleConfig;
}
/**
* Option.
*/
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[];
};
interface BanTypesOption {
types?: {
[k: string]: BanConfig;
};
extendDefaults?: boolean;
}
/**
* Options.
*/
type BanTypesOptions = [BanTypesOption?];
/**
* Disallow certain types.
*
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
*/
type BanTypesRuleConfig = RuleConfig<BanTypesOptions>;
/**
* Disallow certain types.
*
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
*/
interface BanTypesRule {
/**
* Disallow certain types.
*
* @see [ban-types](https://typescript-eslint.io/rules/ban-types)
*/
'@typescript-eslint/ban-types': BanTypesRuleConfig;
}
/**
* Option.
*/
type BlockSpacingOption$1 = 'always' | 'never';
/**
* Options.
*/
type BlockSpacingOptions$1 = [BlockSpacingOption$1?];
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://typescript-eslint.io/rules/block-spacing)
*/
type BlockSpacingRuleConfig$1 = RuleConfig<BlockSpacingOptions$1>;
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://typescript-eslint.io/rules/block-spacing)
*/
interface BlockSpacingRule$1 {
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block.
*
* @see [block-spacing](https://typescript-eslint.io/rules/block-spacing)
*/
'@typescript-eslint/block-spacing': BlockSpacingRuleConfig$1;
}
/**
* Config.
*/
interface BraceStyleConfig$1 {
allowSingleLine?: boolean;
}
/**
* Option.
*/
type BraceStyleOption$1 = '1tbs' | 'stroustrup' | 'allman';
/**
* Options.
*/
type BraceStyleOptions$1 = [BraceStyleOption$1?, BraceStyleConfig$1?];
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://typescript-eslint.io/rules/brace-style)
*/
type BraceStyleRuleConfig$1 = RuleConfig<BraceStyleOptions$1>;
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://typescript-eslint.io/rules/brace-style)
*/
interface BraceStyleRule$1 {
/**
* Enforce consistent brace style for blocks.
*
* @see [brace-style](https://typescript-eslint.io/rules/brace-style)
*/
'@typescript-eslint/brace-style': BraceStyleRuleConfig$1;
}
/**
* Option.
*/
type ClassLiteralPropertyStyleOption = 'fields' | 'getters';
/**
* Options.
*/
type ClassLiteralPropertyStyleOptions = [
ClassLiteralPropertyStyleOption?,
];
/**
* Enforce that literals on classes are exposed in a consistent style.
*
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
*/
type ClassLiteralPropertyStyleRuleConfig =
RuleConfig<ClassLiteralPropertyStyleOptions>;
/**
* Enforce that literals on classes are exposed in a consistent style.
*
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
*/
interface ClassLiteralPropertyStyleRule {
/**
* Enforce that literals on classes are exposed in a consistent style.
*
* @see [class-literal-property-style](https://typescript-eslint.io/rules/class-literal-property-style)
*/
'@typescript-eslint/class-literal-property-style': ClassLiteralPropertyStyleRuleConfig;
}
/**
* Option.
*/
interface ClassMethodsUseThisOption {
/**
* Allows specified method names to be ignored with this rule
*/
exceptMethods?: string[];
/**
* Enforces that functions used as instance field initializers utilize `this`
*/
enforceForClassFields?: boolean;
/**
* Ingore members marked with the `override` modifier
*/
ignoreOverrideMethods?: boolean;
/**
* Ignore classes that specifically implement some interface
*/
ignoreClassesThatImplementAnInterface?: boolean;
}
/**
* Options.
*/
type ClassMethodsUseThisOptions = [ClassMethodsUseThisOption?];
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://typescript-eslint.io/rules/class-methods-use-this)
*/
type ClassMethodsUseThisRuleConfig =
RuleConfig<ClassMethodsUseThisOptions>;
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://typescript-eslint.io/rules/class-methods-use-this)
*/
interface ClassMethodsUseThisRule {
/**
* Enforce that class methods utilize `this`.
*
* @see [class-methods-use-this](https://typescript-eslint.io/rules/class-methods-use-this)
*/
'@typescript-eslint/class-methods-use-this': ClassMethodsUseThisRuleConfig;
}
/**
* Option.
*/
type CommaDangleOption$1 =
| []
| [
| Value$1
| {
arrays?: ValueWithIgnore$1;
objects?: ValueWithIgnore$1;
imports?: ValueWithIgnore$1;
exports?: ValueWithIgnore$1;
functions?: ValueWithIgnore$1;
enums?: ValueWithIgnore$1;
generics?: ValueWithIgnore$1;
tuples?: ValueWithIgnore$1;
},
];
type Value$1 = 'always-multiline' | 'always' | 'never' | 'only-multiline';
type ValueWithIgnore$1 =
| 'always-multiline'
| 'always'
| 'never'
| 'only-multiline'
| 'ignore';
/**
* Options.
*/
type CommaDangleOptions$1 = CommaDangleOption$1;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
*/
type CommaDangleRuleConfig$1 = RuleConfig<CommaDangleOptions$1>;
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
*/
interface CommaDangleRule$1 {
/**
* Require or disallow trailing commas.
*
* @see [comma-dangle](https://typescript-eslint.io/rules/comma-dangle)
*/
'@typescript-eslint/comma-dangle': CommaDangleRuleConfig$1;
}
/**
* Option.
*/
interface CommaSpacingOption$1 {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type CommaSpacingOptions$1 = [CommaSpacingOption$1?];
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
*/
type CommaSpacingRuleConfig$1 = RuleConfig<CommaSpacingOptions$1>;
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
*/
interface CommaSpacingRule$1 {
/**
* Enforce consistent spacing before and after commas.
*
* @see [comma-spacing](https://typescript-eslint.io/rules/comma-spacing)
*/
'@typescript-eslint/comma-spacing': CommaSpacingRuleConfig$1;
}
/**
* Option.
*/
type ConsistentGenericConstructorsOption =
| 'type-annotation'
| 'constructor';
/**
* Options.
*/
type ConsistentGenericConstructorsOptions = [
ConsistentGenericConstructorsOption?,
];
/**
* Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
*
* @see [consistent-generic-constructors](https://typescript-eslint.io/rules/consistent-generic-constructors)
*/
type ConsistentGenericConstructorsRuleConfig =
RuleConfig<ConsistentGenericConstructorsOptions>;
/**
* Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
*
* @see [consistent-generic-constructors](https://typescript-eslint.io/rules/consistent-generic-constructors)
*/
interface ConsistentGenericConstructorsRule {
/**
* Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.
*
* @see [consistent-generic-constructors](https://typescript-eslint.io/rules/consistent-generic-constructors)
*/
'@typescript-eslint/consistent-generic-constructors': ConsistentGenericConstructorsRuleConfig;
}
/**
* Option.
*/
type ConsistentIndexedObjectStyleOption = 'record' | 'index-signature';
/**
* Options.
*/
type ConsistentIndexedObjectStyleOptions = [
ConsistentIndexedObjectStyleOption?,
];
/**
* Require or disallow the `Record` type.
*
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
*/
type ConsistentIndexedObjectStyleRuleConfig =
RuleConfig<ConsistentIndexedObjectStyleOptions>;
/**
* Require or disallow the `Record` type.
*
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
*/
interface ConsistentIndexedObjectStyleRule {
/**
* Require or disallow the `Record` type.
*
* @see [consistent-indexed-object-style](https://typescript-eslint.io/rules/consistent-indexed-object-style)
*/
'@typescript-eslint/consistent-indexed-object-style': ConsistentIndexedObjectStyleRuleConfig;
}
/**
* Option.
*/
type ConsistentTypeAssertionsOption =
| {
assertionStyle: 'never';
}
| {
assertionStyle: 'as' | 'angle-bracket';
objectLiteralTypeAssertions?: 'allow' | 'allow-as-parameter' | 'never';
};
/**
* Options.
*/
type ConsistentTypeAssertionsOptions = [ConsistentTypeAssertionsOption?];
/**
* Enforce consistent usage of type assertions.
*
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
*/
type ConsistentTypeAssertionsRuleConfig =
RuleConfig<ConsistentTypeAssertionsOptions>;
/**
* Enforce consistent usage of type assertions.
*
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
*/
interface ConsistentTypeAssertionsRule {
/**
* Enforce consistent usage of type assertions.
*
* @see [consistent-type-assertions](https://typescript-eslint.io/rules/consistent-type-assertions)
*/
'@typescript-eslint/consistent-type-assertions': ConsistentTypeAssertionsRuleConfig;
}
/**
* Option.
*/
type ConsistentTypeDefinitionsOption = 'interface' | 'type';
/**
* Options.
*/
type ConsistentTypeDefinitionsOptions = [
ConsistentTypeDefinitionsOption?,
];
/**
* Enforce type definitions to consistently use either `interface` or `type`.
*
* @see [consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
*/
type ConsistentTypeDefinitionsRuleConfig =
RuleConfig<ConsistentTypeDefinitionsOptions>;
/**
* Enforce type definitions to consistently use either `interface` or `type`.
*
* @see [consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
*/
interface ConsistentTypeDefinitionsRule {
/**
* Enforce type definitions to consistently use either `interface` or `type`.
*
* @see [consistent-type-definitions](https://typescript-eslint.io/rules/consistent-type-definitions)
*/
'@typescript-eslint/consistent-type-definitions': ConsistentTypeDefinitionsRuleConfig;
}
/**
* Option.
*/
interface ConsistentTypeExportsOption {
fixMixedExportsWithInlineTypeSpecifier?: boolean;
}
/**
* Options.
*/
type ConsistentTypeExportsOptions = [ConsistentTypeExportsOption?];
/**
* Enforce consistent usage of type exports.
*
* @see [consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports)
*/
type ConsistentTypeExportsRuleConfig =
RuleConfig<ConsistentTypeExportsOptions>;
/**
* Enforce consistent usage of type exports.
*
* @see [consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports)
*/
interface ConsistentTypeExportsRule {
/**
* Enforce consistent usage of type exports.
*
* @see [consistent-type-exports](https://typescript-eslint.io/rules/consistent-type-exports)
*/
'@typescript-eslint/consistent-type-exports': ConsistentTypeExportsRuleConfig;
}
/**
* Option.
*/
interface ConsistentTypeImportsOption {
prefer?: 'type-imports' | 'no-type-imports';
disallowTypeAnnotations?: boolean;
fixStyle?: 'separate-type-imports' | 'inline-type-imports';
}
/**
* Options.
*/
type ConsistentTypeImportsOptions = [ConsistentTypeImportsOption?];
/**
* Enforce consistent usage of type imports.
*
* @see [consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports)
*/
type ConsistentTypeImportsRuleConfig =
RuleConfig<ConsistentTypeImportsOptions>;
/**
* Enforce consistent usage of type imports.
*
* @see [consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports)
*/
interface ConsistentTypeImportsRule {
/**
* Enforce consistent usage of type imports.
*
* @see [consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports)
*/
'@typescript-eslint/consistent-type-imports': ConsistentTypeImportsRuleConfig;
}
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://typescript-eslint.io/rules/default-param-last)
*/
type DefaultParamLastRuleConfig = RuleConfig<[]>;
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://typescript-eslint.io/rules/default-param-last)
*/
interface DefaultParamLastRule {
/**
* Enforce default parameters to be last.
*
* @see [default-param-last](https://typescript-eslint.io/rules/default-param-last)
*/
'@typescript-eslint/default-param-last': DefaultParamLastRuleConfig;
}
/**
* Option.
*/
interface DotNotationOption$1 {
allowKeywords?: boolean;
allowPattern?: string;
allowPrivateClassPropertyAccess?: boolean;
allowProtectedClassPropertyAccess?: boolean;
allowIndexSignaturePropertyAccess?: boolean;
}
/**
* Options.
*/
type DotNotationOptions$1 = [DotNotationOption$1?];
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://typescript-eslint.io/rules/dot-notation)
*/
type DotNotationRuleConfig$1 = RuleConfig<DotNotationOptions$1>;
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://typescript-eslint.io/rules/dot-notation)
*/
interface DotNotationRule$1 {
/**
* Enforce dot notation whenever possible.
*
* @see [dot-notation](https://typescript-eslint.io/rules/dot-notation)
*/
'@typescript-eslint/dot-notation': DotNotationRuleConfig$1;
}
/**
* Option.
*/
interface ExplicitFunctionReturnTypeOption {
/**
* Whether to allow arrow functions that start with the `void` keyword.
*/
allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean;
/**
* Whether to ignore function expressions (functions which are not part of a declaration).
*/
allowExpressions?: boolean;
/**
* Whether to ignore functions immediately returning another function expression.
*/
allowHigherOrderFunctions?: boolean;
/**
* Whether to ignore type annotations on the variable of function expressions.
*/
allowTypedFunctionExpressions?: boolean;
/**
* Whether to ignore arrow functions immediately returning a `as const` value.
*/
allowDirectConstAssertionInArrowFunctions?: boolean;
/**
* Whether to ignore functions that don't have generic type parameters.
*/
allowFunctionsWithoutTypeParameters?: boolean;
/**
* An array of function/method names that will not have their arguments or return values checked.
*/
allowedNames?: string[];
/**
* Whether to ignore immediately invoked function expressions (IIFEs).
*/
allowIIFEs?: boolean;
}
/**
* Options.
*/
type ExplicitFunctionReturnTypeOptions = [
ExplicitFunctionReturnTypeOption?,
];
/**
* Require explicit return types on functions and class methods.
*
* @see [explicit-function-return-type](https://typescript-eslint.io/rules/explicit-function-return-type)
*/
type ExplicitFunctionReturnTypeRuleConfig =
RuleConfig<ExplicitFunctionReturnTypeOptions>;
/**
* Require explicit return types on functions and class methods.
*
* @see [explicit-function-return-type](https://typescript-eslint.io/rules/explicit-function-return-type)
*/
interface ExplicitFunctionReturnTypeRule {
/**
* Require explicit return types on functions and class methods.
*
* @see [explicit-function-return-type](https://typescript-eslint.io/rules/explicit-function-return-type)
*/
'@typescript-eslint/explicit-function-return-type': ExplicitFunctionReturnTypeRuleConfig;
}
/**
* Option.
*/
type AccessibilityLevel = 'explicit' | 'no-public' | 'off';
interface ExplicitMemberAccessibilityOption {
accessibility?: AccessibilityLevel;
overrides?: {
accessors?: AccessibilityLevel;
constructors?: AccessibilityLevel;
methods?: AccessibilityLevel;
properties?: AccessibilityLevel;
parameterProperties?: AccessibilityLevel;
};
ignoredMethodNames?: string[];
}
/**
* Options.
*/
type ExplicitMemberAccessibilityOptions = [
ExplicitMemberAccessibilityOption?,
];
/**
* Require explicit accessibility modifiers on class properties and methods.
*
* @see [explicit-member-accessibility](https://typescript-eslint.io/rules/explicit-member-accessibility)
*/
type ExplicitMemberAccessibilityRuleConfig =
RuleConfig<ExplicitMemberAccessibilityOptions>;
/**
* Require explicit accessibility modifiers on class properties and methods.
*
* @see [explicit-member-accessibility](https://typescript-eslint.io/rules/explicit-member-accessibility)
*/
interface ExplicitMemberAccessibilityRule {
/**
* Require explicit accessibility modifiers on class properties and methods.
*
* @see [explicit-member-accessibility](https://typescript-eslint.io/rules/explicit-member-accessibility)
*/
'@typescript-eslint/explicit-member-accessibility': ExplicitMemberAccessibilityRuleConfig;
}
/**
* Option.
*/
interface ExplicitModuleBoundaryTypesOption {
/**
* Whether to ignore arguments that are explicitly typed as `any`.
*/
allowArgumentsExplicitlyTypedAsAny?: boolean;
/**
* Whether to ignore return type annotations on body-less arrow functions that return an `as const` type assertion.
* You must still type the parameters of the function.
*/
allowDirectConstAssertionInArrowFunctions?: boolean;
/**
* An array of function/method names that will not have their arguments or return values checked.
*/
allowedNames?: string[];
/**
* Whether to ignore return type annotations on functions immediately returning another function expression.
* You must still type the parameters of the function.
*/
allowHigherOrderFunctions?: boolean;
/**
* Whether to ignore type annotations on the variable of a function expresion.
*/
allowTypedFunctionExpressions?: boolean;
}
/**
* Options.
*/
type ExplicitModuleBoundaryTypesOptions = [
ExplicitModuleBoundaryTypesOption?,
];
/**
* Require explicit return and argument types on exported functions' and classes' public class methods.
*
* @see [explicit-module-boundary-types](https://typescript-eslint.io/rules/explicit-module-boundary-types)
*/
type ExplicitModuleBoundaryTypesRuleConfig =
RuleConfig<ExplicitModuleBoundaryTypesOptions>;
/**
* Require explicit return and argument types on exported functions' and classes' public class methods.
*
* @see [explicit-module-boundary-types](https://typescript-eslint.io/rules/explicit-module-boundary-types)
*/
interface ExplicitModuleBoundaryTypesRule {
/**
* Require explicit return and argument types on exported functions' and classes' public class methods.
*
* @see [explicit-module-boundary-types](https://typescript-eslint.io/rules/explicit-module-boundary-types)
*/
'@typescript-eslint/explicit-module-boundary-types': ExplicitModuleBoundaryTypesRuleConfig;
}
/**
* Option.
*/
type FuncCallSpacingOption$1 =
| []
| ['never']
| []
| ['always']
| [
'always',
{
allowNewlines?: boolean;
},
];
/**
* Options.
*/
type FuncCallSpacingOptions$1 = FuncCallSpacingOption$1;
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://typescript-eslint.io/rules/func-call-spacing)
*/
type FuncCallSpacingRuleConfig$1 = RuleConfig<FuncCallSpacingOptions$1>;
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://typescript-eslint.io/rules/func-call-spacing)
*/
interface FuncCallSpacingRule$1 {
/**
* Require or disallow spacing between function identifiers and their invocations.
*
* @see [func-call-spacing](https://typescript-eslint.io/rules/func-call-spacing)
*/
'@typescript-eslint/func-call-spacing': FuncCallSpacingRuleConfig$1;
}
/**
* Config.
*/
interface IndentConfig$1 {
SwitchCase?: number;
VariableDeclarator?:
| (number | ('first' | 'off'))
| {
var?: number | ('first' | 'off');
let?: number | ('first' | 'off');
const?: number | ('first' | 'off');
};
outerIIFEBody?: number | 'off';
MemberExpression?: number | 'off';
FunctionDeclaration?: {
parameters?: number | ('first' | 'off');
body?: number;
};
FunctionExpression?: {
parameters?: number | ('first' | 'off');
body?: number;
};
StaticBlock?: {
body?: number;
};
CallExpression?: {
arguments?: number | ('first' | 'off');
};
ArrayExpression?: number | ('first' | 'off');
ObjectExpression?: number | ('first' | 'off');
ImportDeclaration?: number | ('first' | 'off');
flatTernaryExpressions?: boolean;
offsetTernaryExpressions?: boolean;
ignoredNodes?: string[];
ignoreComments?: boolean;
}
/**
* Option.
*/
type IndentOption$1 = 'tab' | number;
/**
* Options.
*/
type IndentOptions$1 = [IndentOption$1?, IndentConfig$1?];
/**
* Enforce consistent indentation.
*
* @see [indent](https://typescript-eslint.io/rules/indent)
*/
type IndentRuleConfig$1 = RuleConfig<IndentOptions$1>;
/**
* Enforce consistent indentation.
*
* @see [indent](https://typescript-eslint.io/rules/indent)
*/
interface IndentRule$1 {
/**
* Enforce consistent indentation.
*
* @see [indent](https://typescript-eslint.io/rules/indent)
*/
'@typescript-eslint/indent': IndentRuleConfig$1;
}
/**
* Option.
*/
type InitDeclarationsOption =
| []
| ['always']
| []
| ['never']
| [
'never',
{
ignoreForLoopInit?: boolean;
},
];
/**
* Options.
*/
type InitDeclarationsOptions = InitDeclarationsOption;
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://typescript-eslint.io/rules/init-declarations)
*/
type InitDeclarationsRuleConfig = RuleConfig<InitDeclarationsOptions>;
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://typescript-eslint.io/rules/init-declarations)
*/
interface InitDeclarationsRule {
/**
* Require or disallow initialization in variable declarations.
*
* @see [init-declarations](https://typescript-eslint.io/rules/init-declarations)
*/
'@typescript-eslint/init-declarations': InitDeclarationsRuleConfig;
}
/**
* Option.
*/
type KeySpacingOption$2 =
| {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
align?: {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
};
/**
* Options.
*/
type KeySpacingOptions$2 = [KeySpacingOption$2?];
/**
* Enforce consistent spacing between property names and type annotations in types and interfaces.
*
* @see [key-spacing](https://typescript-eslint.io/rules/key-spacing)
*/
type KeySpacingRuleConfig$2 = RuleConfig<KeySpacingOptions$2>;
/**
* Enforce consistent spacing between property names and type annotations in types and interfaces.
*
* @see [key-spacing](https://typescript-eslint.io/rules/key-spacing)
*/
interface KeySpacingRule$2 {
/**
* Enforce consistent spacing between property names and type annotations in types and interfaces.
*
* @see [key-spacing](https://typescript-eslint.io/rules/key-spacing)
*/
'@typescript-eslint/key-spacing': KeySpacingRuleConfig$2;
}
/**
* Option.
*/
interface KeywordSpacingOption$1 {
before?: boolean;
after?: boolean;
overrides?: {
abstract?: {
before?: boolean;
after?: boolean;
};
as?: {
before?: boolean;
after?: boolean;
};
async?: {
before?: boolean;
after?: boolean;
};
await?: {
before?: boolean;
after?: boolean;
};
boolean?: {
before?: boolean;
after?: boolean;
};
break?: {
before?: boolean;
after?: boolean;
};
byte?: {
before?: boolean;
after?: boolean;
};
case?: {
before?: boolean;
after?: boolean;
};
catch?: {
before?: boolean;
after?: boolean;
};
char?: {
before?: boolean;
after?: boolean;
};
class?: {
before?: boolean;
after?: boolean;
};
const?: {
before?: boolean;
after?: boolean;
};
continue?: {
before?: boolean;
after?: boolean;
};
debugger?: {
before?: boolean;
after?: boolean;
};
default?: {
before?: boolean;
after?: boolean;
};
delete?: {
before?: boolean;
after?: boolean;
};
do?: {
before?: boolean;
after?: boolean;
};
double?: {
before?: boolean;
after?: boolean;
};
else?: {
before?: boolean;
after?: boolean;
};
enum?: {
before?: boolean;
after?: boolean;
};
export?: {
before?: boolean;
after?: boolean;
};
extends?: {
before?: boolean;
after?: boolean;
};
false?: {
before?: boolean;
after?: boolean;
};
final?: {
before?: boolean;
after?: boolean;
};
finally?: {
before?: boolean;
after?: boolean;
};
float?: {
before?: boolean;
after?: boolean;
};
for?: {
before?: boolean;
after?: boolean;
};
from?: {
before?: boolean;
after?: boolean;
};
function?: {
before?: boolean;
after?: boolean;
};
get?: {
before?: boolean;
after?: boolean;
};
goto?: {
before?: boolean;
after?: boolean;
};
if?: {
before?: boolean;
after?: boolean;
};
implements?: {
before?: boolean;
after?: boolean;
};
import?: {
before?: boolean;
after?: boolean;
};
in?: {
before?: boolean;
after?: boolean;
};
instanceof?: {
before?: boolean;
after?: boolean;
};
int?: {
before?: boolean;
after?: boolean;
};
interface?: {
before?: boolean;
after?: boolean;
};
let?: {
before?: boolean;
after?: boolean;
};
long?: {
before?: boolean;
after?: boolean;
};
native?: {
before?: boolean;
after?: boolean;
};
new?: {
before?: boolean;
after?: boolean;
};
null?: {
before?: boolean;
after?: boolean;
};
of?: {
before?: boolean;
after?: boolean;
};
package?: {
before?: boolean;
after?: boolean;
};
private?: {
before?: boolean;
after?: boolean;
};
protected?: {
before?: boolean;
after?: boolean;
};
public?: {
before?: boolean;
after?: boolean;
};
return?: {
before?: boolean;
after?: boolean;
};
set?: {
before?: boolean;
after?: boolean;
};
short?: {
before?: boolean;
after?: boolean;
};
static?: {
before?: boolean;
after?: boolean;
};
super?: {
before?: boolean;
after?: boolean;
};
switch?: {
before?: boolean;
after?: boolean;
};
synchronized?: {
before?: boolean;
after?: boolean;
};
this?: {
before?: boolean;
after?: boolean;
};
throw?: {
before?: boolean;
after?: boolean;
};
throws?: {
before?: boolean;
after?: boolean;
};
transient?: {
before?: boolean;
after?: boolean;
};
true?: {
before?: boolean;
after?: boolean;
};
try?: {
before?: boolean;
after?: boolean;
};
typeof?: {
before?: boolean;
after?: boolean;
};
var?: {
before?: boolean;
after?: boolean;
};
void?: {
before?: boolean;
after?: boolean;
};
volatile?: {
before?: boolean;
after?: boolean;
};
while?: {
before?: boolean;
after?: boolean;
};
with?: {
before?: boolean;
after?: boolean;
};
yield?: {
before?: boolean;
after?: boolean;
};
type?: {
before?: boolean;
after?: boolean;
};
};
}
/**
* Options.
*/
type KeywordSpacingOptions$1 = [KeywordSpacingOption$1?];
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://typescript-eslint.io/rules/keyword-spacing)
*/
type KeywordSpacingRuleConfig$1 = RuleConfig<KeywordSpacingOptions$1>;
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://typescript-eslint.io/rules/keyword-spacing)
*/
interface KeywordSpacingRule$1 {
/**
* Enforce consistent spacing before and after keywords.
*
* @see [keyword-spacing](https://typescript-eslint.io/rules/keyword-spacing)
*/
'@typescript-eslint/keyword-spacing': KeywordSpacingRuleConfig$1;
}
/**
* Option.
*/
interface LinesAroundCommentOption {
beforeBlockComment?: boolean;
afterBlockComment?: boolean;
beforeLineComment?: boolean;
afterLineComment?: boolean;
allowBlockStart?: boolean;
allowBlockEnd?: boolean;
allowClassStart?: boolean;
allowClassEnd?: boolean;
allowObjectStart?: boolean;
allowObjectEnd?: boolean;
allowArrayStart?: boolean;
allowArrayEnd?: boolean;
allowInterfaceStart?: boolean;
allowInterfaceEnd?: boolean;
allowTypeStart?: boolean;
allowTypeEnd?: boolean;
allowEnumStart?: boolean;
allowEnumEnd?: boolean;
allowModuleStart?: boolean;
allowModuleEnd?: boolean;
ignorePattern?: string;
applyDefaultIgnorePatterns?: boolean;
}
/**
* Options.
*/
type LinesAroundCommentOptions = [LinesAroundCommentOption?];
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
*/
type LinesAroundCommentRuleConfig =
RuleConfig<LinesAroundCommentOptions>;
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
*/
interface LinesAroundCommentRule {
/**
* Require empty lines around comments.
*
* @see [lines-around-comment](https://typescript-eslint.io/rules/lines-around-comment)
*/
'@typescript-eslint/lines-around-comment': LinesAroundCommentRuleConfig;
}
/**
* Config.
*/
interface LinesBetweenClassMembersConfig {
exceptAfterSingleLine?: boolean;
exceptAfterOverload?: boolean;
}
/**
* Option.
*/
type LinesBetweenClassMembersOption =
| {
/**
* @minItems 1
*/
enforce: [
{
blankLine: 'always' | 'never';
prev: 'method' | 'field' | '*';
next: 'method' | 'field' | '*';
},
...{
blankLine: 'always' | 'never';
prev: 'method' | 'field' | '*';
next: 'method' | 'field' | '*';
}[],
];
}
| ('always' | 'never');
/**
* Options.
*/
type LinesBetweenClassMembersOptions = [
LinesBetweenClassMembersOption?,
LinesBetweenClassMembersConfig?,
];
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://typescript-eslint.io/rules/lines-between-class-members)
*/
type LinesBetweenClassMembersRuleConfig =
RuleConfig<LinesBetweenClassMembersOptions>;
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://typescript-eslint.io/rules/lines-between-class-members)
*/
interface LinesBetweenClassMembersRule {
/**
* Require or disallow an empty line between class members.
*
* @see [lines-between-class-members](https://typescript-eslint.io/rules/lines-between-class-members)
*/
'@typescript-eslint/lines-between-class-members': LinesBetweenClassMembersRuleConfig;
}
/**
* Option.
*/
type MultiLineOption = 'none' | 'semi' | 'comma';
type SingleLineOption = 'semi' | 'comma';
interface MemberDelimiterStyleOption {
multiline?: {
delimiter?: MultiLineOption;
requireLast?: boolean;
};
singleline?: {
delimiter?: SingleLineOption;
requireLast?: boolean;
};
overrides?: {
interface?: DelimiterConfig;
typeLiteral?: DelimiterConfig;
};
multilineDetection?: 'brackets' | 'last-member';
}
interface DelimiterConfig {
multiline?: {
delimiter?: MultiLineOption;
requireLast?: boolean;
};
singleline?: {
delimiter?: SingleLineOption;
requireLast?: boolean;
};
}
/**
* Options.
*/
type MemberDelimiterStyleOptions = [MemberDelimiterStyleOption?];
/**
* Require a specific member delimiter style for interfaces and type literals.
*
* @see [member-delimiter-style](https://typescript-eslint.io/rules/member-delimiter-style)
*/
type MemberDelimiterStyleRuleConfig =
RuleConfig<MemberDelimiterStyleOptions>;
/**
* Require a specific member delimiter style for interfaces and type literals.
*
* @see [member-delimiter-style](https://typescript-eslint.io/rules/member-delimiter-style)
*/
interface MemberDelimiterStyleRule {
/**
* Require a specific member delimiter style for interfaces and type literals.
*
* @see [member-delimiter-style](https://typescript-eslint.io/rules/member-delimiter-style)
*/
'@typescript-eslint/member-delimiter-style': MemberDelimiterStyleRuleConfig;
}
/**
* Option.
*/
type BaseConfig =
| 'never'
| (AllItems | AllItems[])[]
| {
memberTypes?: (AllItems | AllItems[])[] | 'never';
order?: OrderOptions;
optionalityOrder?: OptionalityOrderOptions;
};
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';
type OrderOptions =
| 'alphabetically'
| 'alphabetically-case-insensitive'
| 'as-written'
| 'natural'
| 'natural-case-insensitive';
type OptionalityOrderOptions = 'optional-first' | 'required-first';
type TypesConfig =
| 'never'
| (TypeItems | TypeItems[])[]
| {
memberTypes?: (TypeItems | TypeItems[])[] | 'never';
order?: OrderOptions;
optionalityOrder?: OptionalityOrderOptions;
};
type TypeItems =
| 'readonly-signature'
| 'signature'
| 'readonly-field'
| 'field'
| 'method'
| 'constructor';
interface MemberOrderingOption {
default?: BaseConfig;
classes?: BaseConfig;
classExpressions?: BaseConfig;
interfaces?: TypesConfig;
typeLiterals?: TypesConfig;
}
/**
* Options.
*/
type MemberOrderingOptions = [MemberOrderingOption?];
/**
* Require a consistent member declaration order.
*
* @see [member-ordering](https://typescript-eslint.io/rules/member-ordering)
*/
type MemberOrderingRuleConfig = RuleConfig<MemberOrderingOptions>;
/**
* Require a consistent member declaration order.
*
* @see [member-ordering](https://typescript-eslint.io/rules/member-ordering)
*/
interface MemberOrderingRule {
/**
* Require a consistent member declaration order.
*
* @see [member-ordering](https://typescript-eslint.io/rules/member-ordering)
*/
'@typescript-eslint/member-ordering': MemberOrderingRuleConfig;
}
/**
* Option.
*/
type MethodSignatureStyleOption = 'property' | 'method';
/**
* Options.
*/
type MethodSignatureStyleOptions = [MethodSignatureStyleOption?];
/**
* Enforce using a particular method signature syntax.
*
* @see [method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
*/
type MethodSignatureStyleRuleConfig =
RuleConfig<MethodSignatureStyleOptions>;
/**
* Enforce using a particular method signature syntax.
*
* @see [method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
*/
interface MethodSignatureStyleRule {
/**
* Enforce using a particular method signature syntax.
*
* @see [method-signature-style](https://typescript-eslint.io/rules/method-signature-style)
*/
'@typescript-eslint/method-signature-style': MethodSignatureStyleRuleConfig;
}
/**
* Option.
*/
type FormatOptionsConfig = PredefinedFormats[] | null;
type PredefinedFormats =
| 'camelCase'
| 'strictCamelCase'
| 'PascalCase'
| 'StrictPascalCase'
| 'snake_case'
| 'UPPER_CASE';
type UnderscoreOptions =
| 'forbid'
| 'allow'
| 'require'
| 'requireDouble'
| 'allowDouble'
| 'allowSingleOrDouble';
type PrefixSuffixConfig = string[];
type TypeModifiers =
| 'boolean'
| 'string'
| 'number'
| 'function'
| 'array';
type NamingConventionOption = (
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: (
| 'default'
| 'variableLike'
| 'memberLike'
| 'typeLike'
| 'method'
| 'property'
| 'variable'
| 'function'
| 'parameter'
| 'parameterProperty'
| 'accessor'
| 'enumMember'
| 'classMethod'
| 'objectLiteralMethod'
| 'typeMethod'
| 'classProperty'
| 'objectLiteralProperty'
| 'typeProperty'
| 'class'
| 'interface'
| 'typeAlias'
| 'enum'
| 'typeParameter'
)[];
modifiers?: (
| 'const'
| 'readonly'
| 'static'
| 'public'
| 'protected'
| 'private'
| '#private'
| 'abstract'
| 'destructured'
| 'global'
| 'exported'
| 'unused'
| 'requiresQuotes'
| 'override'
| 'async'
)[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'default';
modifiers?: (
| 'const'
| 'readonly'
| 'static'
| 'public'
| 'protected'
| 'private'
| '#private'
| 'abstract'
| 'destructured'
| 'global'
| 'exported'
| 'unused'
| 'requiresQuotes'
| 'override'
| 'async'
)[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'variableLike';
modifiers?: ('unused' | 'async')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'variable';
modifiers?: (
| 'const'
| 'destructured'
| 'exported'
| 'global'
| 'unused'
| 'async'
)[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'function';
modifiers?: ('exported' | 'global' | 'unused' | 'async')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'parameter';
modifiers?: ('destructured' | 'unused')[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'memberLike';
modifiers?: (
| 'abstract'
| 'private'
| '#private'
| 'protected'
| 'public'
| 'readonly'
| 'requiresQuotes'
| 'static'
| 'override'
| 'async'
)[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'classProperty';
modifiers?: (
| 'abstract'
| 'private'
| '#private'
| 'protected'
| 'public'
| 'readonly'
| 'requiresQuotes'
| 'static'
| 'override'
)[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'objectLiteralProperty';
modifiers?: ('public' | 'requiresQuotes')[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'typeProperty';
modifiers?: ('public' | 'readonly' | 'requiresQuotes')[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'parameterProperty';
modifiers?: ('private' | 'protected' | 'public' | 'readonly')[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'property';
modifiers?: (
| 'abstract'
| 'private'
| '#private'
| 'protected'
| 'public'
| 'readonly'
| 'requiresQuotes'
| 'static'
| 'override'
| 'async'
)[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'classMethod';
modifiers?: (
| 'abstract'
| 'private'
| '#private'
| 'protected'
| 'public'
| 'requiresQuotes'
| 'static'
| 'override'
| 'async'
)[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'objectLiteralMethod';
modifiers?: ('public' | 'requiresQuotes' | 'async')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'typeMethod';
modifiers?: ('public' | 'requiresQuotes')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'method';
modifiers?: (
| 'abstract'
| 'private'
| '#private'
| 'protected'
| 'public'
| 'requiresQuotes'
| 'static'
| 'override'
| 'async'
)[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'accessor';
modifiers?: (
| 'abstract'
| 'private'
| 'protected'
| 'public'
| 'requiresQuotes'
| 'static'
| 'override'
)[];
types?: TypeModifiers[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'enumMember';
modifiers?: 'requiresQuotes'[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'typeLike';
modifiers?: ('abstract' | 'exported' | 'unused')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'class';
modifiers?: ('abstract' | 'exported' | 'unused')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'interface';
modifiers?: ('exported' | 'unused')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'typeAlias';
modifiers?: ('exported' | 'unused')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'enum';
modifiers?: ('exported' | 'unused')[];
}
| {
format: FormatOptionsConfig;
custom?: MatchRegexConfig;
leadingUnderscore?: UnderscoreOptions;
trailingUnderscore?: UnderscoreOptions;
prefix?: PrefixSuffixConfig;
suffix?: PrefixSuffixConfig;
failureMessage?: string;
filter?: string | MatchRegexConfig;
selector: 'typeParameter';
modifiers?: 'unused'[];
}
)[];
interface MatchRegexConfig {
match: boolean;
regex: string;
}
/**
* Options.
*/
type NamingConventionOptions = NamingConventionOption;
/**
* Enforce naming conventions for everything across a codebase.
*
* @see [naming-convention](https://typescript-eslint.io/rules/naming-convention)
*/
type NamingConventionRuleConfig = RuleConfig<NamingConventionOptions>;
/**
* Enforce naming conventions for everything across a codebase.
*
* @see [naming-convention](https://typescript-eslint.io/rules/naming-convention)
*/
interface NamingConventionRule {
/**
* Enforce naming conventions for everything across a codebase.
*
* @see [naming-convention](https://typescript-eslint.io/rules/naming-convention)
*/
'@typescript-eslint/naming-convention': NamingConventionRuleConfig;
}
/**
* Disallow generic `Array` constructors.
*
* @see [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)
*/
type NoArrayConstructorRuleConfig = RuleConfig<[]>;
/**
* Disallow generic `Array` constructors.
*
* @see [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)
*/
interface NoArrayConstructorRule {
/**
* Disallow generic `Array` constructors.
*
* @see [no-array-constructor](https://typescript-eslint.io/rules/no-array-constructor)
*/
'@typescript-eslint/no-array-constructor': NoArrayConstructorRuleConfig;
}
/**
* Option.
*/
interface NoBaseToStringOption {
ignoredTypeNames?: string[];
}
/**
* Options.
*/
type NoBaseToStringOptions = [NoBaseToStringOption?];
/**
* Require `.toString()` to only be called on objects which provide useful information when stringified.
*
* @see [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
*/
type NoBaseToStringRuleConfig = RuleConfig<NoBaseToStringOptions>;
/**
* Require `.toString()` to only be called on objects which provide useful information when stringified.
*
* @see [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
*/
interface NoBaseToStringRule {
/**
* Require `.toString()` to only be called on objects which provide useful information when stringified.
*
* @see [no-base-to-string](https://typescript-eslint.io/rules/no-base-to-string)
*/
'@typescript-eslint/no-base-to-string': NoBaseToStringRuleConfig;
}
/**
* Disallow non-null assertion in locations that may be confusing.
*
* @see [no-confusing-non-null-assertion](https://typescript-eslint.io/rules/no-confusing-non-null-assertion)
*/
type NoConfusingNonNullAssertionRuleConfig = RuleConfig<[]>;
/**
* Disallow non-null assertion in locations that may be confusing.
*
* @see [no-confusing-non-null-assertion](https://typescript-eslint.io/rules/no-confusing-non-null-assertion)
*/
interface NoConfusingNonNullAssertionRule {
/**
* Disallow non-null assertion in locations that may be confusing.
*
* @see [no-confusing-non-null-assertion](https://typescript-eslint.io/rules/no-confusing-non-null-assertion)
*/
'@typescript-eslint/no-confusing-non-null-assertion': NoConfusingNonNullAssertionRuleConfig;
}
/**
* Option.
*/
interface NoConfusingVoidExpressionOption {
ignoreArrowShorthand?: boolean;
ignoreVoidOperator?: boolean;
}
/**
* Options.
*/
type NoConfusingVoidExpressionOptions = [
NoConfusingVoidExpressionOption?,
];
/**
* Require expressions of type void to appear in statement position.
*
* @see [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
*/
type NoConfusingVoidExpressionRuleConfig =
RuleConfig<NoConfusingVoidExpressionOptions>;
/**
* Require expressions of type void to appear in statement position.
*
* @see [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
*/
interface NoConfusingVoidExpressionRule {
/**
* Require expressions of type void to appear in statement position.
*
* @see [no-confusing-void-expression](https://typescript-eslint.io/rules/no-confusing-void-expression)
*/
'@typescript-eslint/no-confusing-void-expression': NoConfusingVoidExpressionRuleConfig;
}
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://typescript-eslint.io/rules/no-dupe-class-members)
*/
type NoDupeClassMembersRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://typescript-eslint.io/rules/no-dupe-class-members)
*/
interface NoDupeClassMembersRule {
/**
* Disallow duplicate class members.
*
* @see [no-dupe-class-members](https://typescript-eslint.io/rules/no-dupe-class-members)
*/
'@typescript-eslint/no-dupe-class-members': NoDupeClassMembersRuleConfig;
}
/**
* Disallow duplicate enum member values.
*
* @see [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)
*/
type NoDuplicateEnumValuesRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate enum member values.
*
* @see [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)
*/
interface NoDuplicateEnumValuesRule {
/**
* Disallow duplicate enum member values.
*
* @see [no-duplicate-enum-values](https://typescript-eslint.io/rules/no-duplicate-enum-values)
*/
'@typescript-eslint/no-duplicate-enum-values': NoDuplicateEnumValuesRuleConfig;
}
/**
* Option.
*/
interface NoDuplicateTypeConstituentsOption {
ignoreIntersections?: boolean;
ignoreUnions?: boolean;
}
/**
* Options.
*/
type NoDuplicateTypeConstituentsOptions = [
NoDuplicateTypeConstituentsOption?,
];
/**
* Disallow duplicate constituents of union or intersection types.
*
* @see [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
*/
type NoDuplicateTypeConstituentsRuleConfig =
RuleConfig<NoDuplicateTypeConstituentsOptions>;
/**
* Disallow duplicate constituents of union or intersection types.
*
* @see [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
*/
interface NoDuplicateTypeConstituentsRule {
/**
* Disallow duplicate constituents of union or intersection types.
*
* @see [no-duplicate-type-constituents](https://typescript-eslint.io/rules/no-duplicate-type-constituents)
*/
'@typescript-eslint/no-duplicate-type-constituents': NoDuplicateTypeConstituentsRuleConfig;
}
/**
* Disallow using the `delete` operator on computed key expressions.
*
* @see [no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
*/
type NoDynamicDeleteRuleConfig = RuleConfig<[]>;
/**
* Disallow using the `delete` operator on computed key expressions.
*
* @see [no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
*/
interface NoDynamicDeleteRule {
/**
* Disallow using the `delete` operator on computed key expressions.
*
* @see [no-dynamic-delete](https://typescript-eslint.io/rules/no-dynamic-delete)
*/
'@typescript-eslint/no-dynamic-delete': NoDynamicDeleteRuleConfig;
}
/**
* Option.
*/
interface NoEmptyFunctionOption {
allow?: (
| 'functions'
| 'arrowFunctions'
| 'generatorFunctions'
| 'methods'
| 'generatorMethods'
| 'getters'
| 'setters'
| 'constructors'
| 'private-constructors'
| 'protected-constructors'
| 'asyncFunctions'
| 'asyncMethods'
| 'decoratedFunctions'
| 'overrideMethods'
)[];
}
/**
* Options.
*/
type NoEmptyFunctionOptions = [NoEmptyFunctionOption?];
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://typescript-eslint.io/rules/no-empty-function)
*/
type NoEmptyFunctionRuleConfig = RuleConfig<NoEmptyFunctionOptions>;
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://typescript-eslint.io/rules/no-empty-function)
*/
interface NoEmptyFunctionRule {
/**
* Disallow empty functions.
*
* @see [no-empty-function](https://typescript-eslint.io/rules/no-empty-function)
*/
'@typescript-eslint/no-empty-function': NoEmptyFunctionRuleConfig;
}
/**
* Option.
*/
interface NoEmptyInterfaceOption {
allowSingleExtends?: boolean;
}
/**
* Options.
*/
type NoEmptyInterfaceOptions = [NoEmptyInterfaceOption?];
/**
* Disallow the declaration of empty interfaces.
*
* @see [no-empty-interface](https://typescript-eslint.io/rules/no-empty-interface)
*/
type NoEmptyInterfaceRuleConfig = RuleConfig<NoEmptyInterfaceOptions>;
/**
* Disallow the declaration of empty interfaces.
*
* @see [no-empty-interface](https://typescript-eslint.io/rules/no-empty-interface)
*/
interface NoEmptyInterfaceRule {
/**
* Disallow the declaration of empty interfaces.
*
* @see [no-empty-interface](https://typescript-eslint.io/rules/no-empty-interface)
*/
'@typescript-eslint/no-empty-interface': NoEmptyInterfaceRuleConfig;
}
/**
* Option.
*/
interface NoExplicitAnyOption {
/**
* Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.
*/
fixToUnknown?: boolean;
/**
* Whether to ignore rest parameter arrays.
*/
ignoreRestArgs?: boolean;
}
/**
* Options.
*/
type NoExplicitAnyOptions = [NoExplicitAnyOption?];
/**
* Disallow the `any` type.
*
* @see [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)
*/
type NoExplicitAnyRuleConfig = RuleConfig<NoExplicitAnyOptions>;
/**
* Disallow the `any` type.
*
* @see [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)
*/
interface NoExplicitAnyRule {
/**
* Disallow the `any` type.
*
* @see [no-explicit-any](https://typescript-eslint.io/rules/no-explicit-any)
*/
'@typescript-eslint/no-explicit-any': NoExplicitAnyRuleConfig;
}
/**
* Disallow extra non-null assertions.
*
* @see [no-extra-non-null-assertion](https://typescript-eslint.io/rules/no-extra-non-null-assertion)
*/
type NoExtraNonNullAssertionRuleConfig = RuleConfig<[]>;
/**
* Disallow extra non-null assertions.
*
* @see [no-extra-non-null-assertion](https://typescript-eslint.io/rules/no-extra-non-null-assertion)
*/
interface NoExtraNonNullAssertionRule {
/**
* Disallow extra non-null assertions.
*
* @see [no-extra-non-null-assertion](https://typescript-eslint.io/rules/no-extra-non-null-assertion)
*/
'@typescript-eslint/no-extra-non-null-assertion': NoExtraNonNullAssertionRuleConfig;
}
/**
* Option.
*/
type NoExtraParensOption$1 =
| []
| ['functions']
| []
| ['all']
| [
'all',
{
conditionalAssign?: boolean;
ternaryOperandBinaryExpressions?: boolean;
nestedBinaryExpressions?: boolean;
returnAssign?: boolean;
ignoreJSX?: 'none' | 'all' | 'single-line' | 'multi-line';
enforceForArrowConditionals?: boolean;
enforceForSequenceExpressions?: boolean;
enforceForNewInMemberExpressions?: boolean;
enforceForFunctionPrototypeMethods?: boolean;
allowParensAfterCommentPattern?: string;
},
];
/**
* Options.
*/
type NoExtraParensOptions$1 = NoExtraParensOption$1;
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://typescript-eslint.io/rules/no-extra-parens)
*/
type NoExtraParensRuleConfig$1 = RuleConfig<NoExtraParensOptions$1>;
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://typescript-eslint.io/rules/no-extra-parens)
*/
interface NoExtraParensRule$1 {
/**
* Disallow unnecessary parentheses.
*
* @see [no-extra-parens](https://typescript-eslint.io/rules/no-extra-parens)
*/
'@typescript-eslint/no-extra-parens': NoExtraParensRuleConfig$1;
}
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://typescript-eslint.io/rules/no-extra-semi)
*/
type NoExtraSemiRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://typescript-eslint.io/rules/no-extra-semi)
*/
interface NoExtraSemiRule {
/**
* Disallow unnecessary semicolons.
*
* @see [no-extra-semi](https://typescript-eslint.io/rules/no-extra-semi)
*/
'@typescript-eslint/no-extra-semi': NoExtraSemiRuleConfig;
}
/**
* Option.
*/
interface NoExtraneousClassOption {
/**
* Whether to allow extraneous classes that contain only a constructor.
*/
allowConstructorOnly?: boolean;
/**
* Whether to allow extraneous classes that have no body (i.e. are empty).
*/
allowEmpty?: boolean;
/**
* Whether to allow extraneous classes that only contain static members.
*/
allowStaticOnly?: boolean;
/**
* Whether to allow extraneous classes that include a decorator.
*/
allowWithDecorator?: boolean;
}
/**
* Options.
*/
type NoExtraneousClassOptions = [NoExtraneousClassOption?];
/**
* Disallow classes used as namespaces.
*
* @see [no-extraneous-class](https://typescript-eslint.io/rules/no-extraneous-class)
*/
type NoExtraneousClassRuleConfig = RuleConfig<NoExtraneousClassOptions>;
/**
* Disallow classes used as namespaces.
*
* @see [no-extraneous-class](https://typescript-eslint.io/rules/no-extraneous-class)
*/
interface NoExtraneousClassRule {
/**
* Disallow classes used as namespaces.
*
* @see [no-extraneous-class](https://typescript-eslint.io/rules/no-extraneous-class)
*/
'@typescript-eslint/no-extraneous-class': NoExtraneousClassRuleConfig;
}
/**
* Option.
*/
interface NoFloatingPromisesOption {
/**
* Whether to ignore `void` expressions.
*/
ignoreVoid?: boolean;
/**
* Whether to ignore async IIFEs (Immediately Invoked Function Expressions).
*/
ignoreIIFE?: boolean;
}
/**
* Options.
*/
type NoFloatingPromisesOptions = [NoFloatingPromisesOption?];
/**
* Require Promise-like statements to be handled appropriately.
*
* @see [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
*/
type NoFloatingPromisesRuleConfig =
RuleConfig<NoFloatingPromisesOptions>;
/**
* Require Promise-like statements to be handled appropriately.
*
* @see [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
*/
interface NoFloatingPromisesRule {
/**
* Require Promise-like statements to be handled appropriately.
*
* @see [no-floating-promises](https://typescript-eslint.io/rules/no-floating-promises)
*/
'@typescript-eslint/no-floating-promises': NoFloatingPromisesRuleConfig;
}
/**
* Disallow iterating over an array with a for-in loop.
*
* @see [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
*/
type NoForInArrayRuleConfig = RuleConfig<[]>;
/**
* Disallow iterating over an array with a for-in loop.
*
* @see [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
*/
interface NoForInArrayRule {
/**
* Disallow iterating over an array with a for-in loop.
*
* @see [no-for-in-array](https://typescript-eslint.io/rules/no-for-in-array)
*/
'@typescript-eslint/no-for-in-array': NoForInArrayRuleConfig;
}
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
*/
type NoImpliedEvalRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
*/
interface NoImpliedEvalRule {
/**
* Disallow the use of `eval()`-like methods.
*
* @see [no-implied-eval](https://typescript-eslint.io/rules/no-implied-eval)
*/
'@typescript-eslint/no-implied-eval': NoImpliedEvalRuleConfig;
}
/**
* Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
*
* @see [no-import-type-side-effects](https://typescript-eslint.io/rules/no-import-type-side-effects)
*/
type NoImportTypeSideEffectsRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
*
* @see [no-import-type-side-effects](https://typescript-eslint.io/rules/no-import-type-side-effects)
*/
interface NoImportTypeSideEffectsRule {
/**
* Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
*
* @see [no-import-type-side-effects](https://typescript-eslint.io/rules/no-import-type-side-effects)
*/
'@typescript-eslint/no-import-type-side-effects': NoImportTypeSideEffectsRuleConfig;
}
/**
* Option.
*/
interface NoInferrableTypesOption {
ignoreParameters?: boolean;
ignoreProperties?: boolean;
}
/**
* Options.
*/
type NoInferrableTypesOptions = [NoInferrableTypesOption?];
/**
* Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.
*
* @see [no-inferrable-types](https://typescript-eslint.io/rules/no-inferrable-types)
*/
type NoInferrableTypesRuleConfig = RuleConfig<NoInferrableTypesOptions>;
/**
* Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.
*
* @see [no-inferrable-types](https://typescript-eslint.io/rules/no-inferrable-types)
*/
interface NoInferrableTypesRule {
/**
* Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.
*
* @see [no-inferrable-types](https://typescript-eslint.io/rules/no-inferrable-types)
*/
'@typescript-eslint/no-inferrable-types': NoInferrableTypesRuleConfig;
}
/**
* Option.
*/
interface NoInvalidThisOption {
capIsConstructor?: boolean;
}
/**
* Options.
*/
type NoInvalidThisOptions = [NoInvalidThisOption?];
/**
* Disallow `this` keywords outside of classes or class-like objects.
*
* @see [no-invalid-this](https://typescript-eslint.io/rules/no-invalid-this)
*/
type NoInvalidThisRuleConfig = RuleConfig<NoInvalidThisOptions>;
/**
* Disallow `this` keywords outside of classes or class-like objects.
*
* @see [no-invalid-this](https://typescript-eslint.io/rules/no-invalid-this)
*/
interface NoInvalidThisRule {
/**
* Disallow `this` keywords outside of classes or class-like objects.
*
* @see [no-invalid-this](https://typescript-eslint.io/rules/no-invalid-this)
*/
'@typescript-eslint/no-invalid-this': NoInvalidThisRuleConfig;
}
/**
* Option.
*/
interface NoInvalidVoidTypeOption {
allowInGenericTypeArguments?: boolean | [string, ...string[]];
allowAsThisParameter?: boolean;
}
/**
* Options.
*/
type NoInvalidVoidTypeOptions = [NoInvalidVoidTypeOption?];
/**
* Disallow `void` type outside of generic or return types.
*
* @see [no-invalid-void-type](https://typescript-eslint.io/rules/no-invalid-void-type)
*/
type NoInvalidVoidTypeRuleConfig = RuleConfig<NoInvalidVoidTypeOptions>;
/**
* Disallow `void` type outside of generic or return types.
*
* @see [no-invalid-void-type](https://typescript-eslint.io/rules/no-invalid-void-type)
*/
interface NoInvalidVoidTypeRule {
/**
* Disallow `void` type outside of generic or return types.
*
* @see [no-invalid-void-type](https://typescript-eslint.io/rules/no-invalid-void-type)
*/
'@typescript-eslint/no-invalid-void-type': NoInvalidVoidTypeRuleConfig;
}
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://typescript-eslint.io/rules/no-loop-func)
*/
type NoLoopFuncRuleConfig = RuleConfig<[]>;
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://typescript-eslint.io/rules/no-loop-func)
*/
interface NoLoopFuncRule {
/**
* Disallow function declarations that contain unsafe references inside loop statements.
*
* @see [no-loop-func](https://typescript-eslint.io/rules/no-loop-func)
*/
'@typescript-eslint/no-loop-func': NoLoopFuncRuleConfig;
}
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://typescript-eslint.io/rules/no-loss-of-precision)
*/
type NoLossOfPrecisionRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://typescript-eslint.io/rules/no-loss-of-precision)
*/
interface NoLossOfPrecisionRule$1 {
/**
* Disallow literal numbers that lose precision.
*
* @see [no-loss-of-precision](https://typescript-eslint.io/rules/no-loss-of-precision)
*/
'@typescript-eslint/no-loss-of-precision': NoLossOfPrecisionRuleConfig$1;
}
/**
* Option.
*/
interface NoMagicNumbersOption {
detectObjects?: boolean;
enforceConst?: boolean;
ignore?: (number | string)[];
ignoreArrayIndexes?: boolean;
ignoreDefaultValues?: boolean;
ignoreClassFieldInitialValues?: boolean;
ignoreNumericLiteralTypes?: boolean;
ignoreEnums?: boolean;
ignoreReadonlyClassProperties?: boolean;
ignoreTypeIndexes?: boolean;
}
/**
* Options.
*/
type NoMagicNumbersOptions = [NoMagicNumbersOption?];
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://typescript-eslint.io/rules/no-magic-numbers)
*/
type NoMagicNumbersRuleConfig = RuleConfig<NoMagicNumbersOptions>;
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://typescript-eslint.io/rules/no-magic-numbers)
*/
interface NoMagicNumbersRule {
/**
* Disallow magic numbers.
*
* @see [no-magic-numbers](https://typescript-eslint.io/rules/no-magic-numbers)
*/
'@typescript-eslint/no-magic-numbers': NoMagicNumbersRuleConfig;
}
/**
* Option.
*/
interface NoMeaninglessVoidOperatorOption {
checkNever?: boolean;
}
/**
* Options.
*/
type NoMeaninglessVoidOperatorOptions = [
NoMeaninglessVoidOperatorOption?,
];
/**
* Disallow the `void` operator except when used to discard a value.
*
* @see [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
*/
type NoMeaninglessVoidOperatorRuleConfig =
RuleConfig<NoMeaninglessVoidOperatorOptions>;
/**
* Disallow the `void` operator except when used to discard a value.
*
* @see [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
*/
interface NoMeaninglessVoidOperatorRule {
/**
* Disallow the `void` operator except when used to discard a value.
*
* @see [no-meaningless-void-operator](https://typescript-eslint.io/rules/no-meaningless-void-operator)
*/
'@typescript-eslint/no-meaningless-void-operator': NoMeaninglessVoidOperatorRuleConfig;
}
/**
* Enforce valid definition of `new` and `constructor`.
*
* @see [no-misused-new](https://typescript-eslint.io/rules/no-misused-new)
*/
type NoMisusedNewRuleConfig = RuleConfig<[]>;
/**
* Enforce valid definition of `new` and `constructor`.
*
* @see [no-misused-new](https://typescript-eslint.io/rules/no-misused-new)
*/
interface NoMisusedNewRule {
/**
* Enforce valid definition of `new` and `constructor`.
*
* @see [no-misused-new](https://typescript-eslint.io/rules/no-misused-new)
*/
'@typescript-eslint/no-misused-new': NoMisusedNewRuleConfig;
}
/**
* Option.
*/
interface NoMisusedPromisesOption {
checksConditionals?: boolean;
checksVoidReturn?:
| boolean
| {
arguments?: boolean;
attributes?: boolean;
properties?: boolean;
returns?: boolean;
variables?: boolean;
};
checksSpreads?: boolean;
}
/**
* Options.
*/
type NoMisusedPromisesOptions = [NoMisusedPromisesOption?];
/**
* Disallow Promises in places not designed to handle them.
*
* @see [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
*/
type NoMisusedPromisesRuleConfig = RuleConfig<NoMisusedPromisesOptions>;
/**
* Disallow Promises in places not designed to handle them.
*
* @see [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
*/
interface NoMisusedPromisesRule {
/**
* Disallow Promises in places not designed to handle them.
*
* @see [no-misused-promises](https://typescript-eslint.io/rules/no-misused-promises)
*/
'@typescript-eslint/no-misused-promises': NoMisusedPromisesRuleConfig;
}
/**
* Disallow enums from having both number and string members.
*
* @see [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
*/
type NoMixedEnumsRuleConfig = RuleConfig<[]>;
/**
* Disallow enums from having both number and string members.
*
* @see [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
*/
interface NoMixedEnumsRule {
/**
* Disallow enums from having both number and string members.
*
* @see [no-mixed-enums](https://typescript-eslint.io/rules/no-mixed-enums)
*/
'@typescript-eslint/no-mixed-enums': NoMixedEnumsRuleConfig;
}
/**
* Option.
*/
interface NoNamespaceOption {
/**
* Whether to allow `declare` with custom TypeScript namespaces.
*/
allowDeclarations?: boolean;
/**
* Whether to allow `declare` with custom TypeScript namespaces inside definition files.
*/
allowDefinitionFiles?: boolean;
}
/**
* Options.
*/
type NoNamespaceOptions = [NoNamespaceOption?];
/**
* Disallow TypeScript namespaces.
*
* @see [no-namespace](https://typescript-eslint.io/rules/no-namespace)
*/
type NoNamespaceRuleConfig = RuleConfig<NoNamespaceOptions>;
/**
* Disallow TypeScript namespaces.
*
* @see [no-namespace](https://typescript-eslint.io/rules/no-namespace)
*/
interface NoNamespaceRule {
/**
* Disallow TypeScript namespaces.
*
* @see [no-namespace](https://typescript-eslint.io/rules/no-namespace)
*/
'@typescript-eslint/no-namespace': NoNamespaceRuleConfig;
}
/**
* Disallow non-null assertions in the left operand of a nullish coalescing operator.
*
* @see [no-non-null-asserted-nullish-coalescing](https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing)
*/
type NoNonNullAssertedNullishCoalescingRuleConfig = RuleConfig<[]>;
/**
* Disallow non-null assertions in the left operand of a nullish coalescing operator.
*
* @see [no-non-null-asserted-nullish-coalescing](https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing)
*/
interface NoNonNullAssertedNullishCoalescingRule {
/**
* Disallow non-null assertions in the left operand of a nullish coalescing operator.
*
* @see [no-non-null-asserted-nullish-coalescing](https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing)
*/
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': NoNonNullAssertedNullishCoalescingRuleConfig;
}
/**
* Disallow non-null assertions after an optional chain expression.
*
* @see [no-non-null-asserted-optional-chain](https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain)
*/
type NoNonNullAssertedOptionalChainRuleConfig = RuleConfig<[]>;
/**
* Disallow non-null assertions after an optional chain expression.
*
* @see [no-non-null-asserted-optional-chain](https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain)
*/
interface NoNonNullAssertedOptionalChainRule {
/**
* Disallow non-null assertions after an optional chain expression.
*
* @see [no-non-null-asserted-optional-chain](https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain)
*/
'@typescript-eslint/no-non-null-asserted-optional-chain': NoNonNullAssertedOptionalChainRuleConfig;
}
/**
* Disallow non-null assertions using the `!` postfix operator.
*
* @see [no-non-null-assertion](https://typescript-eslint.io/rules/no-non-null-assertion)
*/
type NoNonNullAssertionRuleConfig = RuleConfig<[]>;
/**
* Disallow non-null assertions using the `!` postfix operator.
*
* @see [no-non-null-assertion](https://typescript-eslint.io/rules/no-non-null-assertion)
*/
interface NoNonNullAssertionRule {
/**
* Disallow non-null assertions using the `!` postfix operator.
*
* @see [no-non-null-assertion](https://typescript-eslint.io/rules/no-non-null-assertion)
*/
'@typescript-eslint/no-non-null-assertion': NoNonNullAssertionRuleConfig;
}
/**
* Option.
*/
interface NoRedeclareOption {
builtinGlobals?: boolean;
ignoreDeclarationMerge?: boolean;
}
/**
* Options.
*/
type NoRedeclareOptions = [NoRedeclareOption?];
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://typescript-eslint.io/rules/no-redeclare)
*/
type NoRedeclareRuleConfig = RuleConfig<NoRedeclareOptions>;
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://typescript-eslint.io/rules/no-redeclare)
*/
interface NoRedeclareRule {
/**
* Disallow variable redeclaration.
*
* @see [no-redeclare](https://typescript-eslint.io/rules/no-redeclare)
*/
'@typescript-eslint/no-redeclare': NoRedeclareRuleConfig;
}
/**
* Disallow members of unions and intersections that do nothing or override type information.
*
* @see [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
*/
type NoRedundantTypeConstituentsRuleConfig = RuleConfig<[]>;
/**
* Disallow members of unions and intersections that do nothing or override type information.
*
* @see [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
*/
interface NoRedundantTypeConstituentsRule {
/**
* Disallow members of unions and intersections that do nothing or override type information.
*
* @see [no-redundant-type-constituents](https://typescript-eslint.io/rules/no-redundant-type-constituents)
*/
'@typescript-eslint/no-redundant-type-constituents': NoRedundantTypeConstituentsRuleConfig;
}
/**
* Disallow invocation of `require()`.
*
* @see [no-require-imports](https://typescript-eslint.io/rules/no-require-imports)
*/
type NoRequireImportsRuleConfig = RuleConfig<[]>;
/**
* Disallow invocation of `require()`.
*
* @see [no-require-imports](https://typescript-eslint.io/rules/no-require-imports)
*/
interface NoRequireImportsRule {
/**
* Disallow invocation of `require()`.
*
* @see [no-require-imports](https://typescript-eslint.io/rules/no-require-imports)
*/
'@typescript-eslint/no-require-imports': NoRequireImportsRuleConfig;
}
/**
* Option.
*/
type NoRestrictedImportsOption =
| (
| string
| {
name: string;
message?: string;
importNames?: string[];
/**
* Disallow value imports, but allow type-only imports.
*/
allowTypeImports?: boolean;
}
)[]
| []
| [
{
paths?: (
| string
| {
name: string;
message?: string;
importNames?: string[];
/**
* Disallow value imports, but allow type-only imports.
*/
allowTypeImports?: boolean;
}
)[];
patterns?:
| string[]
| {
/**
* @minItems 1
*/
importNames?: [string, ...string[]];
/**
* @minItems 1
*/
group: [string, ...string[]];
message?: string;
caseSensitive?: boolean;
/**
* Disallow value imports, but allow type-only imports.
*/
allowTypeImports?: boolean;
}[];
},
];
/**
* Options.
*/
type NoRestrictedImportsOptions = NoRestrictedImportsOption;
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://typescript-eslint.io/rules/no-restricted-imports)
*/
type NoRestrictedImportsRuleConfig =
RuleConfig<NoRestrictedImportsOptions>;
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://typescript-eslint.io/rules/no-restricted-imports)
*/
interface NoRestrictedImportsRule {
/**
* Disallow specified modules when loaded by `import`.
*
* @see [no-restricted-imports](https://typescript-eslint.io/rules/no-restricted-imports)
*/
'@typescript-eslint/no-restricted-imports': NoRestrictedImportsRuleConfig;
}
/**
* Option.
*/
interface NoShadowOption {
builtinGlobals?: boolean;
hoist?: 'all' | 'functions' | 'never';
allow?: string[];
ignoreOnInitialization?: boolean;
ignoreTypeValueShadow?: boolean;
ignoreFunctionTypeParameterNameValueShadow?: boolean;
}
/**
* Options.
*/
type NoShadowOptions = [NoShadowOption?];
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://typescript-eslint.io/rules/no-shadow)
*/
type NoShadowRuleConfig = RuleConfig<NoShadowOptions>;
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://typescript-eslint.io/rules/no-shadow)
*/
interface NoShadowRule {
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-shadow](https://typescript-eslint.io/rules/no-shadow)
*/
'@typescript-eslint/no-shadow': NoShadowRuleConfig;
}
/**
* Option.
*/
interface NoThisAliasOption {
/**
* Whether to ignore destructurings, such as `const { props, state } = this`.
*/
allowDestructuring?: boolean;
/**
* Names to ignore, such as ["self"] for `const self = this;`.
*/
allowedNames?: string[];
}
/**
* Options.
*/
type NoThisAliasOptions = [NoThisAliasOption?];
/**
* Disallow aliasing `this`.
*
* @see [no-this-alias](https://typescript-eslint.io/rules/no-this-alias)
*/
type NoThisAliasRuleConfig = RuleConfig<NoThisAliasOptions>;
/**
* Disallow aliasing `this`.
*
* @see [no-this-alias](https://typescript-eslint.io/rules/no-this-alias)
*/
interface NoThisAliasRule {
/**
* Disallow aliasing `this`.
*
* @see [no-this-alias](https://typescript-eslint.io/rules/no-this-alias)
*/
'@typescript-eslint/no-this-alias': NoThisAliasRuleConfig;
}
/**
* Option.
*/
interface NoThrowLiteralOption {
allowThrowingAny?: boolean;
allowThrowingUnknown?: boolean;
}
/**
* Options.
*/
type NoThrowLiteralOptions = [NoThrowLiteralOption?];
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://typescript-eslint.io/rules/no-throw-literal)
*/
type NoThrowLiteralRuleConfig = RuleConfig<NoThrowLiteralOptions>;
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://typescript-eslint.io/rules/no-throw-literal)
*/
interface NoThrowLiteralRule {
/**
* Disallow throwing literals as exceptions.
*
* @see [no-throw-literal](https://typescript-eslint.io/rules/no-throw-literal)
*/
'@typescript-eslint/no-throw-literal': NoThrowLiteralRuleConfig;
}
/**
* Option.
*/
interface NoTypeAliasOption {
/**
* Whether to allow direct one-to-one type aliases.
*/
allowAliases?:
| 'always'
| 'never'
| 'in-unions'
| 'in-intersections'
| 'in-unions-and-intersections';
/**
* Whether to allow type aliases for callbacks.
*/
allowCallbacks?: 'always' | 'never';
/**
* Whether to allow type aliases for conditional types.
*/
allowConditionalTypes?: 'always' | 'never';
/**
* Whether to allow type aliases with constructors.
*/
allowConstructors?: 'always' | 'never';
/**
* Whether to allow type aliases with object literal types.
*/
allowLiterals?:
| 'always'
| 'never'
| 'in-unions'
| 'in-intersections'
| 'in-unions-and-intersections';
/**
* Whether to allow type aliases with mapped types.
*/
allowMappedTypes?:
| 'always'
| 'never'
| 'in-unions'
| 'in-intersections'
| 'in-unions-and-intersections';
/**
* Whether to allow type aliases with tuple types.
*/
allowTupleTypes?:
| 'always'
| 'never'
| 'in-unions'
| 'in-intersections'
| 'in-unions-and-intersections';
/**
* Whether to allow type aliases with generic types.
*/
allowGenerics?: 'always' | 'never';
}
/**
* Options.
*/
type NoTypeAliasOptions = [NoTypeAliasOption?];
/**
* Disallow type aliases.
*
* @deprecated
*
* @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias)
*/
type NoTypeAliasRuleConfig = RuleConfig<NoTypeAliasOptions>;
/**
* Disallow type aliases.
*
* @deprecated
*
* @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias)
*/
interface NoTypeAliasRule {
/**
* Disallow type aliases.
*
* @deprecated
*
* @see [no-type-alias](https://typescript-eslint.io/rules/no-type-alias)
*/
'@typescript-eslint/no-type-alias': NoTypeAliasRuleConfig;
}
/**
* Option.
*/
interface NoUnnecessaryBooleanLiteralCompareOption {
/**
* Whether to allow comparisons between nullable boolean variables and `true`.
*/
allowComparingNullableBooleansToTrue?: boolean;
/**
* Whether to allow comparisons between nullable boolean variables and `false`.
*/
allowComparingNullableBooleansToFalse?: boolean;
}
/**
* Options.
*/
type NoUnnecessaryBooleanLiteralCompareOptions = [
NoUnnecessaryBooleanLiteralCompareOption?,
];
/**
* Disallow unnecessary equality comparisons against boolean literals.
*
* @see [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
*/
type NoUnnecessaryBooleanLiteralCompareRuleConfig =
RuleConfig<NoUnnecessaryBooleanLiteralCompareOptions>;
/**
* Disallow unnecessary equality comparisons against boolean literals.
*
* @see [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
*/
interface NoUnnecessaryBooleanLiteralCompareRule {
/**
* Disallow unnecessary equality comparisons against boolean literals.
*
* @see [no-unnecessary-boolean-literal-compare](https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare)
*/
'@typescript-eslint/no-unnecessary-boolean-literal-compare': NoUnnecessaryBooleanLiteralCompareRuleConfig;
}
/**
* Option.
*/
interface NoUnnecessaryConditionOption {
/**
* Whether to ignore constant loop conditions, such as `while (true)`.
*/
allowConstantLoopConditions?: boolean;
/**
* Whether to not error when running with a tsconfig that has strictNullChecks turned.
*/
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
}
/**
* Options.
*/
type NoUnnecessaryConditionOptions = [NoUnnecessaryConditionOption?];
/**
* Disallow conditionals where the type is always truthy or always falsy.
*
* @see [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
*/
type NoUnnecessaryConditionRuleConfig =
RuleConfig<NoUnnecessaryConditionOptions>;
/**
* Disallow conditionals where the type is always truthy or always falsy.
*
* @see [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
*/
interface NoUnnecessaryConditionRule {
/**
* Disallow conditionals where the type is always truthy or always falsy.
*
* @see [no-unnecessary-condition](https://typescript-eslint.io/rules/no-unnecessary-condition)
*/
'@typescript-eslint/no-unnecessary-condition': NoUnnecessaryConditionRuleConfig;
}
/**
* Disallow unnecessary namespace qualifiers.
*
* @see [no-unnecessary-qualifier](https://typescript-eslint.io/rules/no-unnecessary-qualifier)
*/
type NoUnnecessaryQualifierRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary namespace qualifiers.
*
* @see [no-unnecessary-qualifier](https://typescript-eslint.io/rules/no-unnecessary-qualifier)
*/
interface NoUnnecessaryQualifierRule {
/**
* Disallow unnecessary namespace qualifiers.
*
* @see [no-unnecessary-qualifier](https://typescript-eslint.io/rules/no-unnecessary-qualifier)
*/
'@typescript-eslint/no-unnecessary-qualifier': NoUnnecessaryQualifierRuleConfig;
}
/**
* Disallow type arguments that are equal to the default.
*
* @see [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
*/
type NoUnnecessaryTypeArgumentsRuleConfig = RuleConfig<[]>;
/**
* Disallow type arguments that are equal to the default.
*
* @see [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
*/
interface NoUnnecessaryTypeArgumentsRule {
/**
* Disallow type arguments that are equal to the default.
*
* @see [no-unnecessary-type-arguments](https://typescript-eslint.io/rules/no-unnecessary-type-arguments)
*/
'@typescript-eslint/no-unnecessary-type-arguments': NoUnnecessaryTypeArgumentsRuleConfig;
}
/**
* Option.
*/
interface NoUnnecessaryTypeAssertionOption {
/**
* A list of type names to ignore.
*/
typesToIgnore?: string[];
}
/**
* Options.
*/
type NoUnnecessaryTypeAssertionOptions = [
NoUnnecessaryTypeAssertionOption?,
];
/**
* Disallow type assertions that do not change the type of an expression.
*
* @see [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
*/
type NoUnnecessaryTypeAssertionRuleConfig =
RuleConfig<NoUnnecessaryTypeAssertionOptions>;
/**
* Disallow type assertions that do not change the type of an expression.
*
* @see [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
*/
interface NoUnnecessaryTypeAssertionRule {
/**
* Disallow type assertions that do not change the type of an expression.
*
* @see [no-unnecessary-type-assertion](https://typescript-eslint.io/rules/no-unnecessary-type-assertion)
*/
'@typescript-eslint/no-unnecessary-type-assertion': NoUnnecessaryTypeAssertionRuleConfig;
}
/**
* Disallow unnecessary constraints on generic types.
*
* @see [no-unnecessary-type-constraint](https://typescript-eslint.io/rules/no-unnecessary-type-constraint)
*/
type NoUnnecessaryTypeConstraintRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary constraints on generic types.
*
* @see [no-unnecessary-type-constraint](https://typescript-eslint.io/rules/no-unnecessary-type-constraint)
*/
interface NoUnnecessaryTypeConstraintRule {
/**
* Disallow unnecessary constraints on generic types.
*
* @see [no-unnecessary-type-constraint](https://typescript-eslint.io/rules/no-unnecessary-type-constraint)
*/
'@typescript-eslint/no-unnecessary-type-constraint': NoUnnecessaryTypeConstraintRuleConfig;
}
/**
* Disallow calling a function with a value with type `any`.
*
* @see [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
*/
type NoUnsafeArgumentRuleConfig = RuleConfig<[]>;
/**
* Disallow calling a function with a value with type `any`.
*
* @see [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
*/
interface NoUnsafeArgumentRule {
/**
* Disallow calling a function with a value with type `any`.
*
* @see [no-unsafe-argument](https://typescript-eslint.io/rules/no-unsafe-argument)
*/
'@typescript-eslint/no-unsafe-argument': NoUnsafeArgumentRuleConfig;
}
/**
* Disallow assigning a value with type `any` to variables and properties.
*
* @see [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
*/
type NoUnsafeAssignmentRuleConfig = RuleConfig<[]>;
/**
* Disallow assigning a value with type `any` to variables and properties.
*
* @see [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
*/
interface NoUnsafeAssignmentRule {
/**
* Disallow assigning a value with type `any` to variables and properties.
*
* @see [no-unsafe-assignment](https://typescript-eslint.io/rules/no-unsafe-assignment)
*/
'@typescript-eslint/no-unsafe-assignment': NoUnsafeAssignmentRuleConfig;
}
/**
* Disallow calling a value with type `any`.
*
* @see [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
*/
type NoUnsafeCallRuleConfig = RuleConfig<[]>;
/**
* Disallow calling a value with type `any`.
*
* @see [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
*/
interface NoUnsafeCallRule {
/**
* Disallow calling a value with type `any`.
*
* @see [no-unsafe-call](https://typescript-eslint.io/rules/no-unsafe-call)
*/
'@typescript-eslint/no-unsafe-call': NoUnsafeCallRuleConfig;
}
/**
* Disallow unsafe declaration merging.
*
* @see [no-unsafe-declaration-merging](https://typescript-eslint.io/rules/no-unsafe-declaration-merging)
*/
type NoUnsafeDeclarationMergingRuleConfig = RuleConfig<[]>;
/**
* Disallow unsafe declaration merging.
*
* @see [no-unsafe-declaration-merging](https://typescript-eslint.io/rules/no-unsafe-declaration-merging)
*/
interface NoUnsafeDeclarationMergingRule {
/**
* Disallow unsafe declaration merging.
*
* @see [no-unsafe-declaration-merging](https://typescript-eslint.io/rules/no-unsafe-declaration-merging)
*/
'@typescript-eslint/no-unsafe-declaration-merging': NoUnsafeDeclarationMergingRuleConfig;
}
/**
* Disallow comparing an enum value with a non-enum value.
*
* @see [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
*/
type NoUnsafeEnumComparisonRuleConfig = RuleConfig<[]>;
/**
* Disallow comparing an enum value with a non-enum value.
*
* @see [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
*/
interface NoUnsafeEnumComparisonRule {
/**
* Disallow comparing an enum value with a non-enum value.
*
* @see [no-unsafe-enum-comparison](https://typescript-eslint.io/rules/no-unsafe-enum-comparison)
*/
'@typescript-eslint/no-unsafe-enum-comparison': NoUnsafeEnumComparisonRuleConfig;
}
/**
* Disallow member access on a value with type `any`.
*
* @see [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
*/
type NoUnsafeMemberAccessRuleConfig = RuleConfig<[]>;
/**
* Disallow member access on a value with type `any`.
*
* @see [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
*/
interface NoUnsafeMemberAccessRule {
/**
* Disallow member access on a value with type `any`.
*
* @see [no-unsafe-member-access](https://typescript-eslint.io/rules/no-unsafe-member-access)
*/
'@typescript-eslint/no-unsafe-member-access': NoUnsafeMemberAccessRuleConfig;
}
/**
* Disallow returning a value with type `any` from a function.
*
* @see [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
*/
type NoUnsafeReturnRuleConfig = RuleConfig<[]>;
/**
* Disallow returning a value with type `any` from a function.
*
* @see [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
*/
interface NoUnsafeReturnRule {
/**
* Disallow returning a value with type `any` from a function.
*
* @see [no-unsafe-return](https://typescript-eslint.io/rules/no-unsafe-return)
*/
'@typescript-eslint/no-unsafe-return': NoUnsafeReturnRuleConfig;
}
/**
* Option.
*/
interface NoUnusedExpressionsOption {
allowShortCircuit?: boolean;
allowTernary?: boolean;
allowTaggedTemplates?: boolean;
enforceForJSX?: boolean;
}
/**
* Options.
*/
type NoUnusedExpressionsOptions = [NoUnusedExpressionsOption?];
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)
*/
type NoUnusedExpressionsRuleConfig =
RuleConfig<NoUnusedExpressionsOptions>;
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)
*/
interface NoUnusedExpressionsRule {
/**
* Disallow unused expressions.
*
* @see [no-unused-expressions](https://typescript-eslint.io/rules/no-unused-expressions)
*/
'@typescript-eslint/no-unused-expressions': NoUnusedExpressionsRuleConfig;
}
/**
* Option.
*/
type NoUnusedVarsOption$1 =
| ('all' | 'local')
| {
vars?: 'all' | 'local';
varsIgnorePattern?: string;
args?: 'all' | 'after-used' | 'none';
ignoreRestSiblings?: boolean;
argsIgnorePattern?: string;
caughtErrors?: 'all' | 'none';
caughtErrorsIgnorePattern?: string;
destructuredArrayIgnorePattern?: string;
};
/**
* Options.
*/
type NoUnusedVarsOptions$1 = [NoUnusedVarsOption$1?];
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
*/
type NoUnusedVarsRuleConfig$1 = RuleConfig<NoUnusedVarsOptions$1>;
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
*/
interface NoUnusedVarsRule$1 {
/**
* Disallow unused variables.
*
* @see [no-unused-vars](https://typescript-eslint.io/rules/no-unused-vars)
*/
'@typescript-eslint/no-unused-vars': NoUnusedVarsRuleConfig$1;
}
/**
* Option.
*/
type NoUseBeforeDefineOption =
| 'nofunc'
| {
functions?: boolean;
classes?: boolean;
enums?: boolean;
variables?: boolean;
typedefs?: boolean;
ignoreTypeReferences?: boolean;
allowNamedExports?: boolean;
};
/**
* Options.
*/
type NoUseBeforeDefineOptions = [NoUseBeforeDefineOption?];
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://typescript-eslint.io/rules/no-use-before-define)
*/
type NoUseBeforeDefineRuleConfig = RuleConfig<NoUseBeforeDefineOptions>;
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://typescript-eslint.io/rules/no-use-before-define)
*/
interface NoUseBeforeDefineRule {
/**
* Disallow the use of variables before they are defined.
*
* @see [no-use-before-define](https://typescript-eslint.io/rules/no-use-before-define)
*/
'@typescript-eslint/no-use-before-define': NoUseBeforeDefineRuleConfig;
}
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://typescript-eslint.io/rules/no-useless-constructor)
*/
type NoUselessConstructorRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://typescript-eslint.io/rules/no-useless-constructor)
*/
interface NoUselessConstructorRule {
/**
* Disallow unnecessary constructors.
*
* @see [no-useless-constructor](https://typescript-eslint.io/rules/no-useless-constructor)
*/
'@typescript-eslint/no-useless-constructor': NoUselessConstructorRuleConfig;
}
/**
* Disallow empty exports that don't change anything in a module file.
*
* @see [no-useless-empty-export](https://typescript-eslint.io/rules/no-useless-empty-export)
*/
type NoUselessEmptyExportRuleConfig = RuleConfig<[]>;
/**
* Disallow empty exports that don't change anything in a module file.
*
* @see [no-useless-empty-export](https://typescript-eslint.io/rules/no-useless-empty-export)
*/
interface NoUselessEmptyExportRule {
/**
* Disallow empty exports that don't change anything in a module file.
*
* @see [no-useless-empty-export](https://typescript-eslint.io/rules/no-useless-empty-export)
*/
'@typescript-eslint/no-useless-empty-export': NoUselessEmptyExportRuleConfig;
}
/**
* Disallow `require` statements except in import statements.
*
* @see [no-var-requires](https://typescript-eslint.io/rules/no-var-requires)
*/
type NoVarRequiresRuleConfig = RuleConfig<[]>;
/**
* Disallow `require` statements except in import statements.
*
* @see [no-var-requires](https://typescript-eslint.io/rules/no-var-requires)
*/
interface NoVarRequiresRule {
/**
* Disallow `require` statements except in import statements.
*
* @see [no-var-requires](https://typescript-eslint.io/rules/no-var-requires)
*/
'@typescript-eslint/no-var-requires': NoVarRequiresRuleConfig;
}
/**
* Enforce non-null assertions over explicit type casts.
*
* @see [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
*/
type NonNullableTypeAssertionStyleRuleConfig = RuleConfig<[]>;
/**
* Enforce non-null assertions over explicit type casts.
*
* @see [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
*/
interface NonNullableTypeAssertionStyleRule {
/**
* Enforce non-null assertions over explicit type casts.
*
* @see [non-nullable-type-assertion-style](https://typescript-eslint.io/rules/non-nullable-type-assertion-style)
*/
'@typescript-eslint/non-nullable-type-assertion-style': NonNullableTypeAssertionStyleRuleConfig;
}
/**
* Config.
*/
interface ObjectCurlySpacingConfig$1 {
arraysInObjects?: boolean;
objectsInObjects?: boolean;
}
/**
* Option.
*/
type ObjectCurlySpacingOption$1 = 'always' | 'never';
/**
* Options.
*/
type ObjectCurlySpacingOptions$1 = [
ObjectCurlySpacingOption$1?,
ObjectCurlySpacingConfig$1?,
];
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://typescript-eslint.io/rules/object-curly-spacing)
*/
type ObjectCurlySpacingRuleConfig$1 =
RuleConfig<ObjectCurlySpacingOptions$1>;
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://typescript-eslint.io/rules/object-curly-spacing)
*/
interface ObjectCurlySpacingRule$1 {
/**
* Enforce consistent spacing inside braces.
*
* @see [object-curly-spacing](https://typescript-eslint.io/rules/object-curly-spacing)
*/
'@typescript-eslint/object-curly-spacing': ObjectCurlySpacingRuleConfig$1;
}
/**
* Option.
*/
type PaddingType = 'any' | 'never' | 'always';
type StatementType =
| (
| '*'
| 'block-like'
| 'exports'
| 'require'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
| 'interface'
| 'type'
)
| [
(
| '*'
| 'block-like'
| 'exports'
| 'require'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
| 'interface'
| 'type'
),
...(
| '*'
| 'block-like'
| 'exports'
| 'require'
| 'directive'
| 'expression'
| 'iife'
| 'multiline-block-like'
| 'multiline-expression'
| 'multiline-const'
| 'multiline-let'
| 'multiline-var'
| 'singleline-const'
| 'singleline-let'
| 'singleline-var'
| 'block'
| 'empty'
| 'function'
| 'break'
| 'case'
| 'class'
| 'const'
| 'continue'
| 'debugger'
| 'default'
| 'do'
| 'export'
| 'for'
| 'if'
| 'import'
| 'let'
| 'return'
| 'switch'
| 'throw'
| 'try'
| 'var'
| 'while'
| 'with'
| 'interface'
| 'type'
)[],
];
type PaddingLineBetweenStatementsOption = {
blankLine: PaddingType;
prev: StatementType;
next: StatementType;
}[];
/**
* Options.
*/
type PaddingLineBetweenStatementsOptions =
PaddingLineBetweenStatementsOption;
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://typescript-eslint.io/rules/padding-line-between-statements)
*/
type PaddingLineBetweenStatementsRuleConfig =
RuleConfig<PaddingLineBetweenStatementsOptions>;
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://typescript-eslint.io/rules/padding-line-between-statements)
*/
interface PaddingLineBetweenStatementsRule {
/**
* Require or disallow padding lines between statements.
*
* @see [padding-line-between-statements](https://typescript-eslint.io/rules/padding-line-between-statements)
*/
'@typescript-eslint/padding-line-between-statements': PaddingLineBetweenStatementsRuleConfig;
}
/**
* Option.
*/
type Modifier =
| 'readonly'
| 'private'
| 'protected'
| 'public'
| 'private readonly'
| 'protected readonly'
| 'public readonly';
interface ParameterPropertiesOption {
allow?: Modifier[];
prefer?: 'class-property' | 'parameter-property';
}
/**
* Options.
*/
type ParameterPropertiesOptions = [ParameterPropertiesOption?];
/**
* Require or disallow parameter properties in class constructors.
*
* @see [parameter-properties](https://typescript-eslint.io/rules/parameter-properties)
*/
type ParameterPropertiesRuleConfig =
RuleConfig<ParameterPropertiesOptions>;
/**
* Require or disallow parameter properties in class constructors.
*
* @see [parameter-properties](https://typescript-eslint.io/rules/parameter-properties)
*/
interface ParameterPropertiesRule {
/**
* Require or disallow parameter properties in class constructors.
*
* @see [parameter-properties](https://typescript-eslint.io/rules/parameter-properties)
*/
'@typescript-eslint/parameter-properties': ParameterPropertiesRuleConfig;
}
/**
* Enforce the use of `as const` over literal type.
*
* @see [prefer-as-const](https://typescript-eslint.io/rules/prefer-as-const)
*/
type PreferAsConstRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `as const` over literal type.
*
* @see [prefer-as-const](https://typescript-eslint.io/rules/prefer-as-const)
*/
interface PreferAsConstRule {
/**
* Enforce the use of `as const` over literal type.
*
* @see [prefer-as-const](https://typescript-eslint.io/rules/prefer-as-const)
*/
'@typescript-eslint/prefer-as-const': PreferAsConstRuleConfig;
}
/**
* Require each enum member value to be explicitly initialized.
*
* @see [prefer-enum-initializers](https://typescript-eslint.io/rules/prefer-enum-initializers)
*/
type PreferEnumInitializersRuleConfig = RuleConfig<[]>;
/**
* Require each enum member value to be explicitly initialized.
*
* @see [prefer-enum-initializers](https://typescript-eslint.io/rules/prefer-enum-initializers)
*/
interface PreferEnumInitializersRule {
/**
* Require each enum member value to be explicitly initialized.
*
* @see [prefer-enum-initializers](https://typescript-eslint.io/rules/prefer-enum-initializers)
*/
'@typescript-eslint/prefer-enum-initializers': PreferEnumInitializersRuleConfig;
}
/**
* Enforce the use of `for-of` loop over the standard `for` loop where possible.
*
* @see [prefer-for-of](https://typescript-eslint.io/rules/prefer-for-of)
*/
type PreferForOfRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `for-of` loop over the standard `for` loop where possible.
*
* @see [prefer-for-of](https://typescript-eslint.io/rules/prefer-for-of)
*/
interface PreferForOfRule {
/**
* Enforce the use of `for-of` loop over the standard `for` loop where possible.
*
* @see [prefer-for-of](https://typescript-eslint.io/rules/prefer-for-of)
*/
'@typescript-eslint/prefer-for-of': PreferForOfRuleConfig;
}
/**
* Enforce using function types instead of interfaces with call signatures.
*
* @see [prefer-function-type](https://typescript-eslint.io/rules/prefer-function-type)
*/
type PreferFunctionTypeRuleConfig = RuleConfig<[]>;
/**
* Enforce using function types instead of interfaces with call signatures.
*
* @see [prefer-function-type](https://typescript-eslint.io/rules/prefer-function-type)
*/
interface PreferFunctionTypeRule {
/**
* Enforce using function types instead of interfaces with call signatures.
*
* @see [prefer-function-type](https://typescript-eslint.io/rules/prefer-function-type)
*/
'@typescript-eslint/prefer-function-type': PreferFunctionTypeRuleConfig;
}
/**
* Enforce `includes` method over `indexOf` method.
*
* @see [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
*/
type PreferIncludesRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce `includes` method over `indexOf` method.
*
* @see [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
*/
interface PreferIncludesRule$1 {
/**
* Enforce `includes` method over `indexOf` method.
*
* @see [prefer-includes](https://typescript-eslint.io/rules/prefer-includes)
*/
'@typescript-eslint/prefer-includes': PreferIncludesRuleConfig$1;
}
/**
* Option.
*/
interface PreferLiteralEnumMemberOption {
allowBitwiseExpressions?: boolean;
}
/**
* Options.
*/
type PreferLiteralEnumMemberOptions = [PreferLiteralEnumMemberOption?];
/**
* Require all enum members to be literal values.
*
* @see [prefer-literal-enum-member](https://typescript-eslint.io/rules/prefer-literal-enum-member)
*/
type PreferLiteralEnumMemberRuleConfig =
RuleConfig<PreferLiteralEnumMemberOptions>;
/**
* Require all enum members to be literal values.
*
* @see [prefer-literal-enum-member](https://typescript-eslint.io/rules/prefer-literal-enum-member)
*/
interface PreferLiteralEnumMemberRule {
/**
* Require all enum members to be literal values.
*
* @see [prefer-literal-enum-member](https://typescript-eslint.io/rules/prefer-literal-enum-member)
*/
'@typescript-eslint/prefer-literal-enum-member': PreferLiteralEnumMemberRuleConfig;
}
/**
* Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.
*
* @see [prefer-namespace-keyword](https://typescript-eslint.io/rules/prefer-namespace-keyword)
*/
type PreferNamespaceKeywordRuleConfig = RuleConfig<[]>;
/**
* Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.
*
* @see [prefer-namespace-keyword](https://typescript-eslint.io/rules/prefer-namespace-keyword)
*/
interface PreferNamespaceKeywordRule {
/**
* Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.
*
* @see [prefer-namespace-keyword](https://typescript-eslint.io/rules/prefer-namespace-keyword)
*/
'@typescript-eslint/prefer-namespace-keyword': PreferNamespaceKeywordRuleConfig;
}
/**
* Option.
*/
interface PreferNullishCoalescingOption {
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
ignoreConditionalTests?: boolean;
ignoreMixedLogicalExpressions?: boolean;
ignorePrimitives?:
| {
bigint?: boolean;
boolean?: boolean;
number?: boolean;
string?: boolean;
[k: string]: any;
}
| true;
ignoreTernaryTests?: boolean;
}
/**
* Options.
*/
type PreferNullishCoalescingOptions = [PreferNullishCoalescingOption?];
/**
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
*
* @see [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
*/
type PreferNullishCoalescingRuleConfig =
RuleConfig<PreferNullishCoalescingOptions>;
/**
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
*
* @see [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
*/
interface PreferNullishCoalescingRule {
/**
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
*
* @see [prefer-nullish-coalescing](https://typescript-eslint.io/rules/prefer-nullish-coalescing)
*/
'@typescript-eslint/prefer-nullish-coalescing': PreferNullishCoalescingRuleConfig;
}
/**
* Option.
*/
interface PreferOptionalChainOption {
/**
* Check operands that are typed as `any` when inspecting "loose boolean" operands.
*/
checkAny?: boolean;
/**
* Check operands that are typed as `unknown` when inspecting "loose boolean" operands.
*/
checkUnknown?: boolean;
/**
* Check operands that are typed as `string` when inspecting "loose boolean" operands.
*/
checkString?: boolean;
/**
* Check operands that are typed as `number` when inspecting "loose boolean" operands.
*/
checkNumber?: boolean;
/**
* Check operands that are typed as `boolean` when inspecting "loose boolean" operands.
*/
checkBoolean?: boolean;
/**
* Check operands that are typed as `bigint` when inspecting "loose boolean" operands.
*/
checkBigInt?: boolean;
/**
* Skip operands that are not typed with `null` and/or `undefined` when inspecting "loose boolean" operands.
*/
requireNullish?: boolean;
/**
* Allow autofixers that will change the return type of the expression. This option is considered unsafe as it may break the build.
*/
allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing?: boolean;
}
/**
* Options.
*/
type PreferOptionalChainOptions = [PreferOptionalChainOption?];
/**
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
*
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
*/
type PreferOptionalChainRuleConfig =
RuleConfig<PreferOptionalChainOptions>;
/**
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
*
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
*/
interface PreferOptionalChainRule {
/**
* Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.
*
* @see [prefer-optional-chain](https://typescript-eslint.io/rules/prefer-optional-chain)
*/
'@typescript-eslint/prefer-optional-chain': PreferOptionalChainRuleConfig;
}
/**
* Option.
*/
interface PreferReadonlyOption {
onlyInlineLambdas?: boolean;
}
/**
* Options.
*/
type PreferReadonlyOptions = [PreferReadonlyOption?];
/**
* Require private members to be marked as `readonly` if they're never modified outside of the constructor.
*
* @see [prefer-readonly](https://typescript-eslint.io/rules/prefer-readonly)
*/
type PreferReadonlyRuleConfig = RuleConfig<PreferReadonlyOptions>;
/**
* Require private members to be marked as `readonly` if they're never modified outside of the constructor.
*
* @see [prefer-readonly](https://typescript-eslint.io/rules/prefer-readonly)
*/
interface PreferReadonlyRule {
/**
* Require private members to be marked as `readonly` if they're never modified outside of the constructor.
*
* @see [prefer-readonly](https://typescript-eslint.io/rules/prefer-readonly)
*/
'@typescript-eslint/prefer-readonly': PreferReadonlyRuleConfig;
}
/**
* Option.
*/
interface PreferReadonlyParameterTypesOption {
allow?: (
| string
| {
from: 'file';
name: string | [string, ...string[]];
path?: string;
}
| {
from: 'lib';
name: string | [string, ...string[]];
}
| {
from: 'package';
name: string | [string, ...string[]];
package: string;
}
)[];
checkParameterProperties?: boolean;
ignoreInferredTypes?: boolean;
treatMethodsAsReadonly?: boolean;
}
/**
* Options.
*/
type PreferReadonlyParameterTypesOptions = [
PreferReadonlyParameterTypesOption?,
];
/**
* Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.
*
* @see [prefer-readonly-parameter-types](https://typescript-eslint.io/rules/prefer-readonly-parameter-types)
*/
type PreferReadonlyParameterTypesRuleConfig =
RuleConfig<PreferReadonlyParameterTypesOptions>;
/**
* Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.
*
* @see [prefer-readonly-parameter-types](https://typescript-eslint.io/rules/prefer-readonly-parameter-types)
*/
interface PreferReadonlyParameterTypesRule {
/**
* Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.
*
* @see [prefer-readonly-parameter-types](https://typescript-eslint.io/rules/prefer-readonly-parameter-types)
*/
'@typescript-eslint/prefer-readonly-parameter-types': PreferReadonlyParameterTypesRuleConfig;
}
/**
* Enforce using type parameter when calling `Array#reduce` instead of casting.
*
* @see [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
*/
type PreferReduceTypeParameterRuleConfig = RuleConfig<[]>;
/**
* Enforce using type parameter when calling `Array#reduce` instead of casting.
*
* @see [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
*/
interface PreferReduceTypeParameterRule {
/**
* Enforce using type parameter when calling `Array#reduce` instead of casting.
*
* @see [prefer-reduce-type-parameter](https://typescript-eslint.io/rules/prefer-reduce-type-parameter)
*/
'@typescript-eslint/prefer-reduce-type-parameter': PreferReduceTypeParameterRuleConfig;
}
/**
* Enforce `RegExp#exec` over `String#match` if no global flag is provided.
*
* @see [prefer-regexp-exec](https://typescript-eslint.io/rules/prefer-regexp-exec)
*/
type PreferRegexpExecRuleConfig = RuleConfig<[]>;
/**
* Enforce `RegExp#exec` over `String#match` if no global flag is provided.
*
* @see [prefer-regexp-exec](https://typescript-eslint.io/rules/prefer-regexp-exec)
*/
interface PreferRegexpExecRule {
/**
* Enforce `RegExp#exec` over `String#match` if no global flag is provided.
*
* @see [prefer-regexp-exec](https://typescript-eslint.io/rules/prefer-regexp-exec)
*/
'@typescript-eslint/prefer-regexp-exec': PreferRegexpExecRuleConfig;
}
/**
* Enforce that `this` is used when only `this` type is returned.
*
* @see [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
*/
type PreferReturnThisTypeRuleConfig = RuleConfig<[]>;
/**
* Enforce that `this` is used when only `this` type is returned.
*
* @see [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
*/
interface PreferReturnThisTypeRule {
/**
* Enforce that `this` is used when only `this` type is returned.
*
* @see [prefer-return-this-type](https://typescript-eslint.io/rules/prefer-return-this-type)
*/
'@typescript-eslint/prefer-return-this-type': PreferReturnThisTypeRuleConfig;
}
/**
* Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.
*
* @see [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
*/
type PreferStringStartsEndsWithRuleConfig$1 = RuleConfig<[]>;
/**
* Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.
*
* @see [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
*/
interface PreferStringStartsEndsWithRule$1 {
/**
* Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.
*
* @see [prefer-string-starts-ends-with](https://typescript-eslint.io/rules/prefer-string-starts-ends-with)
*/
'@typescript-eslint/prefer-string-starts-ends-with': PreferStringStartsEndsWithRuleConfig$1;
}
/**
* Enforce using `@ts-expect-error` over `@ts-ignore`.
*
* @see [prefer-ts-expect-error](https://typescript-eslint.io/rules/prefer-ts-expect-error)
*/
type PreferTsExpectErrorRuleConfig = RuleConfig<[]>;
/**
* Enforce using `@ts-expect-error` over `@ts-ignore`.
*
* @see [prefer-ts-expect-error](https://typescript-eslint.io/rules/prefer-ts-expect-error)
*/
interface PreferTsExpectErrorRule {
/**
* Enforce using `@ts-expect-error` over `@ts-ignore`.
*
* @see [prefer-ts-expect-error](https://typescript-eslint.io/rules/prefer-ts-expect-error)
*/
'@typescript-eslint/prefer-ts-expect-error': PreferTsExpectErrorRuleConfig;
}
/**
* Option.
*/
interface PromiseFunctionAsyncOption {
/**
* Whether to consider `any` and `unknown` to be Promises.
*/
allowAny?: boolean;
/**
* Any extra names of classes or interfaces to be considered Promises.
*/
allowedPromiseNames?: string[];
checkArrowFunctions?: boolean;
checkFunctionDeclarations?: boolean;
checkFunctionExpressions?: boolean;
checkMethodDeclarations?: boolean;
}
/**
* Options.
*/
type PromiseFunctionAsyncOptions = [PromiseFunctionAsyncOption?];
/**
* Require any function or method that returns a Promise to be marked async.
*
* @see [promise-function-async](https://typescript-eslint.io/rules/promise-function-async)
*/
type PromiseFunctionAsyncRuleConfig =
RuleConfig<PromiseFunctionAsyncOptions>;
/**
* Require any function or method that returns a Promise to be marked async.
*
* @see [promise-function-async](https://typescript-eslint.io/rules/promise-function-async)
*/
interface PromiseFunctionAsyncRule {
/**
* Require any function or method that returns a Promise to be marked async.
*
* @see [promise-function-async](https://typescript-eslint.io/rules/promise-function-async)
*/
'@typescript-eslint/promise-function-async': PromiseFunctionAsyncRuleConfig;
}
/**
* Config.
*/
type QuotesConfig =
| 'avoid-escape'
| {
avoidEscape?: boolean;
allowTemplateLiterals?: boolean;
};
/**
* Option.
*/
type QuotesOption$1 = 'single' | 'double' | 'backtick';
/**
* Options.
*/
type QuotesOptions$1 = [QuotesOption$1?, QuotesConfig?];
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://typescript-eslint.io/rules/quotes)
*/
type QuotesRuleConfig$1 = RuleConfig<QuotesOptions$1>;
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://typescript-eslint.io/rules/quotes)
*/
interface QuotesRule$1 {
/**
* Enforce the consistent use of either backticks, double, or single quotes.
*
* @see [quotes](https://typescript-eslint.io/rules/quotes)
*/
'@typescript-eslint/quotes': QuotesRuleConfig$1;
}
/**
* Option.
*/
interface RequireArraySortCompareOption {
/**
* Whether to ignore arrays in which all elements are strings.
*/
ignoreStringArrays?: boolean;
}
/**
* Options.
*/
type RequireArraySortCompareOptions = [RequireArraySortCompareOption?];
/**
* Require `Array#sort` calls to always provide a `compareFunction`.
*
* @see [require-array-sort-compare](https://typescript-eslint.io/rules/require-array-sort-compare)
*/
type RequireArraySortCompareRuleConfig =
RuleConfig<RequireArraySortCompareOptions>;
/**
* Require `Array#sort` calls to always provide a `compareFunction`.
*
* @see [require-array-sort-compare](https://typescript-eslint.io/rules/require-array-sort-compare)
*/
interface RequireArraySortCompareRule {
/**
* Require `Array#sort` calls to always provide a `compareFunction`.
*
* @see [require-array-sort-compare](https://typescript-eslint.io/rules/require-array-sort-compare)
*/
'@typescript-eslint/require-array-sort-compare': RequireArraySortCompareRuleConfig;
}
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://typescript-eslint.io/rules/require-await)
*/
type RequireAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://typescript-eslint.io/rules/require-await)
*/
interface RequireAwaitRule {
/**
* Disallow async functions which have no `await` expression.
*
* @see [require-await](https://typescript-eslint.io/rules/require-await)
*/
'@typescript-eslint/require-await': RequireAwaitRuleConfig;
}
/**
* Option.
*/
interface RestrictPlusOperandsOption {
/**
* Whether to allow `any` typed values.
*/
allowAny?: boolean;
/**
* Whether to allow `boolean` typed values.
*/
allowBoolean?: boolean;
/**
* Whether to allow potentially `null` or `undefined` typed values.
*/
allowNullish?: boolean;
/**
* Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.
*/
allowNumberAndString?: boolean;
/**
* Whether to allow `regexp` typed values.
*/
allowRegExp?: boolean;
/**
* Whether to skip compound assignments such as `+=`.
*/
skipCompoundAssignments?: boolean;
}
/**
* Options.
*/
type RestrictPlusOperandsOptions = [RestrictPlusOperandsOption?];
/**
* Require both operands of addition to be the same type and be `bigint`, `number`, or `string`.
*
* @see [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
*/
type RestrictPlusOperandsRuleConfig =
RuleConfig<RestrictPlusOperandsOptions>;
/**
* Require both operands of addition to be the same type and be `bigint`, `number`, or `string`.
*
* @see [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
*/
interface RestrictPlusOperandsRule {
/**
* Require both operands of addition to be the same type and be `bigint`, `number`, or `string`.
*
* @see [restrict-plus-operands](https://typescript-eslint.io/rules/restrict-plus-operands)
*/
'@typescript-eslint/restrict-plus-operands': RestrictPlusOperandsRuleConfig;
}
/**
* Option.
*/
interface RestrictTemplateExpressionsOption {
/**
* Whether to allow `any` typed values in template expressions.
*/
allowAny?: boolean;
/**
* Whether to allow `boolean` typed values in template expressions.
*/
allowBoolean?: boolean;
/**
* Whether to allow `nullish` typed values in template expressions.
*/
allowNullish?: boolean;
/**
* Whether to allow `number` typed values in template expressions.
*/
allowNumber?: boolean;
/**
* Whether to allow `regexp` typed values in template expressions.
*/
allowRegExp?: boolean;
/**
* Whether to allow `never` typed values in template expressions.
*/
allowNever?: boolean;
}
/**
* Options.
*/
type RestrictTemplateExpressionsOptions = [
RestrictTemplateExpressionsOption?,
];
/**
* Enforce template literal expressions to be of `string` type.
*
* @see [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
*/
type RestrictTemplateExpressionsRuleConfig =
RuleConfig<RestrictTemplateExpressionsOptions>;
/**
* Enforce template literal expressions to be of `string` type.
*
* @see [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
*/
interface RestrictTemplateExpressionsRule {
/**
* Enforce template literal expressions to be of `string` type.
*
* @see [restrict-template-expressions](https://typescript-eslint.io/rules/restrict-template-expressions)
*/
'@typescript-eslint/restrict-template-expressions': RestrictTemplateExpressionsRuleConfig;
}
/**
* Option.
*/
type ReturnAwaitOption = 'in-try-catch' | 'always' | 'never';
/**
* Options.
*/
type ReturnAwaitOptions = [ReturnAwaitOption?];
/**
* Enforce consistent returning of awaited values.
*
* @see [return-await](https://typescript-eslint.io/rules/return-await)
*/
type ReturnAwaitRuleConfig = RuleConfig<ReturnAwaitOptions>;
/**
* Enforce consistent returning of awaited values.
*
* @see [return-await](https://typescript-eslint.io/rules/return-await)
*/
interface ReturnAwaitRule {
/**
* Enforce consistent returning of awaited values.
*
* @see [return-await](https://typescript-eslint.io/rules/return-await)
*/
'@typescript-eslint/return-await': ReturnAwaitRuleConfig;
}
/**
* Option.
*/
type SemiOption =
| []
| ['never']
| [
'never',
{
beforeStatementContinuationChars?: 'always' | 'any' | 'never';
},
]
| []
| ['always']
| [
'always',
{
omitLastInOneLineBlock?: boolean;
omitLastInOneLineClassBody?: boolean;
},
];
/**
* Options.
*/
type SemiOptions = SemiOption;
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://typescript-eslint.io/rules/semi)
*/
type SemiRuleConfig = RuleConfig<SemiOptions>;
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://typescript-eslint.io/rules/semi)
*/
interface SemiRule {
/**
* Require or disallow semicolons instead of ASI.
*
* @see [semi](https://typescript-eslint.io/rules/semi)
*/
'@typescript-eslint/semi': SemiRuleConfig;
}
/**
* Option.
*/
interface SortTypeConstituentsOption {
/**
* 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'
)[];
}
/**
* Options.
*/
type SortTypeConstituentsOptions = [SortTypeConstituentsOption?];
/**
* Enforce constituents of a type union/intersection to be sorted alphabetically.
*
* @see [sort-type-constituents](https://typescript-eslint.io/rules/sort-type-constituents)
*/
type SortTypeConstituentsRuleConfig =
RuleConfig<SortTypeConstituentsOptions>;
/**
* Enforce constituents of a type union/intersection to be sorted alphabetically.
*
* @see [sort-type-constituents](https://typescript-eslint.io/rules/sort-type-constituents)
*/
interface SortTypeConstituentsRule {
/**
* Enforce constituents of a type union/intersection to be sorted alphabetically.
*
* @see [sort-type-constituents](https://typescript-eslint.io/rules/sort-type-constituents)
*/
'@typescript-eslint/sort-type-constituents': SortTypeConstituentsRuleConfig;
}
/**
* Option.
*/
type SpaceBeforeBlocksOption =
| ('always' | 'never')
| {
keywords?: 'always' | 'never' | 'off';
functions?: 'always' | 'never' | 'off';
classes?: 'always' | 'never' | 'off';
};
/**
* Options.
*/
type SpaceBeforeBlocksOptions = [SpaceBeforeBlocksOption?];
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://typescript-eslint.io/rules/space-before-blocks)
*/
type SpaceBeforeBlocksRuleConfig = RuleConfig<SpaceBeforeBlocksOptions>;
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://typescript-eslint.io/rules/space-before-blocks)
*/
interface SpaceBeforeBlocksRule {
/**
* Enforce consistent spacing before blocks.
*
* @see [space-before-blocks](https://typescript-eslint.io/rules/space-before-blocks)
*/
'@typescript-eslint/space-before-blocks': SpaceBeforeBlocksRuleConfig;
}
/**
* Option.
*/
type SpaceBeforeFunctionParenOption =
| ('always' | 'never')
| {
anonymous?: 'always' | 'never' | 'ignore';
named?: 'always' | 'never' | 'ignore';
asyncArrow?: 'always' | 'never' | 'ignore';
};
/**
* Options.
*/
type SpaceBeforeFunctionParenOptions = [SpaceBeforeFunctionParenOption?];
/**
* Enforce consistent spacing before function parenthesis.
*
* @see [space-before-function-paren](https://typescript-eslint.io/rules/space-before-function-paren)
*/
type SpaceBeforeFunctionParenRuleConfig =
RuleConfig<SpaceBeforeFunctionParenOptions>;
/**
* Enforce consistent spacing before function parenthesis.
*
* @see [space-before-function-paren](https://typescript-eslint.io/rules/space-before-function-paren)
*/
interface SpaceBeforeFunctionParenRule {
/**
* Enforce consistent spacing before function parenthesis.
*
* @see [space-before-function-paren](https://typescript-eslint.io/rules/space-before-function-paren)
*/
'@typescript-eslint/space-before-function-paren': SpaceBeforeFunctionParenRuleConfig;
}
/**
* Option.
*/
interface SpaceInfixOpsOption$1 {
int32Hint?: boolean;
}
/**
* Options.
*/
type SpaceInfixOpsOptions$1 = [SpaceInfixOpsOption$1?];
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://typescript-eslint.io/rules/space-infix-ops)
*/
type SpaceInfixOpsRuleConfig$1 = RuleConfig<SpaceInfixOpsOptions$1>;
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://typescript-eslint.io/rules/space-infix-ops)
*/
interface SpaceInfixOpsRule$1 {
/**
* Require spacing around infix operators.
*
* @see [space-infix-ops](https://typescript-eslint.io/rules/space-infix-ops)
*/
'@typescript-eslint/space-infix-ops': SpaceInfixOpsRuleConfig$1;
}
/**
* Option.
*/
interface StrictBooleanExpressionsOption {
allowString?: boolean;
allowNumber?: boolean;
allowNullableObject?: boolean;
allowNullableBoolean?: boolean;
allowNullableString?: boolean;
allowNullableNumber?: boolean;
allowNullableEnum?: boolean;
allowAny?: boolean;
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
}
/**
* Options.
*/
type StrictBooleanExpressionsOptions = [StrictBooleanExpressionsOption?];
/**
* Disallow certain types in boolean expressions.
*
* @see [strict-boolean-expressions](https://typescript-eslint.io/rules/strict-boolean-expressions)
*/
type StrictBooleanExpressionsRuleConfig =
RuleConfig<StrictBooleanExpressionsOptions>;
/**
* Disallow certain types in boolean expressions.
*
* @see [strict-boolean-expressions](https://typescript-eslint.io/rules/strict-boolean-expressions)
*/
interface StrictBooleanExpressionsRule {
/**
* Disallow certain types in boolean expressions.
*
* @see [strict-boolean-expressions](https://typescript-eslint.io/rules/strict-boolean-expressions)
*/
'@typescript-eslint/strict-boolean-expressions': StrictBooleanExpressionsRuleConfig;
}
/**
* Require switch-case statements to be exhaustive with union type.
*
* @see [switch-exhaustiveness-check](https://typescript-eslint.io/rules/switch-exhaustiveness-check)
*/
type SwitchExhaustivenessCheckRuleConfig = RuleConfig<[]>;
/**
* Require switch-case statements to be exhaustive with union type.
*
* @see [switch-exhaustiveness-check](https://typescript-eslint.io/rules/switch-exhaustiveness-check)
*/
interface SwitchExhaustivenessCheckRule {
/**
* Require switch-case statements to be exhaustive with union type.
*
* @see [switch-exhaustiveness-check](https://typescript-eslint.io/rules/switch-exhaustiveness-check)
*/
'@typescript-eslint/switch-exhaustiveness-check': SwitchExhaustivenessCheckRuleConfig;
}
/**
* Option.
*/
interface TripleSlashReferenceOption {
lib?: 'always' | 'never';
path?: 'always' | 'never';
types?: 'always' | 'never' | 'prefer-import';
}
/**
* Options.
*/
type TripleSlashReferenceOptions = [TripleSlashReferenceOption?];
/**
* Disallow certain triple slash directives in favor of ES6-style import declarations.
*
* @see [triple-slash-reference](https://typescript-eslint.io/rules/triple-slash-reference)
*/
type TripleSlashReferenceRuleConfig =
RuleConfig<TripleSlashReferenceOptions>;
/**
* Disallow certain triple slash directives in favor of ES6-style import declarations.
*
* @see [triple-slash-reference](https://typescript-eslint.io/rules/triple-slash-reference)
*/
interface TripleSlashReferenceRule {
/**
* Disallow certain triple slash directives in favor of ES6-style import declarations.
*
* @see [triple-slash-reference](https://typescript-eslint.io/rules/triple-slash-reference)
*/
'@typescript-eslint/triple-slash-reference': TripleSlashReferenceRuleConfig;
}
/**
* Option.
*/
interface TypeAnnotationSpacingOption {
before?: boolean;
after?: boolean;
overrides?: {
colon?: SpacingConfig;
arrow?: SpacingConfig;
variable?: SpacingConfig;
parameter?: SpacingConfig;
property?: SpacingConfig;
returnType?: SpacingConfig;
};
}
interface SpacingConfig {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type TypeAnnotationSpacingOptions = [TypeAnnotationSpacingOption?];
/**
* Require consistent spacing around type annotations.
*
* @see [type-annotation-spacing](https://typescript-eslint.io/rules/type-annotation-spacing)
*/
type TypeAnnotationSpacingRuleConfig =
RuleConfig<TypeAnnotationSpacingOptions>;
/**
* Require consistent spacing around type annotations.
*
* @see [type-annotation-spacing](https://typescript-eslint.io/rules/type-annotation-spacing)
*/
interface TypeAnnotationSpacingRule {
/**
* Require consistent spacing around type annotations.
*
* @see [type-annotation-spacing](https://typescript-eslint.io/rules/type-annotation-spacing)
*/
'@typescript-eslint/type-annotation-spacing': TypeAnnotationSpacingRuleConfig;
}
/**
* Option.
*/
interface TypedefOption {
arrayDestructuring?: boolean;
arrowParameter?: boolean;
memberVariableDeclaration?: boolean;
objectDestructuring?: boolean;
parameter?: boolean;
propertyDeclaration?: boolean;
variableDeclaration?: boolean;
variableDeclarationIgnoreFunction?: boolean;
}
/**
* Options.
*/
type TypedefOptions = [TypedefOption?];
/**
* Require type annotations in certain places.
*
* @see [typedef](https://typescript-eslint.io/rules/typedef)
*/
type TypedefRuleConfig = RuleConfig<TypedefOptions>;
/**
* Require type annotations in certain places.
*
* @see [typedef](https://typescript-eslint.io/rules/typedef)
*/
interface TypedefRule {
/**
* Require type annotations in certain places.
*
* @see [typedef](https://typescript-eslint.io/rules/typedef)
*/
'@typescript-eslint/typedef': TypedefRuleConfig;
}
/**
* Option.
*/
interface UnboundMethodOption {
/**
* Whether to skip checking whether `static` methods are correctly bound.
*/
ignoreStatic?: boolean;
}
/**
* Options.
*/
type UnboundMethodOptions = [UnboundMethodOption?];
/**
* Enforce unbound methods are called with their expected scope.
*
* @see [unbound-method](https://typescript-eslint.io/rules/unbound-method)
*/
type UnboundMethodRuleConfig = RuleConfig<UnboundMethodOptions>;
/**
* Enforce unbound methods are called with their expected scope.
*
* @see [unbound-method](https://typescript-eslint.io/rules/unbound-method)
*/
interface UnboundMethodRule {
/**
* Enforce unbound methods are called with their expected scope.
*
* @see [unbound-method](https://typescript-eslint.io/rules/unbound-method)
*/
'@typescript-eslint/unbound-method': UnboundMethodRuleConfig;
}
/**
* Option.
*/
interface UnifiedSignaturesOption {
/**
* Whether two parameters with different names at the same index should be considered different even if their types are the same.
*/
ignoreDifferentlyNamedParameters?: boolean;
}
/**
* Options.
*/
type UnifiedSignaturesOptions = [UnifiedSignaturesOption?];
/**
* Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
*
* @see [unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
*/
type UnifiedSignaturesRuleConfig = RuleConfig<UnifiedSignaturesOptions>;
/**
* Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
*
* @see [unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
*/
interface UnifiedSignaturesRule {
/**
* Disallow two overloads that could be unified into one with a union or an optional/rest parameter.
*
* @see [unified-signatures](https://typescript-eslint.io/rules/unified-signatures)
*/
'@typescript-eslint/unified-signatures': UnifiedSignaturesRuleConfig;
}
/**
* All TypeScript rules.
*/
type TypeScriptRules = AdjacentOverloadSignaturesRule &
ArrayTypeRule &
AwaitThenableRule &
BanTsCommentRule &
BanTslintCommentRule &
BanTypesRule &
BlockSpacingRule$1 &
BraceStyleRule$1 &
ClassLiteralPropertyStyleRule &
ClassMethodsUseThisRule &
CommaDangleRule$1 &
CommaSpacingRule$1 &
ConsistentGenericConstructorsRule &
ConsistentIndexedObjectStyleRule &
ConsistentTypeAssertionsRule &
ConsistentTypeDefinitionsRule &
ConsistentTypeExportsRule &
ConsistentTypeImportsRule &
DefaultParamLastRule &
DotNotationRule$1 &
ExplicitFunctionReturnTypeRule &
ExplicitMemberAccessibilityRule &
ExplicitModuleBoundaryTypesRule &
FuncCallSpacingRule$1 &
IndentRule$1 &
InitDeclarationsRule &
KeySpacingRule$2 &
KeywordSpacingRule$1 &
LinesAroundCommentRule &
LinesBetweenClassMembersRule &
MemberDelimiterStyleRule &
MemberOrderingRule &
MethodSignatureStyleRule &
NamingConventionRule &
NoArrayConstructorRule &
NoBaseToStringRule &
NoConfusingNonNullAssertionRule &
NoConfusingVoidExpressionRule &
NoDupeClassMembersRule &
NoDuplicateEnumValuesRule &
NoDuplicateTypeConstituentsRule &
NoDynamicDeleteRule &
NoEmptyFunctionRule &
NoEmptyInterfaceRule &
NoExplicitAnyRule &
NoExtraNonNullAssertionRule &
NoExtraParensRule$1 &
NoExtraSemiRule &
NoExtraneousClassRule &
NoFloatingPromisesRule &
NoForInArrayRule &
NoImpliedEvalRule &
NoImportTypeSideEffectsRule &
NoInferrableTypesRule &
NoInvalidThisRule &
NoInvalidVoidTypeRule &
NoLoopFuncRule &
NoLossOfPrecisionRule$1 &
NoMagicNumbersRule &
NoMeaninglessVoidOperatorRule &
NoMisusedNewRule &
NoMisusedPromisesRule &
NoMixedEnumsRule &
NoNamespaceRule &
NoNonNullAssertedNullishCoalescingRule &
NoNonNullAssertedOptionalChainRule &
NoNonNullAssertionRule &
NoRedeclareRule &
NoRedundantTypeConstituentsRule &
NoRequireImportsRule &
NoRestrictedImportsRule &
NoShadowRule &
NoThisAliasRule &
NoThrowLiteralRule &
NoTypeAliasRule &
NoUnnecessaryBooleanLiteralCompareRule &
NoUnnecessaryConditionRule &
NoUnnecessaryQualifierRule &
NoUnnecessaryTypeArgumentsRule &
NoUnnecessaryTypeAssertionRule &
NoUnnecessaryTypeConstraintRule &
NoUnsafeArgumentRule &
NoUnsafeAssignmentRule &
NoUnsafeCallRule &
NoUnsafeDeclarationMergingRule &
NoUnsafeEnumComparisonRule &
NoUnsafeMemberAccessRule &
NoUnsafeReturnRule &
NoUnusedExpressionsRule &
NoUnusedVarsRule$1 &
NoUseBeforeDefineRule &
NoUselessConstructorRule &
NoUselessEmptyExportRule &
NoVarRequiresRule &
NonNullableTypeAssertionStyleRule &
ObjectCurlySpacingRule$1 &
PaddingLineBetweenStatementsRule &
ParameterPropertiesRule &
PreferAsConstRule &
PreferEnumInitializersRule &
PreferForOfRule &
PreferFunctionTypeRule &
PreferIncludesRule$1 &
PreferLiteralEnumMemberRule &
PreferNamespaceKeywordRule &
PreferNullishCoalescingRule &
PreferOptionalChainRule &
PreferReadonlyRule &
PreferReadonlyParameterTypesRule &
PreferReduceTypeParameterRule &
PreferRegexpExecRule &
PreferReturnThisTypeRule &
PreferStringStartsEndsWithRule$1 &
PreferTsExpectErrorRule &
PromiseFunctionAsyncRule &
QuotesRule$1 &
RequireArraySortCompareRule &
RequireAwaitRule &
RestrictPlusOperandsRule &
RestrictTemplateExpressionsRule &
ReturnAwaitRule &
SemiRule &
SortTypeConstituentsRule &
SpaceBeforeBlocksRule &
SpaceBeforeFunctionParenRule &
SpaceInfixOpsRule$1 &
StrictBooleanExpressionsRule &
SwitchExhaustivenessCheckRule &
TripleSlashReferenceRule &
TypeAnnotationSpacingRule &
TypedefRule &
UnboundMethodRule &
UnifiedSignaturesRule;
/**
* Option.
*/
interface BetterRegexOption {
sortCharacterClasses?: boolean;
}
/**
* Options.
*/
type BetterRegexOptions = [BetterRegexOption?];
/**
* Improve regexes by making them shorter, consistent, and safer.
*
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/better-regex.md)
*/
type BetterRegexRuleConfig = RuleConfig<BetterRegexOptions>;
/**
* Improve regexes by making them shorter, consistent, and safer.
*
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/better-regex.md)
*/
interface BetterRegexRule {
/**
* Improve regexes by making them shorter, consistent, and safer.
*
* @see [better-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/better-regex.md)
*/
'unicorn/better-regex': BetterRegexRuleConfig;
}
/**
* Option.
*/
interface CatchErrorNameOption {
name?: string;
ignore?: any[];
}
/**
* Options.
*/
type CatchErrorNameOptions = [CatchErrorNameOption?];
/**
* Enforce a specific parameter name in catch clauses.
*
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/catch-error-name.md)
*/
type CatchErrorNameRuleConfig = RuleConfig<CatchErrorNameOptions>;
/**
* Enforce a specific parameter name in catch clauses.
*
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/catch-error-name.md)
*/
interface CatchErrorNameRule {
/**
* Enforce a specific parameter name in catch clauses.
*
* @see [catch-error-name](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/catch-error-name.md)
*/
'unicorn/catch-error-name': CatchErrorNameRuleConfig;
}
/**
* Use destructured variables over properties.
*
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-destructuring.md)
*/
type ConsistentDestructuringRuleConfig = RuleConfig<[]>;
/**
* Use destructured variables over properties.
*
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-destructuring.md)
*/
interface ConsistentDestructuringRule {
/**
* Use destructured variables over properties.
*
* @see [consistent-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-destructuring.md)
*/
'unicorn/consistent-destructuring': ConsistentDestructuringRuleConfig;
}
/**
* Option.
*/
interface ConsistentFunctionScopingOption {
checkArrowFunctions?: boolean;
}
/**
* Options.
*/
type ConsistentFunctionScopingOptions = [
ConsistentFunctionScopingOption?,
];
/**
* Move function definitions to the highest possible scope.
*
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-function-scoping.md)
*/
type ConsistentFunctionScopingRuleConfig =
RuleConfig<ConsistentFunctionScopingOptions>;
/**
* Move function definitions to the highest possible scope.
*
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-function-scoping.md)
*/
interface ConsistentFunctionScopingRule {
/**
* Move function definitions to the highest possible scope.
*
* @see [consistent-function-scoping](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/consistent-function-scoping.md)
*/
'unicorn/consistent-function-scoping': ConsistentFunctionScopingRuleConfig;
}
/**
* Enforce correct `Error` subclassing.
*
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/custom-error-definition.md)
*/
type CustomErrorDefinitionRuleConfig = RuleConfig<[]>;
/**
* Enforce correct `Error` subclassing.
*
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/custom-error-definition.md)
*/
interface CustomErrorDefinitionRule {
/**
* Enforce correct `Error` subclassing.
*
* @see [custom-error-definition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/custom-error-definition.md)
*/
'unicorn/custom-error-definition': CustomErrorDefinitionRuleConfig;
}
/**
* Enforce no spaces between braces.
*
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/empty-brace-spaces.md)
*/
type EmptyBraceSpacesRuleConfig = RuleConfig<[]>;
/**
* Enforce no spaces between braces.
*
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/empty-brace-spaces.md)
*/
interface EmptyBraceSpacesRule {
/**
* Enforce no spaces between braces.
*
* @see [empty-brace-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/empty-brace-spaces.md)
*/
'unicorn/empty-brace-spaces': EmptyBraceSpacesRuleConfig;
}
/**
* Enforce passing a `message` value when creating a built-in error.
*
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/error-message.md)
*/
type ErrorMessageRuleConfig = RuleConfig<[]>;
/**
* Enforce passing a `message` value when creating a built-in error.
*
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/error-message.md)
*/
interface ErrorMessageRule {
/**
* Enforce passing a `message` value when creating a built-in error.
*
* @see [error-message](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/error-message.md)
*/
'unicorn/error-message': ErrorMessageRuleConfig;
}
/**
* Require escape sequences to use uppercase values.
*
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/escape-case.md)
*/
type EscapeCaseRuleConfig = RuleConfig<[]>;
/**
* Require escape sequences to use uppercase values.
*
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/escape-case.md)
*/
interface EscapeCaseRule {
/**
* Require escape sequences to use uppercase values.
*
* @see [escape-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/escape-case.md)
*/
'unicorn/escape-case': EscapeCaseRuleConfig;
}
/**
* Option.
*/
interface ExpiringTodoCommentsOption {
terms?: string[];
ignore?: any[];
ignoreDatesOnPullRequests?: boolean;
allowWarningComments?: boolean;
date?: string;
}
/**
* Options.
*/
type ExpiringTodoCommentsOptions = [ExpiringTodoCommentsOption?];
/**
* Add expiration conditions to TODO comments.
*
* @see [expiring-todo-comments](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/expiring-todo-comments.md)
*/
type ExpiringTodoCommentsRuleConfig =
RuleConfig<ExpiringTodoCommentsOptions>;
/**
* Add expiration conditions to TODO comments.
*
* @see [expiring-todo-comments](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/expiring-todo-comments.md)
*/
interface ExpiringTodoCommentsRule {
/**
* Add expiration conditions to TODO comments.
*
* @see [expiring-todo-comments](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/expiring-todo-comments.md)
*/
'unicorn/expiring-todo-comments': ExpiringTodoCommentsRuleConfig;
}
/**
* Option.
*/
interface ExplicitLengthCheckOption {
'non-zero'?: 'greater-than' | 'not-equal';
}
/**
* Options.
*/
type ExplicitLengthCheckOptions = [ExplicitLengthCheckOption?];
/**
* Enforce explicitly comparing the `length` or `size` property of a value.
*
* @see [explicit-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/explicit-length-check.md)
*/
type ExplicitLengthCheckRuleConfig =
RuleConfig<ExplicitLengthCheckOptions>;
/**
* Enforce explicitly comparing the `length` or `size` property of a value.
*
* @see [explicit-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/explicit-length-check.md)
*/
interface ExplicitLengthCheckRule {
/**
* Enforce explicitly comparing the `length` or `size` property of a value.
*
* @see [explicit-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/explicit-length-check.md)
*/
'unicorn/explicit-length-check': ExplicitLengthCheckRuleConfig;
}
/**
* Option.
*/
type FilenameCaseOption =
| {
case?: 'camelCase' | 'snakeCase' | 'kebabCase' | 'pascalCase';
ignore?: any[];
}
| {
cases?: {
camelCase?: boolean;
snakeCase?: boolean;
kebabCase?: boolean;
pascalCase?: boolean;
};
ignore?: any[];
};
/**
* Options.
*/
type FilenameCaseOptions = [FilenameCaseOption?];
/**
* Enforce a case style for filenames.
*
* @see [filename-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/filename-case.md)
*/
type FilenameCaseRuleConfig = RuleConfig<FilenameCaseOptions>;
/**
* Enforce a case style for filenames.
*
* @see [filename-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/filename-case.md)
*/
interface FilenameCaseRule {
/**
* Enforce a case style for filenames.
*
* @see [filename-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/filename-case.md)
*/
'unicorn/filename-case': FilenameCaseRuleConfig;
}
/**
*
* @deprecated
*
* @see [import-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#import-index)
*/
type ImportIndexRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [import-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#import-index)
*/
interface ImportIndexRule {
/**
*
* @deprecated
*
* @see [import-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#import-index)
*/
'unicorn/import-index': ImportIndexRuleConfig;
}
/**
* Option.
*/
type ImportStyleOption =
| []
| [
{
checkImport?: boolean;
checkDynamicImport?: boolean;
checkExportFrom?: boolean;
checkRequire?: boolean;
extendDefaultStyles?: boolean;
styles?: ModuleStyles;
},
];
type Styles = false | BooleanObject$1;
interface ModuleStyles {
[k: string]: Styles;
}
interface BooleanObject$1 {
[k: string]: boolean;
}
/**
* Options.
*/
type ImportStyleOptions = ImportStyleOption;
/**
* Enforce specific import styles per module.
*
* @see [import-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/import-style.md)
*/
type ImportStyleRuleConfig = RuleConfig<ImportStyleOptions>;
/**
* Enforce specific import styles per module.
*
* @see [import-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/import-style.md)
*/
interface ImportStyleRule {
/**
* Enforce specific import styles per module.
*
* @see [import-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/import-style.md)
*/
'unicorn/import-style': ImportStyleRuleConfig;
}
/**
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
*
* @see [new-for-builtins](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/new-for-builtins.md)
*/
type NewForBuiltinsRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
*
* @see [new-for-builtins](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/new-for-builtins.md)
*/
interface NewForBuiltinsRule {
/**
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
*
* @see [new-for-builtins](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/new-for-builtins.md)
*/
'unicorn/new-for-builtins': NewForBuiltinsRuleConfig;
}
/**
* Enforce specifying rules to disable in `eslint-disable` comments.
*
* @see [no-abusive-eslint-disable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-abusive-eslint-disable.md)
*/
type NoAbusiveEslintDisableRuleConfig = RuleConfig<[]>;
/**
* Enforce specifying rules to disable in `eslint-disable` comments.
*
* @see [no-abusive-eslint-disable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-abusive-eslint-disable.md)
*/
interface NoAbusiveEslintDisableRule {
/**
* Enforce specifying rules to disable in `eslint-disable` comments.
*
* @see [no-abusive-eslint-disable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-abusive-eslint-disable.md)
*/
'unicorn/no-abusive-eslint-disable': NoAbusiveEslintDisableRuleConfig;
}
/**
* Prevent passing a function reference directly to iterator methods.
*
* @see [no-array-callback-reference](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-callback-reference.md)
*/
type NoArrayCallbackReferenceRuleConfig = RuleConfig<[]>;
/**
* Prevent passing a function reference directly to iterator methods.
*
* @see [no-array-callback-reference](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-callback-reference.md)
*/
interface NoArrayCallbackReferenceRule {
/**
* Prevent passing a function reference directly to iterator methods.
*
* @see [no-array-callback-reference](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-callback-reference.md)
*/
'unicorn/no-array-callback-reference': NoArrayCallbackReferenceRuleConfig;
}
/**
* Prefer `for…of` over the `forEach` method.
*
* @see [no-array-for-each](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-for-each.md)
*/
type NoArrayForEachRuleConfig = RuleConfig<[]>;
/**
* Prefer `for…of` over the `forEach` method.
*
* @see [no-array-for-each](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-for-each.md)
*/
interface NoArrayForEachRule {
/**
* Prefer `for…of` over the `forEach` method.
*
* @see [no-array-for-each](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-for-each.md)
*/
'unicorn/no-array-for-each': NoArrayForEachRuleConfig;
}
/**
*
* @deprecated
*
* @see [no-array-instanceof](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-array-instanceof)
*/
type NoArrayInstanceofRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [no-array-instanceof](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-array-instanceof)
*/
interface NoArrayInstanceofRule {
/**
*
* @deprecated
*
* @see [no-array-instanceof](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-array-instanceof)
*/
'unicorn/no-array-instanceof': NoArrayInstanceofRuleConfig;
}
/**
* Disallow using the `this` argument in array methods.
*
* @see [no-array-method-this-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-method-this-argument.md)
*/
type NoArrayMethodThisArgumentRuleConfig = RuleConfig<[]>;
/**
* Disallow using the `this` argument in array methods.
*
* @see [no-array-method-this-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-method-this-argument.md)
*/
interface NoArrayMethodThisArgumentRule {
/**
* Disallow using the `this` argument in array methods.
*
* @see [no-array-method-this-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-method-this-argument.md)
*/
'unicorn/no-array-method-this-argument': NoArrayMethodThisArgumentRuleConfig;
}
/**
* Option.
*/
interface NoArrayPushPushOption {
ignore?: any[];
}
/**
* Options.
*/
type NoArrayPushPushOptions = [NoArrayPushPushOption?];
/**
* Enforce combining multiple `Array#push()` into one call.
*
* @see [no-array-push-push](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-push-push.md)
*/
type NoArrayPushPushRuleConfig = RuleConfig<NoArrayPushPushOptions>;
/**
* Enforce combining multiple `Array#push()` into one call.
*
* @see [no-array-push-push](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-push-push.md)
*/
interface NoArrayPushPushRule {
/**
* Enforce combining multiple `Array#push()` into one call.
*
* @see [no-array-push-push](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-push-push.md)
*/
'unicorn/no-array-push-push': NoArrayPushPushRuleConfig;
}
/**
* Option.
*/
interface NoArrayReduceOption {
allowSimpleOperations?: boolean;
}
/**
* Options.
*/
type NoArrayReduceOptions = [NoArrayReduceOption?];
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
type NoArrayReduceRuleConfig = RuleConfig<NoArrayReduceOptions>;
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
interface NoArrayReduceRule {
/**
* Disallow `Array#reduce()` and `Array#reduceRight()`.
*
* @see [no-array-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-array-reduce.md)
*/
'unicorn/no-array-reduce': NoArrayReduceRuleConfig;
}
/**
* Disallow member access from await expression.
*
* @see [no-await-expression-member](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-await-expression-member.md)
*/
type NoAwaitExpressionMemberRuleConfig = RuleConfig<[]>;
/**
* Disallow member access from await expression.
*
* @see [no-await-expression-member](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-await-expression-member.md)
*/
interface NoAwaitExpressionMemberRule {
/**
* Disallow member access from await expression.
*
* @see [no-await-expression-member](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-await-expression-member.md)
*/
'unicorn/no-await-expression-member': NoAwaitExpressionMemberRuleConfig;
}
/**
* Do not use leading/trailing space between `console.log` parameters.
*
* @see [no-console-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-console-spaces.md)
*/
type NoConsoleSpacesRuleConfig = RuleConfig<[]>;
/**
* Do not use leading/trailing space between `console.log` parameters.
*
* @see [no-console-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-console-spaces.md)
*/
interface NoConsoleSpacesRule {
/**
* Do not use leading/trailing space between `console.log` parameters.
*
* @see [no-console-spaces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-console-spaces.md)
*/
'unicorn/no-console-spaces': NoConsoleSpacesRuleConfig;
}
/**
* Do not use `document.cookie` directly.
*
* @see [no-document-cookie](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-document-cookie.md)
*/
type NoDocumentCookieRuleConfig = RuleConfig<[]>;
/**
* Do not use `document.cookie` directly.
*
* @see [no-document-cookie](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-document-cookie.md)
*/
interface NoDocumentCookieRule {
/**
* Do not use `document.cookie` directly.
*
* @see [no-document-cookie](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-document-cookie.md)
*/
'unicorn/no-document-cookie': NoDocumentCookieRuleConfig;
}
/**
* Disallow empty files.
*
* @see [no-empty-file](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-empty-file.md)
*/
type NoEmptyFileRuleConfig = RuleConfig<[]>;
/**
* Disallow empty files.
*
* @see [no-empty-file](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-empty-file.md)
*/
interface NoEmptyFileRule {
/**
* Disallow empty files.
*
* @see [no-empty-file](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-empty-file.md)
*/
'unicorn/no-empty-file': NoEmptyFileRuleConfig;
}
/**
*
* @deprecated
*
* @see [no-fn-reference-in-iterator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator)
*/
type NoFnReferenceInIteratorRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [no-fn-reference-in-iterator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator)
*/
interface NoFnReferenceInIteratorRule {
/**
*
* @deprecated
*
* @see [no-fn-reference-in-iterator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-fn-reference-in-iterator)
*/
'unicorn/no-fn-reference-in-iterator': NoFnReferenceInIteratorRuleConfig;
}
/**
* Do not use a `for` loop that can be replaced with a `for-of` loop.
*
* @see [no-for-loop](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-for-loop.md)
*/
type NoForLoopRuleConfig = RuleConfig<[]>;
/**
* Do not use a `for` loop that can be replaced with a `for-of` loop.
*
* @see [no-for-loop](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-for-loop.md)
*/
interface NoForLoopRule {
/**
* Do not use a `for` loop that can be replaced with a `for-of` loop.
*
* @see [no-for-loop](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-for-loop.md)
*/
'unicorn/no-for-loop': NoForLoopRuleConfig;
}
/**
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
*
* @see [no-hex-escape](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-hex-escape.md)
*/
type NoHexEscapeRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
*
* @see [no-hex-escape](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-hex-escape.md)
*/
interface NoHexEscapeRule {
/**
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
*
* @see [no-hex-escape](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-hex-escape.md)
*/
'unicorn/no-hex-escape': NoHexEscapeRuleConfig;
}
/**
* Require `Array.isArray()` instead of `instanceof Array`.
*
* @see [no-instanceof-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-instanceof-array.md)
*/
type NoInstanceofArrayRuleConfig = RuleConfig<[]>;
/**
* Require `Array.isArray()` instead of `instanceof Array`.
*
* @see [no-instanceof-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-instanceof-array.md)
*/
interface NoInstanceofArrayRule {
/**
* Require `Array.isArray()` instead of `instanceof Array`.
*
* @see [no-instanceof-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-instanceof-array.md)
*/
'unicorn/no-instanceof-array': NoInstanceofArrayRuleConfig;
}
/**
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
*
* @see [no-invalid-remove-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-invalid-remove-event-listener.md)
*/
type NoInvalidRemoveEventListenerRuleConfig = RuleConfig<[]>;
/**
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
*
* @see [no-invalid-remove-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-invalid-remove-event-listener.md)
*/
interface NoInvalidRemoveEventListenerRule {
/**
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
*
* @see [no-invalid-remove-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-invalid-remove-event-listener.md)
*/
'unicorn/no-invalid-remove-event-listener': NoInvalidRemoveEventListenerRuleConfig;
}
/**
* Option.
*/
interface NoKeywordPrefixOption {
/**
* @minItems 0
*/
disallowedPrefixes?: [] | [string];
checkProperties?: boolean;
onlyCamelCase?: boolean;
}
/**
* Options.
*/
type NoKeywordPrefixOptions = [NoKeywordPrefixOption?];
/**
* Disallow identifiers starting with `new` or `class`.
*
* @see [no-keyword-prefix](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-keyword-prefix.md)
*/
type NoKeywordPrefixRuleConfig = RuleConfig<NoKeywordPrefixOptions>;
/**
* Disallow identifiers starting with `new` or `class`.
*
* @see [no-keyword-prefix](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-keyword-prefix.md)
*/
interface NoKeywordPrefixRule {
/**
* Disallow identifiers starting with `new` or `class`.
*
* @see [no-keyword-prefix](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-keyword-prefix.md)
*/
'unicorn/no-keyword-prefix': NoKeywordPrefixRuleConfig;
}
/**
* Disallow `if` statements as the only statement in `if` blocks without `else`.
*
* @see [no-lonely-if](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-lonely-if.md)
*/
type NoLonelyIfRuleConfig = RuleConfig<[]>;
/**
* Disallow `if` statements as the only statement in `if` blocks without `else`.
*
* @see [no-lonely-if](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-lonely-if.md)
*/
interface NoLonelyIfRule {
/**
* Disallow `if` statements as the only statement in `if` blocks without `else`.
*
* @see [no-lonely-if](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-lonely-if.md)
*/
'unicorn/no-lonely-if': NoLonelyIfRuleConfig;
}
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-negated-condition.md)
*/
type NoNegatedConditionRuleConfig = RuleConfig<[]>;
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-negated-condition.md)
*/
interface NoNegatedConditionRule {
/**
* Disallow negated conditions.
*
* @see [no-negated-condition](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-negated-condition.md)
*/
'unicorn/no-negated-condition': NoNegatedConditionRuleConfig;
}
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-nested-ternary.md)
*/
type NoNestedTernaryRuleConfig = RuleConfig<[]>;
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-nested-ternary.md)
*/
interface NoNestedTernaryRule {
/**
* Disallow nested ternary expressions.
*
* @see [no-nested-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-nested-ternary.md)
*/
'unicorn/no-nested-ternary': NoNestedTernaryRuleConfig;
}
/**
* Disallow `new Array()`.
*
* @see [no-new-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-array.md)
*/
type NoNewArrayRuleConfig = RuleConfig<[]>;
/**
* Disallow `new Array()`.
*
* @see [no-new-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-array.md)
*/
interface NoNewArrayRule {
/**
* Disallow `new Array()`.
*
* @see [no-new-array](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-array.md)
*/
'unicorn/no-new-array': NoNewArrayRuleConfig;
}
/**
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
*
* @see [no-new-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-buffer.md)
*/
type NoNewBufferRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
*
* @see [no-new-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-buffer.md)
*/
interface NoNewBufferRule {
/**
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
*
* @see [no-new-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-new-buffer.md)
*/
'unicorn/no-new-buffer': NoNewBufferRuleConfig;
}
/**
* Option.
*/
interface NoNullOption {
checkStrictEquality?: boolean;
}
/**
* Options.
*/
type NoNullOptions = [NoNullOption?];
/**
* Disallow the use of the `null` literal.
*
* @see [no-null](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-null.md)
*/
type NoNullRuleConfig = RuleConfig<NoNullOptions>;
/**
* Disallow the use of the `null` literal.
*
* @see [no-null](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-null.md)
*/
interface NoNullRule {
/**
* Disallow the use of the `null` literal.
*
* @see [no-null](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-null.md)
*/
'unicorn/no-null': NoNullRuleConfig;
}
/**
* Disallow the use of objects as default parameters.
*
* @see [no-object-as-default-parameter](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-object-as-default-parameter.md)
*/
type NoObjectAsDefaultParameterRuleConfig = RuleConfig<[]>;
/**
* Disallow the use of objects as default parameters.
*
* @see [no-object-as-default-parameter](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-object-as-default-parameter.md)
*/
interface NoObjectAsDefaultParameterRule {
/**
* Disallow the use of objects as default parameters.
*
* @see [no-object-as-default-parameter](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-object-as-default-parameter.md)
*/
'unicorn/no-object-as-default-parameter': NoObjectAsDefaultParameterRuleConfig;
}
/**
* Disallow `process.exit()`.
*
* @see [no-process-exit](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-process-exit.md)
*/
type NoProcessExitRuleConfig = RuleConfig<[]>;
/**
* Disallow `process.exit()`.
*
* @see [no-process-exit](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-process-exit.md)
*/
interface NoProcessExitRule {
/**
* Disallow `process.exit()`.
*
* @see [no-process-exit](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-process-exit.md)
*/
'unicorn/no-process-exit': NoProcessExitRuleConfig;
}
/**
*
* @deprecated
*
* @see [no-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-reduce)
*/
type NoReduceRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [no-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-reduce)
*/
interface NoReduceRule {
/**
*
* @deprecated
*
* @see [no-reduce](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-reduce)
*/
'unicorn/no-reduce': NoReduceRuleConfig;
}
/**
* Disallow classes that only have static members.
*
* @see [no-static-only-class](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-static-only-class.md)
*/
type NoStaticOnlyClassRuleConfig = RuleConfig<[]>;
/**
* Disallow classes that only have static members.
*
* @see [no-static-only-class](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-static-only-class.md)
*/
interface NoStaticOnlyClassRule {
/**
* Disallow classes that only have static members.
*
* @see [no-static-only-class](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-static-only-class.md)
*/
'unicorn/no-static-only-class': NoStaticOnlyClassRuleConfig;
}
/**
* Disallow `then` property.
*
* @see [no-thenable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-thenable.md)
*/
type NoThenableRuleConfig = RuleConfig<[]>;
/**
* Disallow `then` property.
*
* @see [no-thenable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-thenable.md)
*/
interface NoThenableRule {
/**
* Disallow `then` property.
*
* @see [no-thenable](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-thenable.md)
*/
'unicorn/no-thenable': NoThenableRuleConfig;
}
/**
* Disallow assigning `this` to a variable.
*
* @see [no-this-assignment](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-this-assignment.md)
*/
type NoThisAssignmentRuleConfig = RuleConfig<[]>;
/**
* Disallow assigning `this` to a variable.
*
* @see [no-this-assignment](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-this-assignment.md)
*/
interface NoThisAssignmentRule {
/**
* Disallow assigning `this` to a variable.
*
* @see [no-this-assignment](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-this-assignment.md)
*/
'unicorn/no-this-assignment': NoThisAssignmentRuleConfig;
}
/**
* Option.
*/
interface NoTypeofUndefinedOption {
checkGlobalVariables?: boolean;
}
/**
* Options.
*/
type NoTypeofUndefinedOptions = [NoTypeofUndefinedOption?];
/**
* Disallow comparing `undefined` using `typeof`.
*
* @see [no-typeof-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-typeof-undefined.md)
*/
type NoTypeofUndefinedRuleConfig = RuleConfig<NoTypeofUndefinedOptions>;
/**
* Disallow comparing `undefined` using `typeof`.
*
* @see [no-typeof-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-typeof-undefined.md)
*/
interface NoTypeofUndefinedRule {
/**
* Disallow comparing `undefined` using `typeof`.
*
* @see [no-typeof-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-typeof-undefined.md)
*/
'unicorn/no-typeof-undefined': NoTypeofUndefinedRuleConfig;
}
/**
* Disallow awaiting non-promise values.
*
* @see [no-unnecessary-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unnecessary-await.md)
*/
type NoUnnecessaryAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow awaiting non-promise values.
*
* @see [no-unnecessary-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unnecessary-await.md)
*/
interface NoUnnecessaryAwaitRule {
/**
* Disallow awaiting non-promise values.
*
* @see [no-unnecessary-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unnecessary-await.md)
*/
'unicorn/no-unnecessary-await': NoUnnecessaryAwaitRuleConfig;
}
/**
* Disallow unreadable array destructuring.
*
* @see [no-unreadable-array-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-array-destructuring.md)
*/
type NoUnreadableArrayDestructuringRuleConfig = RuleConfig<[]>;
/**
* Disallow unreadable array destructuring.
*
* @see [no-unreadable-array-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-array-destructuring.md)
*/
interface NoUnreadableArrayDestructuringRule {
/**
* Disallow unreadable array destructuring.
*
* @see [no-unreadable-array-destructuring](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-array-destructuring.md)
*/
'unicorn/no-unreadable-array-destructuring': NoUnreadableArrayDestructuringRuleConfig;
}
/**
* Disallow unreadable IIFEs.
*
* @see [no-unreadable-iife](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-iife.md)
*/
type NoUnreadableIifeRuleConfig = RuleConfig<[]>;
/**
* Disallow unreadable IIFEs.
*
* @see [no-unreadable-iife](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-iife.md)
*/
interface NoUnreadableIifeRule {
/**
* Disallow unreadable IIFEs.
*
* @see [no-unreadable-iife](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unreadable-iife.md)
*/
'unicorn/no-unreadable-iife': NoUnreadableIifeRuleConfig;
}
/**
*
* @deprecated
*
* @see [no-unsafe-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-unsafe-regex)
*/
type NoUnsafeRegexRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [no-unsafe-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-unsafe-regex)
*/
interface NoUnsafeRegexRule {
/**
*
* @deprecated
*
* @see [no-unsafe-regex](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#no-unsafe-regex)
*/
'unicorn/no-unsafe-regex': NoUnsafeRegexRuleConfig;
}
/**
* Disallow unused object properties.
*
* @see [no-unused-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unused-properties.md)
*/
type NoUnusedPropertiesRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow unused object properties.
*
* @see [no-unused-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unused-properties.md)
*/
interface NoUnusedPropertiesRule$1 {
/**
* Disallow unused object properties.
*
* @see [no-unused-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-unused-properties.md)
*/
'unicorn/no-unused-properties': NoUnusedPropertiesRuleConfig$1;
}
/**
* Disallow useless fallback when spreading in object literals.
*
* @see [no-useless-fallback-in-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-fallback-in-spread.md)
*/
type NoUselessFallbackInSpreadRuleConfig = RuleConfig<[]>;
/**
* Disallow useless fallback when spreading in object literals.
*
* @see [no-useless-fallback-in-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-fallback-in-spread.md)
*/
interface NoUselessFallbackInSpreadRule {
/**
* Disallow useless fallback when spreading in object literals.
*
* @see [no-useless-fallback-in-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-fallback-in-spread.md)
*/
'unicorn/no-useless-fallback-in-spread': NoUselessFallbackInSpreadRuleConfig;
}
/**
* Disallow useless array length check.
*
* @see [no-useless-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-length-check.md)
*/
type NoUselessLengthCheckRuleConfig = RuleConfig<[]>;
/**
* Disallow useless array length check.
*
* @see [no-useless-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-length-check.md)
*/
interface NoUselessLengthCheckRule {
/**
* Disallow useless array length check.
*
* @see [no-useless-length-check](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-length-check.md)
*/
'unicorn/no-useless-length-check': NoUselessLengthCheckRuleConfig;
}
/**
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks.
*
* @see [no-useless-promise-resolve-reject](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-promise-resolve-reject.md)
*/
type NoUselessPromiseResolveRejectRuleConfig = RuleConfig<[]>;
/**
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks.
*
* @see [no-useless-promise-resolve-reject](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-promise-resolve-reject.md)
*/
interface NoUselessPromiseResolveRejectRule {
/**
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks.
*
* @see [no-useless-promise-resolve-reject](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-promise-resolve-reject.md)
*/
'unicorn/no-useless-promise-resolve-reject': NoUselessPromiseResolveRejectRuleConfig;
}
/**
* Disallow unnecessary spread.
*
* @see [no-useless-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-spread.md)
*/
type NoUselessSpreadRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary spread.
*
* @see [no-useless-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-spread.md)
*/
interface NoUselessSpreadRule {
/**
* Disallow unnecessary spread.
*
* @see [no-useless-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-spread.md)
*/
'unicorn/no-useless-spread': NoUselessSpreadRuleConfig;
}
/**
* Disallow useless case in switch statements.
*
* @see [no-useless-switch-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-switch-case.md)
*/
type NoUselessSwitchCaseRuleConfig = RuleConfig<[]>;
/**
* Disallow useless case in switch statements.
*
* @see [no-useless-switch-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-switch-case.md)
*/
interface NoUselessSwitchCaseRule {
/**
* Disallow useless case in switch statements.
*
* @see [no-useless-switch-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-switch-case.md)
*/
'unicorn/no-useless-switch-case': NoUselessSwitchCaseRuleConfig;
}
/**
* Option.
*/
interface NoUselessUndefinedOption {
checkArguments?: boolean;
}
/**
* Options.
*/
type NoUselessUndefinedOptions = [NoUselessUndefinedOption?];
/**
* Disallow useless `undefined`.
*
* @see [no-useless-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-undefined.md)
*/
type NoUselessUndefinedRuleConfig =
RuleConfig<NoUselessUndefinedOptions>;
/**
* Disallow useless `undefined`.
*
* @see [no-useless-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-undefined.md)
*/
interface NoUselessUndefinedRule {
/**
* Disallow useless `undefined`.
*
* @see [no-useless-undefined](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-useless-undefined.md)
*/
'unicorn/no-useless-undefined': NoUselessUndefinedRuleConfig;
}
/**
* Disallow number literals with zero fractions or dangling dots.
*
* @see [no-zero-fractions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-zero-fractions.md)
*/
type NoZeroFractionsRuleConfig = RuleConfig<[]>;
/**
* Disallow number literals with zero fractions or dangling dots.
*
* @see [no-zero-fractions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-zero-fractions.md)
*/
interface NoZeroFractionsRule {
/**
* Disallow number literals with zero fractions or dangling dots.
*
* @see [no-zero-fractions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/no-zero-fractions.md)
*/
'unicorn/no-zero-fractions': NoZeroFractionsRuleConfig;
}
/**
* Enforce proper case for numeric literals.
*
* @see [number-literal-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/number-literal-case.md)
*/
type NumberLiteralCaseRuleConfig = RuleConfig<[]>;
/**
* Enforce proper case for numeric literals.
*
* @see [number-literal-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/number-literal-case.md)
*/
interface NumberLiteralCaseRule {
/**
* Enforce proper case for numeric literals.
*
* @see [number-literal-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/number-literal-case.md)
*/
'unicorn/number-literal-case': NumberLiteralCaseRuleConfig;
}
/**
* Option.
*/
interface NumericSeparatorsStyleOption {
binary?: {
onlyIfContainsSeparator?: boolean;
minimumDigits?: number;
groupLength?: number;
};
octal?: {
onlyIfContainsSeparator?: boolean;
minimumDigits?: number;
groupLength?: number;
};
hexadecimal?: {
onlyIfContainsSeparator?: boolean;
minimumDigits?: number;
groupLength?: number;
};
number?: {
onlyIfContainsSeparator?: boolean;
minimumDigits?: number;
groupLength?: number;
};
onlyIfContainsSeparator?: boolean;
}
/**
* Options.
*/
type NumericSeparatorsStyleOptions = [NumericSeparatorsStyleOption?];
/**
* Enforce the style of numeric separators by correctly grouping digits.
*
* @see [numeric-separators-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/numeric-separators-style.md)
*/
type NumericSeparatorsStyleRuleConfig =
RuleConfig<NumericSeparatorsStyleOptions>;
/**
* Enforce the style of numeric separators by correctly grouping digits.
*
* @see [numeric-separators-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/numeric-separators-style.md)
*/
interface NumericSeparatorsStyleRule {
/**
* Enforce the style of numeric separators by correctly grouping digits.
*
* @see [numeric-separators-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/numeric-separators-style.md)
*/
'unicorn/numeric-separators-style': NumericSeparatorsStyleRuleConfig;
}
/**
* Option.
*/
interface PreferAddEventListenerOption {
excludedPackages?: string[];
}
/**
* Options.
*/
type PreferAddEventListenerOptions = [PreferAddEventListenerOption?];
/**
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
*
* @see [prefer-add-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-add-event-listener.md)
*/
type PreferAddEventListenerRuleConfig =
RuleConfig<PreferAddEventListenerOptions>;
/**
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
*
* @see [prefer-add-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-add-event-listener.md)
*/
interface PreferAddEventListenerRule {
/**
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
*
* @see [prefer-add-event-listener](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-add-event-listener.md)
*/
'unicorn/prefer-add-event-listener': PreferAddEventListenerRuleConfig;
}
/**
* Option.
*/
interface PreferArrayFindOption {
checkFromLast?: boolean;
}
/**
* Options.
*/
type PreferArrayFindOptions = [PreferArrayFindOption?];
/**
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
*
* @see [prefer-array-find](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-find.md)
*/
type PreferArrayFindRuleConfig = RuleConfig<PreferArrayFindOptions>;
/**
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
*
* @see [prefer-array-find](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-find.md)
*/
interface PreferArrayFindRule {
/**
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
*
* @see [prefer-array-find](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-find.md)
*/
'unicorn/prefer-array-find': PreferArrayFindRuleConfig;
}
/**
* Option.
*/
interface PreferArrayFlatOption {
functions?: any[];
}
/**
* Options.
*/
type PreferArrayFlatOptions = [PreferArrayFlatOption?];
/**
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
*
* @see [prefer-array-flat](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat.md)
*/
type PreferArrayFlatRuleConfig = RuleConfig<PreferArrayFlatOptions>;
/**
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
*
* @see [prefer-array-flat](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat.md)
*/
interface PreferArrayFlatRule {
/**
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
*
* @see [prefer-array-flat](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat.md)
*/
'unicorn/prefer-array-flat': PreferArrayFlatRuleConfig;
}
/**
* Prefer `.flatMap(…)` over `.map(…).flat()`.
*
* @see [prefer-array-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat-map.md)
*/
type PreferArrayFlatMapRuleConfig = RuleConfig<[]>;
/**
* Prefer `.flatMap(…)` over `.map(…).flat()`.
*
* @see [prefer-array-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat-map.md)
*/
interface PreferArrayFlatMapRule {
/**
* Prefer `.flatMap(…)` over `.map(…).flat()`.
*
* @see [prefer-array-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-flat-map.md)
*/
'unicorn/prefer-array-flat-map': PreferArrayFlatMapRuleConfig;
}
/**
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
*
* @see [prefer-array-index-of](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-index-of.md)
*/
type PreferArrayIndexOfRuleConfig = RuleConfig<[]>;
/**
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
*
* @see [prefer-array-index-of](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-index-of.md)
*/
interface PreferArrayIndexOfRule {
/**
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
*
* @see [prefer-array-index-of](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-index-of.md)
*/
'unicorn/prefer-array-index-of': PreferArrayIndexOfRuleConfig;
}
/**
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast}(…)`.
*
* @see [prefer-array-some](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-some.md)
*/
type PreferArraySomeRuleConfig = RuleConfig<[]>;
/**
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast}(…)`.
*
* @see [prefer-array-some](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-some.md)
*/
interface PreferArraySomeRule {
/**
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast}(…)`.
*
* @see [prefer-array-some](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-array-some.md)
*/
'unicorn/prefer-array-some': PreferArraySomeRuleConfig;
}
/**
* Option.
*/
interface PreferAtOption {
getLastElementFunctions?: any[];
checkAllIndexAccess?: boolean;
}
/**
* Options.
*/
type PreferAtOptions = [PreferAtOption?];
/**
* Prefer `.at()` method for index access and `String#charAt()`.
*
* @see [prefer-at](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-at.md)
*/
type PreferAtRuleConfig = RuleConfig<PreferAtOptions>;
/**
* Prefer `.at()` method for index access and `String#charAt()`.
*
* @see [prefer-at](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-at.md)
*/
interface PreferAtRule {
/**
* Prefer `.at()` method for index access and `String#charAt()`.
*
* @see [prefer-at](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-at.md)
*/
'unicorn/prefer-at': PreferAtRuleConfig;
}
/**
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
*
* @see [prefer-blob-reading-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-blob-reading-methods.md)
*/
type PreferBlobReadingMethodsRuleConfig = RuleConfig<[]>;
/**
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
*
* @see [prefer-blob-reading-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-blob-reading-methods.md)
*/
interface PreferBlobReadingMethodsRule {
/**
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
*
* @see [prefer-blob-reading-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-blob-reading-methods.md)
*/
'unicorn/prefer-blob-reading-methods': PreferBlobReadingMethodsRuleConfig;
}
/**
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
*
* @see [prefer-code-point](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-code-point.md)
*/
type PreferCodePointRuleConfig = RuleConfig<[]>;
/**
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
*
* @see [prefer-code-point](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-code-point.md)
*/
interface PreferCodePointRule {
/**
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
*
* @see [prefer-code-point](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-code-point.md)
*/
'unicorn/prefer-code-point': PreferCodePointRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-dataset)
*/
type PreferDatasetRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-dataset)
*/
interface PreferDatasetRule {
/**
*
* @deprecated
*
* @see [prefer-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-dataset)
*/
'unicorn/prefer-dataset': PreferDatasetRuleConfig;
}
/**
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
*
* @see [prefer-date-now](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-date-now.md)
*/
type PreferDateNowRuleConfig = RuleConfig<[]>;
/**
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
*
* @see [prefer-date-now](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-date-now.md)
*/
interface PreferDateNowRule {
/**
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
*
* @see [prefer-date-now](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-date-now.md)
*/
'unicorn/prefer-date-now': PreferDateNowRuleConfig;
}
/**
* Prefer default parameters over reassignment.
*
* @see [prefer-default-parameters](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-default-parameters.md)
*/
type PreferDefaultParametersRuleConfig = RuleConfig<[]>;
/**
* Prefer default parameters over reassignment.
*
* @see [prefer-default-parameters](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-default-parameters.md)
*/
interface PreferDefaultParametersRule {
/**
* Prefer default parameters over reassignment.
*
* @see [prefer-default-parameters](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-default-parameters.md)
*/
'unicorn/prefer-default-parameters': PreferDefaultParametersRuleConfig;
}
/**
* Prefer `Node#append()` over `Node#appendChild()`.
*
* @see [prefer-dom-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-append.md)
*/
type PreferDomNodeAppendRuleConfig = RuleConfig<[]>;
/**
* Prefer `Node#append()` over `Node#appendChild()`.
*
* @see [prefer-dom-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-append.md)
*/
interface PreferDomNodeAppendRule {
/**
* Prefer `Node#append()` over `Node#appendChild()`.
*
* @see [prefer-dom-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-append.md)
*/
'unicorn/prefer-dom-node-append': PreferDomNodeAppendRuleConfig;
}
/**
* Prefer using `.dataset` on DOM elements over calling attribute methods.
*
* @see [prefer-dom-node-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-dataset.md)
*/
type PreferDomNodeDatasetRuleConfig = RuleConfig<[]>;
/**
* Prefer using `.dataset` on DOM elements over calling attribute methods.
*
* @see [prefer-dom-node-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-dataset.md)
*/
interface PreferDomNodeDatasetRule {
/**
* Prefer using `.dataset` on DOM elements over calling attribute methods.
*
* @see [prefer-dom-node-dataset](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-dataset.md)
*/
'unicorn/prefer-dom-node-dataset': PreferDomNodeDatasetRuleConfig;
}
/**
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
*
* @see [prefer-dom-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-remove.md)
*/
type PreferDomNodeRemoveRuleConfig = RuleConfig<[]>;
/**
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
*
* @see [prefer-dom-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-remove.md)
*/
interface PreferDomNodeRemoveRule {
/**
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
*
* @see [prefer-dom-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-remove.md)
*/
'unicorn/prefer-dom-node-remove': PreferDomNodeRemoveRuleConfig;
}
/**
* Prefer `.textContent` over `.innerText`.
*
* @see [prefer-dom-node-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-text-content.md)
*/
type PreferDomNodeTextContentRuleConfig = RuleConfig<[]>;
/**
* Prefer `.textContent` over `.innerText`.
*
* @see [prefer-dom-node-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-text-content.md)
*/
interface PreferDomNodeTextContentRule {
/**
* Prefer `.textContent` over `.innerText`.
*
* @see [prefer-dom-node-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-dom-node-text-content.md)
*/
'unicorn/prefer-dom-node-text-content': PreferDomNodeTextContentRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-event-key)
*/
type PreferEventKeyRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-event-key)
*/
interface PreferEventKeyRule {
/**
*
* @deprecated
*
* @see [prefer-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-event-key)
*/
'unicorn/prefer-event-key': PreferEventKeyRuleConfig;
}
/**
* Prefer `EventTarget` over `EventEmitter`.
*
* @see [prefer-event-target](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-event-target.md)
*/
type PreferEventTargetRuleConfig = RuleConfig<[]>;
/**
* Prefer `EventTarget` over `EventEmitter`.
*
* @see [prefer-event-target](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-event-target.md)
*/
interface PreferEventTargetRule {
/**
* Prefer `EventTarget` over `EventEmitter`.
*
* @see [prefer-event-target](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-event-target.md)
*/
'unicorn/prefer-event-target': PreferEventTargetRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-exponentiation-operator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator)
*/
type PreferExponentiationOperatorRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-exponentiation-operator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator)
*/
interface PreferExponentiationOperatorRule {
/**
*
* @deprecated
*
* @see [prefer-exponentiation-operator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-exponentiation-operator)
*/
'unicorn/prefer-exponentiation-operator': PreferExponentiationOperatorRuleConfig;
}
/**
* Option.
*/
interface PreferExportFromOption {
ignoreUsedVariables?: boolean;
}
/**
* Options.
*/
type PreferExportFromOptions = [PreferExportFromOption?];
/**
* Prefer `export…from` when re-exporting.
*
* @see [prefer-export-from](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-export-from.md)
*/
type PreferExportFromRuleConfig = RuleConfig<PreferExportFromOptions>;
/**
* Prefer `export…from` when re-exporting.
*
* @see [prefer-export-from](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-export-from.md)
*/
interface PreferExportFromRule {
/**
* Prefer `export…from` when re-exporting.
*
* @see [prefer-export-from](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-export-from.md)
*/
'unicorn/prefer-export-from': PreferExportFromRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-flat-map)
*/
type PreferFlatMapRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-flat-map)
*/
interface PreferFlatMapRule {
/**
*
* @deprecated
*
* @see [prefer-flat-map](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-flat-map)
*/
'unicorn/prefer-flat-map': PreferFlatMapRuleConfig;
}
/**
* Prefer `.includes()` over `.indexOf()` and `Array#some()` when checking for existence or non-existence.
*
* @see [prefer-includes](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-includes.md)
*/
type PreferIncludesRuleConfig = RuleConfig<[]>;
/**
* Prefer `.includes()` over `.indexOf()` and `Array#some()` when checking for existence or non-existence.
*
* @see [prefer-includes](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-includes.md)
*/
interface PreferIncludesRule {
/**
* Prefer `.includes()` over `.indexOf()` and `Array#some()` when checking for existence or non-existence.
*
* @see [prefer-includes](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-includes.md)
*/
'unicorn/prefer-includes': PreferIncludesRuleConfig;
}
/**
* Prefer reading a JSON file as a buffer.
*
* @see [prefer-json-parse-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-json-parse-buffer.md)
*/
type PreferJsonParseBufferRuleConfig = RuleConfig<[]>;
/**
* Prefer reading a JSON file as a buffer.
*
* @see [prefer-json-parse-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-json-parse-buffer.md)
*/
interface PreferJsonParseBufferRule {
/**
* Prefer reading a JSON file as a buffer.
*
* @see [prefer-json-parse-buffer](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-json-parse-buffer.md)
*/
'unicorn/prefer-json-parse-buffer': PreferJsonParseBufferRuleConfig;
}
/**
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
*
* @see [prefer-keyboard-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-keyboard-event-key.md)
*/
type PreferKeyboardEventKeyRuleConfig = RuleConfig<[]>;
/**
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
*
* @see [prefer-keyboard-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-keyboard-event-key.md)
*/
interface PreferKeyboardEventKeyRule {
/**
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
*
* @see [prefer-keyboard-event-key](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-keyboard-event-key.md)
*/
'unicorn/prefer-keyboard-event-key': PreferKeyboardEventKeyRuleConfig;
}
/**
* Prefer using a logical operator over a ternary.
*
* @see [prefer-logical-operator-over-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-logical-operator-over-ternary.md)
*/
type PreferLogicalOperatorOverTernaryRuleConfig = RuleConfig<[]>;
/**
* Prefer using a logical operator over a ternary.
*
* @see [prefer-logical-operator-over-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-logical-operator-over-ternary.md)
*/
interface PreferLogicalOperatorOverTernaryRule {
/**
* Prefer using a logical operator over a ternary.
*
* @see [prefer-logical-operator-over-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-logical-operator-over-ternary.md)
*/
'unicorn/prefer-logical-operator-over-ternary': PreferLogicalOperatorOverTernaryRuleConfig;
}
/**
* Enforce the use of `Math.trunc` instead of bitwise operators.
*
* @see [prefer-math-trunc](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-math-trunc.md)
*/
type PreferMathTruncRuleConfig = RuleConfig<[]>;
/**
* Enforce the use of `Math.trunc` instead of bitwise operators.
*
* @see [prefer-math-trunc](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-math-trunc.md)
*/
interface PreferMathTruncRule {
/**
* Enforce the use of `Math.trunc` instead of bitwise operators.
*
* @see [prefer-math-trunc](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-math-trunc.md)
*/
'unicorn/prefer-math-trunc': PreferMathTruncRuleConfig;
}
/**
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
*
* @see [prefer-modern-dom-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-dom-apis.md)
*/
type PreferModernDomApisRuleConfig = RuleConfig<[]>;
/**
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
*
* @see [prefer-modern-dom-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-dom-apis.md)
*/
interface PreferModernDomApisRule {
/**
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
*
* @see [prefer-modern-dom-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-dom-apis.md)
*/
'unicorn/prefer-modern-dom-apis': PreferModernDomApisRuleConfig;
}
/**
* Prefer modern `Math` APIs over legacy patterns.
*
* @see [prefer-modern-math-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-math-apis.md)
*/
type PreferModernMathApisRuleConfig = RuleConfig<[]>;
/**
* Prefer modern `Math` APIs over legacy patterns.
*
* @see [prefer-modern-math-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-math-apis.md)
*/
interface PreferModernMathApisRule {
/**
* Prefer modern `Math` APIs over legacy patterns.
*
* @see [prefer-modern-math-apis](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-modern-math-apis.md)
*/
'unicorn/prefer-modern-math-apis': PreferModernMathApisRuleConfig;
}
/**
* Prefer JavaScript modules (ESM) over CommonJS.
*
* @see [prefer-module](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-module.md)
*/
type PreferModuleRuleConfig = RuleConfig<[]>;
/**
* Prefer JavaScript modules (ESM) over CommonJS.
*
* @see [prefer-module](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-module.md)
*/
interface PreferModuleRule {
/**
* Prefer JavaScript modules (ESM) over CommonJS.
*
* @see [prefer-module](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-module.md)
*/
'unicorn/prefer-module': PreferModuleRuleConfig;
}
/**
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
*
* @see [prefer-native-coercion-functions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-native-coercion-functions.md)
*/
type PreferNativeCoercionFunctionsRuleConfig = RuleConfig<[]>;
/**
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
*
* @see [prefer-native-coercion-functions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-native-coercion-functions.md)
*/
interface PreferNativeCoercionFunctionsRule {
/**
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
*
* @see [prefer-native-coercion-functions](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-native-coercion-functions.md)
*/
'unicorn/prefer-native-coercion-functions': PreferNativeCoercionFunctionsRuleConfig;
}
/**
* Prefer negative index over `.length - index` when possible.
*
* @see [prefer-negative-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-negative-index.md)
*/
type PreferNegativeIndexRuleConfig = RuleConfig<[]>;
/**
* Prefer negative index over `.length - index` when possible.
*
* @see [prefer-negative-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-negative-index.md)
*/
interface PreferNegativeIndexRule {
/**
* Prefer negative index over `.length - index` when possible.
*
* @see [prefer-negative-index](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-negative-index.md)
*/
'unicorn/prefer-negative-index': PreferNegativeIndexRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-append)
*/
type PreferNodeAppendRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-append)
*/
interface PreferNodeAppendRule {
/**
*
* @deprecated
*
* @see [prefer-node-append](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-append)
*/
'unicorn/prefer-node-append': PreferNodeAppendRuleConfig;
}
/**
* Prefer using the `node:` protocol when importing Node.js builtin modules.
*
* @see [prefer-node-protocol](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-node-protocol.md)
*/
type PreferNodeProtocolRuleConfig = RuleConfig<[]>;
/**
* Prefer using the `node:` protocol when importing Node.js builtin modules.
*
* @see [prefer-node-protocol](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-node-protocol.md)
*/
interface PreferNodeProtocolRule {
/**
* Prefer using the `node:` protocol when importing Node.js builtin modules.
*
* @see [prefer-node-protocol](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-node-protocol.md)
*/
'unicorn/prefer-node-protocol': PreferNodeProtocolRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-remove)
*/
type PreferNodeRemoveRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-remove)
*/
interface PreferNodeRemoveRule {
/**
*
* @deprecated
*
* @see [prefer-node-remove](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-node-remove)
*/
'unicorn/prefer-node-remove': PreferNodeRemoveRuleConfig;
}
/**
* Option.
*/
interface PreferNumberPropertiesOption {
checkInfinity?: boolean;
}
/**
* Options.
*/
type PreferNumberPropertiesOptions = [PreferNumberPropertiesOption?];
/**
* Prefer `Number` static properties over global ones.
*
* @see [prefer-number-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-number-properties.md)
*/
type PreferNumberPropertiesRuleConfig =
RuleConfig<PreferNumberPropertiesOptions>;
/**
* Prefer `Number` static properties over global ones.
*
* @see [prefer-number-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-number-properties.md)
*/
interface PreferNumberPropertiesRule {
/**
* Prefer `Number` static properties over global ones.
*
* @see [prefer-number-properties](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-number-properties.md)
*/
'unicorn/prefer-number-properties': PreferNumberPropertiesRuleConfig;
}
/**
* Option.
*/
interface PreferObjectFromEntriesOption {
functions?: any[];
}
/**
* Options.
*/
type PreferObjectFromEntriesOptions = [PreferObjectFromEntriesOption?];
/**
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
*
* @see [prefer-object-from-entries](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-object-from-entries.md)
*/
type PreferObjectFromEntriesRuleConfig =
RuleConfig<PreferObjectFromEntriesOptions>;
/**
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
*
* @see [prefer-object-from-entries](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-object-from-entries.md)
*/
interface PreferObjectFromEntriesRule {
/**
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
*
* @see [prefer-object-from-entries](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-object-from-entries.md)
*/
'unicorn/prefer-object-from-entries': PreferObjectFromEntriesRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-object-has-own](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-object-has-own)
*/
type PreferObjectHasOwnRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-object-has-own](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-object-has-own)
*/
interface PreferObjectHasOwnRule {
/**
*
* @deprecated
*
* @see [prefer-object-has-own](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-object-has-own)
*/
'unicorn/prefer-object-has-own': PreferObjectHasOwnRuleConfig;
}
/**
* Prefer omitting the `catch` binding parameter.
*
* @see [prefer-optional-catch-binding](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-optional-catch-binding.md)
*/
type PreferOptionalCatchBindingRuleConfig = RuleConfig<[]>;
/**
* Prefer omitting the `catch` binding parameter.
*
* @see [prefer-optional-catch-binding](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-optional-catch-binding.md)
*/
interface PreferOptionalCatchBindingRule {
/**
* Prefer omitting the `catch` binding parameter.
*
* @see [prefer-optional-catch-binding](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-optional-catch-binding.md)
*/
'unicorn/prefer-optional-catch-binding': PreferOptionalCatchBindingRuleConfig;
}
/**
* Prefer borrowing methods from the prototype instead of the instance.
*
* @see [prefer-prototype-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-prototype-methods.md)
*/
type PreferPrototypeMethodsRuleConfig = RuleConfig<[]>;
/**
* Prefer borrowing methods from the prototype instead of the instance.
*
* @see [prefer-prototype-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-prototype-methods.md)
*/
interface PreferPrototypeMethodsRule {
/**
* Prefer borrowing methods from the prototype instead of the instance.
*
* @see [prefer-prototype-methods](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-prototype-methods.md)
*/
'unicorn/prefer-prototype-methods': PreferPrototypeMethodsRuleConfig;
}
/**
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
*
* @see [prefer-query-selector](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-query-selector.md)
*/
type PreferQuerySelectorRuleConfig = RuleConfig<[]>;
/**
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
*
* @see [prefer-query-selector](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-query-selector.md)
*/
interface PreferQuerySelectorRule {
/**
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
*
* @see [prefer-query-selector](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-query-selector.md)
*/
'unicorn/prefer-query-selector': PreferQuerySelectorRuleConfig;
}
/**
* Prefer `Reflect.apply()` over `Function#apply()`.
*
* @see [prefer-reflect-apply](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-reflect-apply.md)
*/
type PreferReflectApplyRuleConfig = RuleConfig<[]>;
/**
* Prefer `Reflect.apply()` over `Function#apply()`.
*
* @see [prefer-reflect-apply](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-reflect-apply.md)
*/
interface PreferReflectApplyRule {
/**
* Prefer `Reflect.apply()` over `Function#apply()`.
*
* @see [prefer-reflect-apply](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-reflect-apply.md)
*/
'unicorn/prefer-reflect-apply': PreferReflectApplyRuleConfig;
}
/**
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
*
* @see [prefer-regexp-test](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-regexp-test.md)
*/
type PreferRegexpTestRuleConfig = RuleConfig<[]>;
/**
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
*
* @see [prefer-regexp-test](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-regexp-test.md)
*/
interface PreferRegexpTestRule {
/**
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
*
* @see [prefer-regexp-test](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-regexp-test.md)
*/
'unicorn/prefer-regexp-test': PreferRegexpTestRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-replace-all)
*/
type PreferReplaceAllRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-replace-all)
*/
interface PreferReplaceAllRule {
/**
*
* @deprecated
*
* @see [prefer-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-replace-all)
*/
'unicorn/prefer-replace-all': PreferReplaceAllRuleConfig;
}
/**
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
*
* @see [prefer-set-has](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-has.md)
*/
type PreferSetHasRuleConfig = RuleConfig<[]>;
/**
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
*
* @see [prefer-set-has](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-has.md)
*/
interface PreferSetHasRule {
/**
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
*
* @see [prefer-set-has](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-has.md)
*/
'unicorn/prefer-set-has': PreferSetHasRuleConfig;
}
/**
* Prefer using `Set#size` instead of `Array#length`.
*
* @see [prefer-set-size](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-size.md)
*/
type PreferSetSizeRuleConfig = RuleConfig<[]>;
/**
* Prefer using `Set#size` instead of `Array#length`.
*
* @see [prefer-set-size](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-size.md)
*/
interface PreferSetSizeRule {
/**
* Prefer using `Set#size` instead of `Array#length`.
*
* @see [prefer-set-size](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-set-size.md)
*/
'unicorn/prefer-set-size': PreferSetSizeRuleConfig;
}
/**
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
*
* @see [prefer-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-spread.md)
*/
type PreferSpreadRuleConfig = RuleConfig<[]>;
/**
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
*
* @see [prefer-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-spread.md)
*/
interface PreferSpreadRule {
/**
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
*
* @see [prefer-spread](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-spread.md)
*/
'unicorn/prefer-spread': PreferSpreadRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-starts-ends-with)
*/
type PreferStartsEndsWithRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-starts-ends-with)
*/
interface PreferStartsEndsWithRule {
/**
*
* @deprecated
*
* @see [prefer-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-starts-ends-with)
*/
'unicorn/prefer-starts-ends-with': PreferStartsEndsWithRuleConfig;
}
/**
* Prefer `String#replaceAll()` over regex searches with the global flag.
*
* @see [prefer-string-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-replace-all.md)
*/
type PreferStringReplaceAllRuleConfig = RuleConfig<[]>;
/**
* Prefer `String#replaceAll()` over regex searches with the global flag.
*
* @see [prefer-string-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-replace-all.md)
*/
interface PreferStringReplaceAllRule {
/**
* Prefer `String#replaceAll()` over regex searches with the global flag.
*
* @see [prefer-string-replace-all](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-replace-all.md)
*/
'unicorn/prefer-string-replace-all': PreferStringReplaceAllRuleConfig;
}
/**
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
*
* @see [prefer-string-slice](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-slice.md)
*/
type PreferStringSliceRuleConfig = RuleConfig<[]>;
/**
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
*
* @see [prefer-string-slice](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-slice.md)
*/
interface PreferStringSliceRule {
/**
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
*
* @see [prefer-string-slice](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-slice.md)
*/
'unicorn/prefer-string-slice': PreferStringSliceRuleConfig;
}
/**
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
*
* @see [prefer-string-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-starts-ends-with.md)
*/
type PreferStringStartsEndsWithRuleConfig = RuleConfig<[]>;
/**
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
*
* @see [prefer-string-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-starts-ends-with.md)
*/
interface PreferStringStartsEndsWithRule {
/**
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
*
* @see [prefer-string-starts-ends-with](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-starts-ends-with.md)
*/
'unicorn/prefer-string-starts-ends-with': PreferStringStartsEndsWithRuleConfig;
}
/**
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
*
* @see [prefer-string-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-trim-start-end.md)
*/
type PreferStringTrimStartEndRuleConfig = RuleConfig<[]>;
/**
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
*
* @see [prefer-string-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-trim-start-end.md)
*/
interface PreferStringTrimStartEndRule {
/**
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
*
* @see [prefer-string-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-string-trim-start-end.md)
*/
'unicorn/prefer-string-trim-start-end': PreferStringTrimStartEndRuleConfig;
}
/**
* Option.
*/
interface PreferSwitchOption {
minimumCases?: number;
emptyDefaultCase?:
| 'no-default-comment'
| 'do-nothing-comment'
| 'no-default-case';
}
/**
* Options.
*/
type PreferSwitchOptions = [PreferSwitchOption?];
/**
* Prefer `switch` over multiple `else-if`.
*
* @see [prefer-switch](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-switch.md)
*/
type PreferSwitchRuleConfig = RuleConfig<PreferSwitchOptions>;
/**
* Prefer `switch` over multiple `else-if`.
*
* @see [prefer-switch](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-switch.md)
*/
interface PreferSwitchRule {
/**
* Prefer `switch` over multiple `else-if`.
*
* @see [prefer-switch](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-switch.md)
*/
'unicorn/prefer-switch': PreferSwitchRuleConfig;
}
/**
* Option.
*/
type PreferTernaryOption = 'always' | 'only-single-line';
/**
* Options.
*/
type PreferTernaryOptions = [PreferTernaryOption?];
/**
* Prefer ternary expressions over simple `if-else` statements.
*
* @see [prefer-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-ternary.md)
*/
type PreferTernaryRuleConfig = RuleConfig<PreferTernaryOptions>;
/**
* Prefer ternary expressions over simple `if-else` statements.
*
* @see [prefer-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-ternary.md)
*/
interface PreferTernaryRule {
/**
* Prefer ternary expressions over simple `if-else` statements.
*
* @see [prefer-ternary](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-ternary.md)
*/
'unicorn/prefer-ternary': PreferTernaryRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-text-content)
*/
type PreferTextContentRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-text-content)
*/
interface PreferTextContentRule {
/**
*
* @deprecated
*
* @see [prefer-text-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-text-content)
*/
'unicorn/prefer-text-content': PreferTextContentRuleConfig;
}
/**
* Prefer top-level await over top-level promises and async function calls.
*
* @see [prefer-top-level-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-top-level-await.md)
*/
type PreferTopLevelAwaitRuleConfig = RuleConfig<[]>;
/**
* Prefer top-level await over top-level promises and async function calls.
*
* @see [prefer-top-level-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-top-level-await.md)
*/
interface PreferTopLevelAwaitRule {
/**
* Prefer top-level await over top-level promises and async function calls.
*
* @see [prefer-top-level-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-top-level-await.md)
*/
'unicorn/prefer-top-level-await': PreferTopLevelAwaitRuleConfig;
}
/**
*
* @deprecated
*
* @see [prefer-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-trim-start-end)
*/
type PreferTrimStartEndRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [prefer-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-trim-start-end)
*/
interface PreferTrimStartEndRule {
/**
*
* @deprecated
*
* @see [prefer-trim-start-end](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#prefer-trim-start-end)
*/
'unicorn/prefer-trim-start-end': PreferTrimStartEndRuleConfig;
}
/**
* Enforce throwing `TypeError` in type checking conditions.
*
* @see [prefer-type-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-type-error.md)
*/
type PreferTypeErrorRuleConfig = RuleConfig<[]>;
/**
* Enforce throwing `TypeError` in type checking conditions.
*
* @see [prefer-type-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-type-error.md)
*/
interface PreferTypeErrorRule {
/**
* Enforce throwing `TypeError` in type checking conditions.
*
* @see [prefer-type-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-type-error.md)
*/
'unicorn/prefer-type-error': PreferTypeErrorRuleConfig;
}
/**
* Option.
*/
type PreventAbbreviationsOption =
| []
| [
{
checkProperties?: boolean;
checkVariables?: boolean;
checkDefaultAndNamespaceImports?: boolean | string;
checkShorthandImports?: boolean | string;
checkShorthandProperties?: boolean;
checkFilenames?: boolean;
extendDefaultReplacements?: boolean;
replacements?: Abbreviations;
extendDefaultAllowList?: boolean;
allowList?: BooleanObject;
ignore?: any[];
},
];
type Replacements = false | BooleanObject;
interface Abbreviations {
[k: string]: Replacements;
}
interface BooleanObject {
[k: string]: boolean;
}
/**
* Options.
*/
type PreventAbbreviationsOptions = PreventAbbreviationsOption;
/**
* Prevent abbreviations.
*
* @see [prevent-abbreviations](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prevent-abbreviations.md)
*/
type PreventAbbreviationsRuleConfig =
RuleConfig<PreventAbbreviationsOptions>;
/**
* Prevent abbreviations.
*
* @see [prevent-abbreviations](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prevent-abbreviations.md)
*/
interface PreventAbbreviationsRule {
/**
* Prevent abbreviations.
*
* @see [prevent-abbreviations](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prevent-abbreviations.md)
*/
'unicorn/prevent-abbreviations': PreventAbbreviationsRuleConfig;
}
/**
*
* @deprecated
*
* @see [regex-shorthand](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#regex-shorthand)
*/
type RegexShorthandRuleConfig = RuleConfig<[]>;
/**
*
* @deprecated
*
* @see [regex-shorthand](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#regex-shorthand)
*/
interface RegexShorthandRule {
/**
*
* @deprecated
*
* @see [regex-shorthand](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/deprecated-rules.md#regex-shorthand)
*/
'unicorn/regex-shorthand': RegexShorthandRuleConfig;
}
/**
* Option.
*/
type RelativeUrlStyleOption = 'never' | 'always';
/**
* Options.
*/
type RelativeUrlStyleOptions = [RelativeUrlStyleOption?];
/**
* Enforce consistent relative URL style.
*
* @see [relative-url-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/relative-url-style.md)
*/
type RelativeUrlStyleRuleConfig = RuleConfig<RelativeUrlStyleOptions>;
/**
* Enforce consistent relative URL style.
*
* @see [relative-url-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/relative-url-style.md)
*/
interface RelativeUrlStyleRule {
/**
* Enforce consistent relative URL style.
*
* @see [relative-url-style](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/relative-url-style.md)
*/
'unicorn/relative-url-style': RelativeUrlStyleRuleConfig;
}
/**
* Enforce using the separator argument with `Array#join()`.
*
* @see [require-array-join-separator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-array-join-separator.md)
*/
type RequireArrayJoinSeparatorRuleConfig = RuleConfig<[]>;
/**
* Enforce using the separator argument with `Array#join()`.
*
* @see [require-array-join-separator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-array-join-separator.md)
*/
interface RequireArrayJoinSeparatorRule {
/**
* Enforce using the separator argument with `Array#join()`.
*
* @see [require-array-join-separator](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-array-join-separator.md)
*/
'unicorn/require-array-join-separator': RequireArrayJoinSeparatorRuleConfig;
}
/**
* Enforce using the digits argument with `Number#toFixed()`.
*
* @see [require-number-to-fixed-digits-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-number-to-fixed-digits-argument.md)
*/
type RequireNumberToFixedDigitsArgumentRuleConfig = RuleConfig<[]>;
/**
* Enforce using the digits argument with `Number#toFixed()`.
*
* @see [require-number-to-fixed-digits-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-number-to-fixed-digits-argument.md)
*/
interface RequireNumberToFixedDigitsArgumentRule {
/**
* Enforce using the digits argument with `Number#toFixed()`.
*
* @see [require-number-to-fixed-digits-argument](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-number-to-fixed-digits-argument.md)
*/
'unicorn/require-number-to-fixed-digits-argument': RequireNumberToFixedDigitsArgumentRuleConfig;
}
/**
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
*
* @see [require-post-message-target-origin](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-post-message-target-origin.md)
*/
type RequirePostMessageTargetOriginRuleConfig = RuleConfig<[]>;
/**
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
*
* @see [require-post-message-target-origin](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-post-message-target-origin.md)
*/
interface RequirePostMessageTargetOriginRule {
/**
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
*
* @see [require-post-message-target-origin](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/require-post-message-target-origin.md)
*/
'unicorn/require-post-message-target-origin': RequirePostMessageTargetOriginRuleConfig;
}
/**
* Option.
*/
interface StringContentOption {
patterns?: {
[k: string]:
| string
| {
suggest: string;
fix?: boolean;
message?: string;
};
};
}
/**
* Options.
*/
type StringContentOptions = [StringContentOption?];
/**
* Enforce better string content.
*
* @see [string-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/string-content.md)
*/
type StringContentRuleConfig = RuleConfig<StringContentOptions>;
/**
* Enforce better string content.
*
* @see [string-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/string-content.md)
*/
interface StringContentRule {
/**
* Enforce better string content.
*
* @see [string-content](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/string-content.md)
*/
'unicorn/string-content': StringContentRuleConfig;
}
/**
* Option.
*/
type SwitchCaseBracesOption = 'always' | 'avoid';
/**
* Options.
*/
type SwitchCaseBracesOptions = [SwitchCaseBracesOption?];
/**
* Enforce consistent brace style for `case` clauses.
*
* @see [switch-case-braces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/switch-case-braces.md)
*/
type SwitchCaseBracesRuleConfig = RuleConfig<SwitchCaseBracesOptions>;
/**
* Enforce consistent brace style for `case` clauses.
*
* @see [switch-case-braces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/switch-case-braces.md)
*/
interface SwitchCaseBracesRule {
/**
* Enforce consistent brace style for `case` clauses.
*
* @see [switch-case-braces](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/switch-case-braces.md)
*/
'unicorn/switch-case-braces': SwitchCaseBracesRuleConfig;
}
/**
* Option.
*/
interface TemplateIndentOption {
indent?: string | number;
tags?: string[];
functions?: string[];
selectors?: string[];
comments?: string[];
}
/**
* Options.
*/
type TemplateIndentOptions = [TemplateIndentOption?];
/**
* Fix whitespace-insensitive template indentation.
*
* @see [template-indent](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/template-indent.md)
*/
type TemplateIndentRuleConfig = RuleConfig<TemplateIndentOptions>;
/**
* Fix whitespace-insensitive template indentation.
*
* @see [template-indent](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/template-indent.md)
*/
interface TemplateIndentRule {
/**
* Fix whitespace-insensitive template indentation.
*
* @see [template-indent](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/template-indent.md)
*/
'unicorn/template-indent': TemplateIndentRuleConfig;
}
/**
* Enforce consistent case for text encoding identifiers.
*
* @see [text-encoding-identifier-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/text-encoding-identifier-case.md)
*/
type TextEncodingIdentifierCaseRuleConfig = RuleConfig<[]>;
/**
* Enforce consistent case for text encoding identifiers.
*
* @see [text-encoding-identifier-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/text-encoding-identifier-case.md)
*/
interface TextEncodingIdentifierCaseRule {
/**
* Enforce consistent case for text encoding identifiers.
*
* @see [text-encoding-identifier-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/text-encoding-identifier-case.md)
*/
'unicorn/text-encoding-identifier-case': TextEncodingIdentifierCaseRuleConfig;
}
/**
* Require `new` when throwing an error.
*
* @see [throw-new-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/throw-new-error.md)
*/
type ThrowNewErrorRuleConfig = RuleConfig<[]>;
/**
* Require `new` when throwing an error.
*
* @see [throw-new-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/throw-new-error.md)
*/
interface ThrowNewErrorRule {
/**
* Require `new` when throwing an error.
*
* @see [throw-new-error](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/throw-new-error.md)
*/
'unicorn/throw-new-error': ThrowNewErrorRuleConfig;
}
/**
* All Unicorn rules.
*/
type UnicornRules = BetterRegexRule &
CatchErrorNameRule &
ConsistentDestructuringRule &
ConsistentFunctionScopingRule &
CustomErrorDefinitionRule &
EmptyBraceSpacesRule &
ErrorMessageRule &
EscapeCaseRule &
ExpiringTodoCommentsRule &
ExplicitLengthCheckRule &
FilenameCaseRule &
ImportStyleRule &
NewForBuiltinsRule &
NoAbusiveEslintDisableRule &
NoArrayCallbackReferenceRule &
NoArrayForEachRule &
NoArrayMethodThisArgumentRule &
NoArrayPushPushRule &
NoArrayReduceRule &
NoAwaitExpressionMemberRule &
NoConsoleSpacesRule &
NoDocumentCookieRule &
NoEmptyFileRule &
NoForLoopRule &
NoHexEscapeRule &
NoInstanceofArrayRule &
NoInvalidRemoveEventListenerRule &
NoKeywordPrefixRule &
NoLonelyIfRule &
NoNegatedConditionRule &
NoNestedTernaryRule &
NoNewArrayRule &
NoNewBufferRule &
NoNullRule &
NoObjectAsDefaultParameterRule &
NoProcessExitRule &
NoStaticOnlyClassRule &
NoThenableRule &
NoThisAssignmentRule &
NoTypeofUndefinedRule &
NoUnnecessaryAwaitRule &
NoUnreadableArrayDestructuringRule &
NoUnreadableIifeRule &
NoUnusedPropertiesRule$1 &
NoUselessFallbackInSpreadRule &
NoUselessLengthCheckRule &
NoUselessPromiseResolveRejectRule &
NoUselessSpreadRule &
NoUselessSwitchCaseRule &
NoUselessUndefinedRule &
NoZeroFractionsRule &
NumberLiteralCaseRule &
NumericSeparatorsStyleRule &
PreferAddEventListenerRule &
PreferArrayFindRule &
PreferArrayFlatMapRule &
PreferArrayFlatRule &
PreferArrayIndexOfRule &
PreferArraySomeRule &
PreferAtRule &
PreferBlobReadingMethodsRule &
PreferCodePointRule &
PreferDateNowRule &
PreferDefaultParametersRule &
PreferDomNodeAppendRule &
PreferDomNodeDatasetRule &
PreferDomNodeRemoveRule &
PreferDomNodeTextContentRule &
PreferEventTargetRule &
PreferExportFromRule &
PreferIncludesRule &
PreferJsonParseBufferRule &
PreferKeyboardEventKeyRule &
PreferLogicalOperatorOverTernaryRule &
PreferMathTruncRule &
PreferModernDomApisRule &
PreferModernMathApisRule &
PreferModuleRule &
PreferNativeCoercionFunctionsRule &
PreferNegativeIndexRule &
PreferNodeProtocolRule &
PreferNumberPropertiesRule &
PreferObjectFromEntriesRule &
PreferOptionalCatchBindingRule &
PreferPrototypeMethodsRule &
PreferQuerySelectorRule &
PreferReflectApplyRule &
PreferRegexpTestRule &
PreferSetHasRule &
PreferSetSizeRule &
PreferSpreadRule &
PreferStringReplaceAllRule &
PreferStringSliceRule &
PreferStringStartsEndsWithRule &
PreferStringTrimStartEndRule &
PreferSwitchRule &
PreferTernaryRule &
PreferTopLevelAwaitRule &
PreferTypeErrorRule &
PreventAbbreviationsRule &
RelativeUrlStyleRule &
RequireArrayJoinSeparatorRule &
RequireNumberToFixedDigitsArgumentRule &
RequirePostMessageTargetOriginRule &
StringContentRule &
SwitchCaseBracesRule &
TemplateIndentRule &
TextEncodingIdentifierCaseRule &
ThrowNewErrorRule &
ImportIndexRule &
NoArrayInstanceofRule &
NoFnReferenceInIteratorRule &
NoReduceRule &
NoUnsafeRegexRule &
PreferDatasetRule &
PreferEventKeyRule &
PreferExponentiationOperatorRule &
PreferFlatMapRule &
PreferNodeAppendRule &
PreferNodeRemoveRule &
PreferObjectHasOwnRule &
PreferReplaceAllRule &
PreferStartsEndsWithRule &
PreferTextContentRule &
PreferTrimStartEndRule &
RegexShorthandRule;
/**
* Option.
*/
interface ConsistentTestFilenameOption {
pattern?: string;
allTestPattern?: string;
}
/**
* Options.
*/
type ConsistentTestFilenameOptions = [ConsistentTestFilenameOption?];
/**
* Forbidden .spec test file pattern.
*
* @see [consistent-test-filename](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md)
*/
type ConsistentTestFilenameRuleConfig =
RuleConfig<ConsistentTestFilenameOptions>;
/**
* Forbidden .spec test file pattern.
*
* @see [consistent-test-filename](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md)
*/
interface ConsistentTestFilenameRule {
/**
* Forbidden .spec test file pattern.
*
* @see [consistent-test-filename](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md)
*/
'vitest/consistent-test-filename': ConsistentTestFilenameRuleConfig;
}
/**
* Option.
*/
interface ConsistentTestItOption {
fn?: 'test' | 'it';
withinDescribe?: 'test' | 'it';
}
/**
* Options.
*/
type ConsistentTestItOptions = [ConsistentTestItOption?];
/**
* Prefer test or it but not both.
*
* @see [consistent-test-it](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md)
*/
type ConsistentTestItRuleConfig = RuleConfig<ConsistentTestItOptions>;
/**
* Prefer test or it but not both.
*
* @see [consistent-test-it](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md)
*/
interface ConsistentTestItRule {
/**
* Prefer test or it but not both.
*
* @see [consistent-test-it](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md)
*/
'vitest/consistent-test-it': ConsistentTestItRuleConfig;
}
/**
* Option.
*/
interface ExpectExpectOption {
customExpressions?: any[];
}
/**
* Options.
*/
type ExpectExpectOptions = [ExpectExpectOption?];
/**
* Enforce having expectation in test body.
*
* @see [expect-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md)
*/
type ExpectExpectRuleConfig = RuleConfig<ExpectExpectOptions>;
/**
* Enforce having expectation in test body.
*
* @see [expect-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md)
*/
interface ExpectExpectRule {
/**
* Enforce having expectation in test body.
*
* @see [expect-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md)
*/
'vitest/expect-expect': ExpectExpectRuleConfig;
}
/**
* Option.
*/
interface MaxExpectsOption {
max?: number;
}
/**
* Options.
*/
type MaxExpectsOptions = [MaxExpectsOption?];
/**
* Enforce a maximum number of expect per test.
*
* @see [max-expects](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md)
*/
type MaxExpectsRuleConfig = RuleConfig<MaxExpectsOptions>;
/**
* Enforce a maximum number of expect per test.
*
* @see [max-expects](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md)
*/
interface MaxExpectsRule {
/**
* Enforce a maximum number of expect per test.
*
* @see [max-expects](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md)
*/
'vitest/max-expects': MaxExpectsRuleConfig;
}
/**
* Option.
*/
interface MaxNestedDescribeOption {
max?: number;
}
/**
* Options.
*/
type MaxNestedDescribeOptions = [MaxNestedDescribeOption?];
/**
* Nested describe block should be less than set max value or default value.
*
* @see [max-nested-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md)
*/
type MaxNestedDescribeRuleConfig = RuleConfig<MaxNestedDescribeOptions>;
/**
* Nested describe block should be less than set max value or default value.
*
* @see [max-nested-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md)
*/
interface MaxNestedDescribeRule {
/**
* Nested describe block should be less than set max value or default value.
*
* @see [max-nested-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md)
*/
'vitest/max-nested-describe': MaxNestedDescribeRuleConfig;
}
/**
* Disallow alias methods.
*
* @see [no-alias-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md)
*/
type NoAliasMethodsRuleConfig = RuleConfig<[]>;
/**
* Disallow alias methods.
*
* @see [no-alias-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md)
*/
interface NoAliasMethodsRule {
/**
* Disallow alias methods.
*
* @see [no-alias-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md)
*/
'vitest/no-alias-methods': NoAliasMethodsRuleConfig;
}
/**
* Disallow commented out tests.
*
* @see [no-commented-out-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md)
*/
type NoCommentedOutTestsRuleConfig = RuleConfig<[]>;
/**
* Disallow commented out tests.
*
* @see [no-commented-out-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md)
*/
interface NoCommentedOutTestsRule {
/**
* Disallow commented out tests.
*
* @see [no-commented-out-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md)
*/
'vitest/no-commented-out-tests': NoCommentedOutTestsRuleConfig;
}
/**
* Disallow conditional expects.
*
* @see [no-conditional-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md)
*/
type NoConditionalExpectRuleConfig = RuleConfig<[]>;
/**
* Disallow conditional expects.
*
* @see [no-conditional-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md)
*/
interface NoConditionalExpectRule {
/**
* Disallow conditional expects.
*
* @see [no-conditional-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md)
*/
'vitest/no-conditional-expect': NoConditionalExpectRuleConfig;
}
/**
* Disallow conditional tests.
*
* @see [no-conditional-in-test](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md)
*/
type NoConditionalInTestRuleConfig = RuleConfig<[]>;
/**
* Disallow conditional tests.
*
* @see [no-conditional-in-test](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md)
*/
interface NoConditionalInTestRule {
/**
* Disallow conditional tests.
*
* @see [no-conditional-in-test](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md)
*/
'vitest/no-conditional-in-test': NoConditionalInTestRuleConfig;
}
/**
* Disallow conditional tests.
*
* @see [no-conditional-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md)
*/
type NoConditionalTestsRuleConfig = RuleConfig<[]>;
/**
* Disallow conditional tests.
*
* @see [no-conditional-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md)
*/
interface NoConditionalTestsRule {
/**
* Disallow conditional tests.
*
* @see [no-conditional-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md)
*/
'vitest/no-conditional-tests': NoConditionalTestsRuleConfig;
}
/**
* Disallow disabled tests.
*
* @see [no-disabled-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md)
*/
type NoDisabledTestsRuleConfig = RuleConfig<[]>;
/**
* Disallow disabled tests.
*
* @see [no-disabled-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md)
*/
interface NoDisabledTestsRule {
/**
* Disallow disabled tests.
*
* @see [no-disabled-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md)
*/
'vitest/no-disabled-tests': NoDisabledTestsRuleConfig;
}
/**
* Disallow using a callback in asynchronous tests and hooks.
*
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
*/
type NoDoneCallbackRuleConfig = RuleConfig<[]>;
/**
* Disallow using a callback in asynchronous tests and hooks.
*
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
*/
interface NoDoneCallbackRule {
/**
* Disallow using a callback in asynchronous tests and hooks.
*
* @see [no-done-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md)
*/
'vitest/no-done-callback': NoDoneCallbackRuleConfig;
}
/**
* Disallow duplicate hooks and teardown hooks.
*
* @see [no-duplicate-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md)
*/
type NoDuplicateHooksRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate hooks and teardown hooks.
*
* @see [no-duplicate-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md)
*/
interface NoDuplicateHooksRule {
/**
* Disallow duplicate hooks and teardown hooks.
*
* @see [no-duplicate-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md)
*/
'vitest/no-duplicate-hooks': NoDuplicateHooksRuleConfig;
}
/**
* Disallow focused tests.
*
* @see [no-focused-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md)
*/
type NoFocusedTestsRuleConfig = RuleConfig<[]>;
/**
* Disallow focused tests.
*
* @see [no-focused-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md)
*/
interface NoFocusedTestsRule {
/**
* Disallow focused tests.
*
* @see [no-focused-tests](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md)
*/
'vitest/no-focused-tests': NoFocusedTestsRuleConfig;
}
/**
* Option.
*/
interface NoHooksOption {
allow?: any[];
}
/**
* Options.
*/
type NoHooksOptions = [NoHooksOption?];
/**
* Disallow setup and teardown hooks.
*
* @see [no-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md)
*/
type NoHooksRuleConfig = RuleConfig<NoHooksOptions>;
/**
* Disallow setup and teardown hooks.
*
* @see [no-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md)
*/
interface NoHooksRule {
/**
* Disallow setup and teardown hooks.
*
* @see [no-hooks](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md)
*/
'vitest/no-hooks': NoHooksRuleConfig;
}
/**
* Disallow identical titles.
*
* @see [no-identical-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md)
*/
type NoIdenticalTitleRuleConfig = RuleConfig<[]>;
/**
* Disallow identical titles.
*
* @see [no-identical-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md)
*/
interface NoIdenticalTitleRule {
/**
* Disallow identical titles.
*
* @see [no-identical-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md)
*/
'vitest/no-identical-title': NoIdenticalTitleRuleConfig;
}
/**
* Disallow string interpolation in snapshots.
*
* @see [no-interpolation-in-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md)
*/
type NoInterpolationInSnapshotsRuleConfig = RuleConfig<[]>;
/**
* Disallow string interpolation in snapshots.
*
* @see [no-interpolation-in-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md)
*/
interface NoInterpolationInSnapshotsRule {
/**
* Disallow string interpolation in snapshots.
*
* @see [no-interpolation-in-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md)
*/
'vitest/no-interpolation-in-snapshots': NoInterpolationInSnapshotsRuleConfig;
}
/**
* Option.
*/
interface NoLargeSnapshotsOption {
maxSize?: number;
inlineMaxSize?: number;
allowedSnapshots?: {
[k: string]: any[];
};
}
/**
* Options.
*/
type NoLargeSnapshotsOptions = [NoLargeSnapshotsOption?];
/**
* Disallow large snapshots.
*
* @see [no-large-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md)
*/
type NoLargeSnapshotsRuleConfig = RuleConfig<NoLargeSnapshotsOptions>;
/**
* Disallow large snapshots.
*
* @see [no-large-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md)
*/
interface NoLargeSnapshotsRule {
/**
* Disallow large snapshots.
*
* @see [no-large-snapshots](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md)
*/
'vitest/no-large-snapshots': NoLargeSnapshotsRuleConfig;
}
/**
* Disallow importing from __mocks__ directory.
*
* @see [no-mocks-import](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md)
*/
type NoMocksImportRuleConfig = RuleConfig<[]>;
/**
* Disallow importing from __mocks__ directory.
*
* @see [no-mocks-import](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md)
*/
interface NoMocksImportRule {
/**
* Disallow importing from __mocks__ directory.
*
* @see [no-mocks-import](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md)
*/
'vitest/no-mocks-import': NoMocksImportRuleConfig;
}
/**
* Option.
*/
interface NoRestrictedMatchersOption {
[k: string]: string | null;
}
/**
* Options.
*/
type NoRestrictedMatchersOptions = [NoRestrictedMatchersOption?];
/**
* Disallow the use of certain matchers.
*
* @see [no-restricted-matchers](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md)
*/
type NoRestrictedMatchersRuleConfig =
RuleConfig<NoRestrictedMatchersOptions>;
/**
* Disallow the use of certain matchers.
*
* @see [no-restricted-matchers](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md)
*/
interface NoRestrictedMatchersRule {
/**
* Disallow the use of certain matchers.
*
* @see [no-restricted-matchers](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md)
*/
'vitest/no-restricted-matchers': NoRestrictedMatchersRuleConfig;
}
/**
* Option.
*/
interface NoRestrictedViMethodsOption {
[k: string]: string | null;
}
/**
* Options.
*/
type NoRestrictedViMethodsOptions = [NoRestrictedViMethodsOption?];
/**
* Disallow specific `vi.` methods.
*
* @see [no-restricted-vi-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md)
*/
type NoRestrictedViMethodsRuleConfig =
RuleConfig<NoRestrictedViMethodsOptions>;
/**
* Disallow specific `vi.` methods.
*
* @see [no-restricted-vi-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md)
*/
interface NoRestrictedViMethodsRule {
/**
* Disallow specific `vi.` methods.
*
* @see [no-restricted-vi-methods](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md)
*/
'vitest/no-restricted-vi-methods': NoRestrictedViMethodsRuleConfig;
}
/**
* Option.
*/
interface NoStandaloneExpectOption {
additionalTestBlockFunctions?: string[];
}
/**
* Options.
*/
type NoStandaloneExpectOptions = [NoStandaloneExpectOption?];
/**
* Disallow using `expect` outside of `it` or `test` blocks.
*
* @see [no-standalone-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md)
*/
type NoStandaloneExpectRuleConfig =
RuleConfig<NoStandaloneExpectOptions>;
/**
* Disallow using `expect` outside of `it` or `test` blocks.
*
* @see [no-standalone-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md)
*/
interface NoStandaloneExpectRule {
/**
* Disallow using `expect` outside of `it` or `test` blocks.
*
* @see [no-standalone-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md)
*/
'vitest/no-standalone-expect': NoStandaloneExpectRuleConfig;
}
/**
* Disallow using `test` as a prefix.
*
* @see [no-test-prefixes](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md)
*/
type NoTestPrefixesRuleConfig = RuleConfig<[]>;
/**
* Disallow using `test` as a prefix.
*
* @see [no-test-prefixes](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md)
*/
interface NoTestPrefixesRule {
/**
* Disallow using `test` as a prefix.
*
* @see [no-test-prefixes](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md)
*/
'vitest/no-test-prefixes': NoTestPrefixesRuleConfig;
}
/**
* Disallow return statements in tests.
*
* @see [no-test-return-statement](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md)
*/
type NoTestReturnStatementRuleConfig = RuleConfig<[]>;
/**
* Disallow return statements in tests.
*
* @see [no-test-return-statement](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md)
*/
interface NoTestReturnStatementRule {
/**
* Disallow return statements in tests.
*
* @see [no-test-return-statement](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md)
*/
'vitest/no-test-return-statement': NoTestReturnStatementRuleConfig;
}
/**
* Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`.
*
* @see [prefer-called-with](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md)
*/
type PreferCalledWithRuleConfig = RuleConfig<[]>;
/**
* Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`.
*
* @see [prefer-called-with](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md)
*/
interface PreferCalledWithRule {
/**
* Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`.
*
* @see [prefer-called-with](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md)
*/
'vitest/prefer-called-with': PreferCalledWithRuleConfig;
}
/**
* Suggest using the built-in comparison matchers.
*
* @see [prefer-comparison-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md)
*/
type PreferComparisonMatcherRuleConfig = RuleConfig<[]>;
/**
* Suggest using the built-in comparison matchers.
*
* @see [prefer-comparison-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md)
*/
interface PreferComparisonMatcherRule {
/**
* Suggest using the built-in comparison matchers.
*
* @see [prefer-comparison-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md)
*/
'vitest/prefer-comparison-matcher': PreferComparisonMatcherRuleConfig;
}
/**
* Prefer `each` rather than manual loops.
*
* @see [prefer-each](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md)
*/
type PreferEachRuleConfig = RuleConfig<[]>;
/**
* Prefer `each` rather than manual loops.
*
* @see [prefer-each](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md)
*/
interface PreferEachRule {
/**
* Prefer `each` rather than manual loops.
*
* @see [prefer-each](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md)
*/
'vitest/prefer-each': PreferEachRuleConfig;
}
/**
* Suggest using the built-in quality matchers.
*
* @see [prefer-equality-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md)
*/
type PreferEqualityMatcherRuleConfig = RuleConfig<[]>;
/**
* Suggest using the built-in quality matchers.
*
* @see [prefer-equality-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md)
*/
interface PreferEqualityMatcherRule {
/**
* Suggest using the built-in quality matchers.
*
* @see [prefer-equality-matcher](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md)
*/
'vitest/prefer-equality-matcher': PreferEqualityMatcherRuleConfig;
}
/**
* Suggest using `expect().resolves` over `expect(await ...)` syntax.
*
* @see [prefer-expect-resolves](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md)
*/
type PreferExpectResolvesRuleConfig = RuleConfig<[]>;
/**
* Suggest using `expect().resolves` over `expect(await ...)` syntax.
*
* @see [prefer-expect-resolves](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md)
*/
interface PreferExpectResolvesRule {
/**
* Suggest using `expect().resolves` over `expect(await ...)` syntax.
*
* @see [prefer-expect-resolves](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md)
*/
'vitest/prefer-expect-resolves': PreferExpectResolvesRuleConfig;
}
/**
* Prefer having hooks in consistent order.
*
* @see [prefer-hooks-in-order](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md)
*/
type PreferHooksInOrderRuleConfig = RuleConfig<[]>;
/**
* Prefer having hooks in consistent order.
*
* @see [prefer-hooks-in-order](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md)
*/
interface PreferHooksInOrderRule {
/**
* Prefer having hooks in consistent order.
*
* @see [prefer-hooks-in-order](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md)
*/
'vitest/prefer-hooks-in-order': PreferHooksInOrderRuleConfig;
}
/**
* Suggest having hooks before any test cases.
*
* @see [prefer-hooks-on-top](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md)
*/
type PreferHooksOnTopRuleConfig = RuleConfig<[]>;
/**
* Suggest having hooks before any test cases.
*
* @see [prefer-hooks-on-top](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md)
*/
interface PreferHooksOnTopRule {
/**
* Suggest having hooks before any test cases.
*
* @see [prefer-hooks-on-top](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md)
*/
'vitest/prefer-hooks-on-top': PreferHooksOnTopRuleConfig;
}
/**
* Option.
*/
interface PreferLowercaseTitleOption {
ignore?: ('describe' | 'test' | 'it')[];
allowedPrefixes?: string[];
ignoreTopLevelDescribe?: boolean;
lowercaseFirstCharacterOnly?: boolean;
}
/**
* Options.
*/
type PreferLowercaseTitleOptions = [PreferLowercaseTitleOption?];
/**
* Enforce lowercase titles.
*
* @see [prefer-lowercase-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md)
*/
type PreferLowercaseTitleRuleConfig =
RuleConfig<PreferLowercaseTitleOptions>;
/**
* Enforce lowercase titles.
*
* @see [prefer-lowercase-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md)
*/
interface PreferLowercaseTitleRule {
/**
* Enforce lowercase titles.
*
* @see [prefer-lowercase-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md)
*/
'vitest/prefer-lowercase-title': PreferLowercaseTitleRuleConfig;
}
/**
* Prefer mock resolved/rejected shorthands for promises.
*
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
*/
type PreferMockPromiseShorthandRuleConfig = RuleConfig<[]>;
/**
* Prefer mock resolved/rejected shorthands for promises.
*
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
*/
interface PreferMockPromiseShorthandRule {
/**
* Prefer mock resolved/rejected shorthands for promises.
*
* @see [prefer-mock-promise-shorthand](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md)
*/
'vitest/prefer-mock-promise-shorthand': PreferMockPromiseShorthandRuleConfig;
}
/**
* Option.
*/
type PreferSnapshotHintOption = 'always' | 'multi';
/**
* Options.
*/
type PreferSnapshotHintOptions = [PreferSnapshotHintOption?];
/**
* Prefer including a hint with external snapshots.
*
* @see [prefer-snapshot-hint](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md)
*/
type PreferSnapshotHintRuleConfig =
RuleConfig<PreferSnapshotHintOptions>;
/**
* Prefer including a hint with external snapshots.
*
* @see [prefer-snapshot-hint](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md)
*/
interface PreferSnapshotHintRule {
/**
* Prefer including a hint with external snapshots.
*
* @see [prefer-snapshot-hint](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md)
*/
'vitest/prefer-snapshot-hint': PreferSnapshotHintRuleConfig;
}
/**
* Suggest using `vi.spyOn`.
*
* @see [prefer-spy-on](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md)
*/
type PreferSpyOnRuleConfig = RuleConfig<[]>;
/**
* Suggest using `vi.spyOn`.
*
* @see [prefer-spy-on](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md)
*/
interface PreferSpyOnRule {
/**
* Suggest using `vi.spyOn`.
*
* @see [prefer-spy-on](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md)
*/
'vitest/prefer-spy-on': PreferSpyOnRuleConfig;
}
/**
* Prefer strict equal over equal.
*
* @see [prefer-strict-equal](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md)
*/
type PreferStrictEqualRuleConfig = RuleConfig<[]>;
/**
* Prefer strict equal over equal.
*
* @see [prefer-strict-equal](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md)
*/
interface PreferStrictEqualRule {
/**
* Prefer strict equal over equal.
*
* @see [prefer-strict-equal](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md)
*/
'vitest/prefer-strict-equal': PreferStrictEqualRuleConfig;
}
/**
* Suggest using toBe().
*
* @see [prefer-to-be](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md)
*/
type PreferToBeRuleConfig = RuleConfig<[]>;
/**
* Suggest using toBe().
*
* @see [prefer-to-be](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md)
*/
interface PreferToBeRule {
/**
* Suggest using toBe().
*
* @see [prefer-to-be](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md)
*/
'vitest/prefer-to-be': PreferToBeRuleConfig;
}
/**
* Suggest using toBeFalsy().
*
* @see [prefer-to-be-falsy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md)
*/
type PreferToBeFalsyRuleConfig = RuleConfig<[]>;
/**
* Suggest using toBeFalsy().
*
* @see [prefer-to-be-falsy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md)
*/
interface PreferToBeFalsyRule {
/**
* Suggest using toBeFalsy().
*
* @see [prefer-to-be-falsy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md)
*/
'vitest/prefer-to-be-falsy': PreferToBeFalsyRuleConfig;
}
/**
* Prefer toBeObject().
*
* @see [prefer-to-be-object](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md)
*/
type PreferToBeObjectRuleConfig = RuleConfig<[]>;
/**
* Prefer toBeObject().
*
* @see [prefer-to-be-object](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md)
*/
interface PreferToBeObjectRule {
/**
* Prefer toBeObject().
*
* @see [prefer-to-be-object](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md)
*/
'vitest/prefer-to-be-object': PreferToBeObjectRuleConfig;
}
/**
* Suggest using `toBeTruthy`.
*
* @see [prefer-to-be-truthy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md)
*/
type PreferToBeTruthyRuleConfig = RuleConfig<[]>;
/**
* Suggest using `toBeTruthy`.
*
* @see [prefer-to-be-truthy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md)
*/
interface PreferToBeTruthyRule {
/**
* Suggest using `toBeTruthy`.
*
* @see [prefer-to-be-truthy](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md)
*/
'vitest/prefer-to-be-truthy': PreferToBeTruthyRuleConfig;
}
/**
* Prefer using toContain().
*
* @see [prefer-to-contain](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md)
*/
type PreferToContainRuleConfig = RuleConfig<[]>;
/**
* Prefer using toContain().
*
* @see [prefer-to-contain](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md)
*/
interface PreferToContainRule {
/**
* Prefer using toContain().
*
* @see [prefer-to-contain](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md)
*/
'vitest/prefer-to-contain': PreferToContainRuleConfig;
}
/**
* Suggest using toHaveLength().
*
* @see [prefer-to-have-length](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md)
*/
type PreferToHaveLengthRuleConfig = RuleConfig<[]>;
/**
* Suggest using toHaveLength().
*
* @see [prefer-to-have-length](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md)
*/
interface PreferToHaveLengthRule {
/**
* Suggest using toHaveLength().
*
* @see [prefer-to-have-length](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md)
*/
'vitest/prefer-to-have-length': PreferToHaveLengthRuleConfig;
}
/**
* Suggest using `test.todo`.
*
* @see [prefer-todo](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md)
*/
type PreferTodoRuleConfig = RuleConfig<[]>;
/**
* Suggest using `test.todo`.
*
* @see [prefer-todo](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md)
*/
interface PreferTodoRule {
/**
* Suggest using `test.todo`.
*
* @see [prefer-todo](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md)
*/
'vitest/prefer-todo': PreferTodoRuleConfig;
}
/**
* Option.
*/
interface RequireHookOption {
allowedFunctionCalls?: string[];
}
/**
* Options.
*/
type RequireHookOptions = [RequireHookOption?];
/**
* Require setup and teardown to be within a hook.
*
* @see [require-hook](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md)
*/
type RequireHookRuleConfig = RuleConfig<RequireHookOptions>;
/**
* Require setup and teardown to be within a hook.
*
* @see [require-hook](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md)
*/
interface RequireHookRule {
/**
* Require setup and teardown to be within a hook.
*
* @see [require-hook](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md)
*/
'vitest/require-hook': RequireHookRuleConfig;
}
/**
* Require toThrow() to be called with an error message.
*
* @see [require-to-throw-message](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md)
*/
type RequireToThrowMessageRuleConfig = RuleConfig<[]>;
/**
* Require toThrow() to be called with an error message.
*
* @see [require-to-throw-message](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md)
*/
interface RequireToThrowMessageRule {
/**
* Require toThrow() to be called with an error message.
*
* @see [require-to-throw-message](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md)
*/
'vitest/require-to-throw-message': RequireToThrowMessageRuleConfig;
}
/**
* Option.
*/
interface RequireTopLevelDescribeOption {
maxNumberOfTopLevelDescribes?: number;
}
/**
* Options.
*/
type RequireTopLevelDescribeOptions = [RequireTopLevelDescribeOption?];
/**
* Enforce that all tests are in a top-level describe.
*
* @see [require-top-level-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md)
*/
type RequireTopLevelDescribeRuleConfig =
RuleConfig<RequireTopLevelDescribeOptions>;
/**
* Enforce that all tests are in a top-level describe.
*
* @see [require-top-level-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md)
*/
interface RequireTopLevelDescribeRule {
/**
* Enforce that all tests are in a top-level describe.
*
* @see [require-top-level-describe](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md)
*/
'vitest/require-top-level-describe': RequireTopLevelDescribeRuleConfig;
}
/**
* Enforce valid describe callback.
*
* @see [valid-describe-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md)
*/
type ValidDescribeCallbackRuleConfig = RuleConfig<[]>;
/**
* Enforce valid describe callback.
*
* @see [valid-describe-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md)
*/
interface ValidDescribeCallbackRule {
/**
* Enforce valid describe callback.
*
* @see [valid-describe-callback](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md)
*/
'vitest/valid-describe-callback': ValidDescribeCallbackRuleConfig;
}
/**
* Option.
*/
interface ValidExpectOption {
alwaysAwait?: boolean;
asyncMatchers?: string[];
minArgs?: number;
maxArgs?: number;
}
/**
* Options.
*/
type ValidExpectOptions = [ValidExpectOption?];
/**
* Enforce valid `expect()` usage.
*
* @see [valid-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md)
*/
type ValidExpectRuleConfig = RuleConfig<ValidExpectOptions>;
/**
* Enforce valid `expect()` usage.
*
* @see [valid-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md)
*/
interface ValidExpectRule {
/**
* Enforce valid `expect()` usage.
*
* @see [valid-expect](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md)
*/
'vitest/valid-expect': ValidExpectRuleConfig;
}
/**
* Option.
*/
interface ValidTitleOption {
ignoreTypeOfDescribeName?: boolean;
allowArguments?: boolean;
disallowedWords?: string[];
[k: string]: any;
}
/**
* Options.
*/
type ValidTitleOptions = [ValidTitleOption?];
/**
* Enforce valid titles.
*
* @see [valid-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md)
*/
type ValidTitleRuleConfig = RuleConfig<ValidTitleOptions>;
/**
* Enforce valid titles.
*
* @see [valid-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md)
*/
interface ValidTitleRule {
/**
* Enforce valid titles.
*
* @see [valid-title](https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md)
*/
'vitest/valid-title': ValidTitleRuleConfig;
}
/**
* All Vitest rules.
*/
type VitestRules = MergeIntersection<
PreferLowercaseTitleRule &
MaxNestedDescribeRule &
NoIdenticalTitleRule &
NoFocusedTestsRule &
NoConditionalTestsRule &
ExpectExpectRule &
ConsistentTestItRule &
PreferToBeRule &
NoHooksRule &
NoRestrictedViMethodsRule &
ConsistentTestFilenameRule &
MaxExpectsRule &
NoAliasMethodsRule &
NoCommentedOutTestsRule &
NoConditionalExpectRule &
NoConditionalInTestRule &
NoDisabledTestsRule &
NoDoneCallbackRule &
NoDuplicateHooksRule &
NoLargeSnapshotsRule &
NoInterpolationInSnapshotsRule &
NoMocksImportRule &
NoRestrictedMatchersRule &
NoStandaloneExpectRule &
NoTestPrefixesRule &
NoTestReturnStatementRule &
PreferCalledWithRule &
ValidTitleRule &
ValidExpectRule &
PreferToBeFalsyRule &
PreferToBeObjectRule &
PreferToBeTruthyRule &
PreferToHaveLengthRule &
PreferEqualityMatcherRule &
PreferStrictEqualRule &
PreferExpectResolvesRule &
PreferEachRule &
PreferHooksOnTopRule &
PreferHooksInOrderRule &
PreferMockPromiseShorthandRule &
PreferSnapshotHintRule &
ValidDescribeCallbackRule &
RequireTopLevelDescribeRule &
RequireToThrowMessageRule &
RequireHookRule &
PreferTodoRule &
PreferSpyOnRule &
PreferComparisonMatcherRule &
PreferToContainRule
>;
/**
* Option.
*/
type ArrayBracketNewlineOption =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayBracketNewlineOptions = [ArrayBracketNewlineOption?];
/**
* Enforce linebreaks after opening and before closing array brackets in `<template>`.
*
* @see [array-bracket-newline](https://eslint.vuejs.org/rules/array-bracket-newline.html)
*/
type ArrayBracketNewlineRuleConfig =
RuleConfig<ArrayBracketNewlineOptions>;
/**
* Enforce linebreaks after opening and before closing array brackets in `<template>`.
*
* @see [array-bracket-newline](https://eslint.vuejs.org/rules/array-bracket-newline.html)
*/
interface ArrayBracketNewlineRule {
/**
* Enforce linebreaks after opening and before closing array brackets in `<template>`.
*
* @see [array-bracket-newline](https://eslint.vuejs.org/rules/array-bracket-newline.html)
*/
'vue/array-bracket-newline': ArrayBracketNewlineRuleConfig;
}
/**
* Config.
*/
interface ArrayBracketSpacingConfig {
singleValue?: boolean;
objectsInArrays?: boolean;
arraysInArrays?: boolean;
}
/**
* Option.
*/
type ArrayBracketSpacingOption = 'always' | 'never';
/**
* Options.
*/
type ArrayBracketSpacingOptions = [
ArrayBracketSpacingOption?,
ArrayBracketSpacingConfig?,
];
/**
* Enforce consistent spacing inside array brackets in `<template>`.
*
* @see [array-bracket-spacing](https://eslint.vuejs.org/rules/array-bracket-spacing.html)
*/
type ArrayBracketSpacingRuleConfig =
RuleConfig<ArrayBracketSpacingOptions>;
/**
* Enforce consistent spacing inside array brackets in `<template>`.
*
* @see [array-bracket-spacing](https://eslint.vuejs.org/rules/array-bracket-spacing.html)
*/
interface ArrayBracketSpacingRule {
/**
* Enforce consistent spacing inside array brackets in `<template>`.
*
* @see [array-bracket-spacing](https://eslint.vuejs.org/rules/array-bracket-spacing.html)
*/
'vue/array-bracket-spacing': ArrayBracketSpacingRuleConfig;
}
/**
* Option.
*/
type ArrayElementNewlineOption =
| []
| [
| BasicConfig
| {
ArrayExpression?: BasicConfig;
ArrayPattern?: BasicConfig;
},
];
type BasicConfig =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type ArrayElementNewlineOptions = ArrayElementNewlineOption;
/**
* Enforce line breaks after each array element in `<template>`.
*
* @see [array-element-newline](https://eslint.vuejs.org/rules/array-element-newline.html)
*/
type ArrayElementNewlineRuleConfig =
RuleConfig<ArrayElementNewlineOptions>;
/**
* Enforce line breaks after each array element in `<template>`.
*
* @see [array-element-newline](https://eslint.vuejs.org/rules/array-element-newline.html)
*/
interface ArrayElementNewlineRule {
/**
* Enforce line breaks after each array element in `<template>`.
*
* @see [array-element-newline](https://eslint.vuejs.org/rules/array-element-newline.html)
*/
'vue/array-element-newline': ArrayElementNewlineRuleConfig;
}
/**
* Option.
*/
interface ArrowSpacingOption {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type ArrowSpacingOptions = [ArrowSpacingOption?];
/**
* Enforce consistent spacing before and after the arrow in arrow functions in `<template>`.
*
* @see [arrow-spacing](https://eslint.vuejs.org/rules/arrow-spacing.html)
*/
type ArrowSpacingRuleConfig = RuleConfig<ArrowSpacingOptions>;
/**
* Enforce consistent spacing before and after the arrow in arrow functions in `<template>`.
*
* @see [arrow-spacing](https://eslint.vuejs.org/rules/arrow-spacing.html)
*/
interface ArrowSpacingRule {
/**
* Enforce consistent spacing before and after the arrow in arrow functions in `<template>`.
*
* @see [arrow-spacing](https://eslint.vuejs.org/rules/arrow-spacing.html)
*/
'vue/arrow-spacing': ArrowSpacingRuleConfig;
}
/**
* Config.
*/
interface AttributeHyphenationConfig {
ignore?: string[];
}
/**
* Option.
*/
type AttributeHyphenationOption = 'always' | 'never';
/**
* Options.
*/
type AttributeHyphenationOptions = [
AttributeHyphenationOption?,
AttributeHyphenationConfig?,
];
/**
* Enforce attribute naming style on custom components in template.
*
* @see [attribute-hyphenation](https://eslint.vuejs.org/rules/attribute-hyphenation.html)
*/
type AttributeHyphenationRuleConfig =
RuleConfig<AttributeHyphenationOptions>;
/**
* Enforce attribute naming style on custom components in template.
*
* @see [attribute-hyphenation](https://eslint.vuejs.org/rules/attribute-hyphenation.html)
*/
interface AttributeHyphenationRule {
/**
* Enforce attribute naming style on custom components in template.
*
* @see [attribute-hyphenation](https://eslint.vuejs.org/rules/attribute-hyphenation.html)
*/
'vue/attribute-hyphenation': AttributeHyphenationRuleConfig;
}
/**
* Option.
*/
interface AttributesOrderOption {
order?: (
| (
| 'DEFINITION'
| 'LIST_RENDERING'
| 'CONDITIONALS'
| 'RENDER_MODIFIERS'
| 'GLOBAL'
| 'UNIQUE'
| 'SLOT'
| 'TWO_WAY_BINDING'
| 'OTHER_DIRECTIVES'
| 'OTHER_ATTR'
| 'ATTR_STATIC'
| 'ATTR_DYNAMIC'
| 'ATTR_SHORTHAND_BOOL'
| 'EVENTS'
| 'CONTENT'
)
| (
| 'DEFINITION'
| 'LIST_RENDERING'
| 'CONDITIONALS'
| 'RENDER_MODIFIERS'
| 'GLOBAL'
| 'UNIQUE'
| 'SLOT'
| 'TWO_WAY_BINDING'
| 'OTHER_DIRECTIVES'
| 'OTHER_ATTR'
| 'ATTR_STATIC'
| 'ATTR_DYNAMIC'
| 'ATTR_SHORTHAND_BOOL'
| 'EVENTS'
| 'CONTENT'
)[]
)[];
alphabetical?: boolean;
}
/**
* Options.
*/
type AttributesOrderOptions = [AttributesOrderOption?];
/**
* Enforce order of attributes.
*
* @see [attributes-order](https://eslint.vuejs.org/rules/attributes-order.html)
*/
type AttributesOrderRuleConfig = RuleConfig<AttributesOrderOptions>;
/**
* Enforce order of attributes.
*
* @see [attributes-order](https://eslint.vuejs.org/rules/attributes-order.html)
*/
interface AttributesOrderRule {
/**
* Enforce order of attributes.
*
* @see [attributes-order](https://eslint.vuejs.org/rules/attributes-order.html)
*/
'vue/attributes-order': AttributesOrderRuleConfig;
}
/**
* Option.
*/
interface BlockLangOption {
/**
*/
[k: string]: {
lang?: string | string[];
allowNoLang?: boolean;
};
}
/**
* Options.
*/
type BlockLangOptions = [BlockLangOption?];
/**
* Disallow use other than available `lang`.
*
* @see [block-lang](https://eslint.vuejs.org/rules/block-lang.html)
*/
type BlockLangRuleConfig = RuleConfig<BlockLangOptions>;
/**
* Disallow use other than available `lang`.
*
* @see [block-lang](https://eslint.vuejs.org/rules/block-lang.html)
*/
interface BlockLangRule {
/**
* Disallow use other than available `lang`.
*
* @see [block-lang](https://eslint.vuejs.org/rules/block-lang.html)
*/
'vue/block-lang': BlockLangRuleConfig;
}
/**
* Option.
*/
interface BlockOrderOption {
order?: (string | string[])[];
}
/**
* Options.
*/
type BlockOrderOptions = [BlockOrderOption?];
/**
* Enforce order of component top-level elements.
*
* @see [block-order](https://eslint.vuejs.org/rules/block-order.html)
*/
type BlockOrderRuleConfig = RuleConfig<BlockOrderOptions>;
/**
* Enforce order of component top-level elements.
*
* @see [block-order](https://eslint.vuejs.org/rules/block-order.html)
*/
interface BlockOrderRule {
/**
* Enforce order of component top-level elements.
*
* @see [block-order](https://eslint.vuejs.org/rules/block-order.html)
*/
'vue/block-order': BlockOrderRuleConfig;
}
/**
* Option.
*/
type BlockSpacingOption = 'always' | 'never';
/**
* Options.
*/
type BlockSpacingOptions = [BlockSpacingOption?];
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`.
*
* @see [block-spacing](https://eslint.vuejs.org/rules/block-spacing.html)
*/
type BlockSpacingRuleConfig = RuleConfig<BlockSpacingOptions>;
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`.
*
* @see [block-spacing](https://eslint.vuejs.org/rules/block-spacing.html)
*/
interface BlockSpacingRule {
/**
* Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>`.
*
* @see [block-spacing](https://eslint.vuejs.org/rules/block-spacing.html)
*/
'vue/block-spacing': BlockSpacingRuleConfig;
}
/**
* Option.
*/
interface BlockTagNewlineOption {
singleline?: 'always' | 'never' | 'consistent' | 'ignore';
multiline?: 'always' | 'never' | 'consistent' | 'ignore';
maxEmptyLines?: number;
blocks?: {
/**
*/
[k: string]: {
singleline?: 'always' | 'never' | 'consistent' | 'ignore';
multiline?: 'always' | 'never' | 'consistent' | 'ignore';
maxEmptyLines?: number;
};
};
}
/**
* Options.
*/
type BlockTagNewlineOptions = [BlockTagNewlineOption?];
/**
* Enforce line breaks after opening and before closing block-level tags.
*
* @see [block-tag-newline](https://eslint.vuejs.org/rules/block-tag-newline.html)
*/
type BlockTagNewlineRuleConfig = RuleConfig<BlockTagNewlineOptions>;
/**
* Enforce line breaks after opening and before closing block-level tags.
*
* @see [block-tag-newline](https://eslint.vuejs.org/rules/block-tag-newline.html)
*/
interface BlockTagNewlineRule {
/**
* Enforce line breaks after opening and before closing block-level tags.
*
* @see [block-tag-newline](https://eslint.vuejs.org/rules/block-tag-newline.html)
*/
'vue/block-tag-newline': BlockTagNewlineRuleConfig;
}
/**
* Config.
*/
interface BraceStyleConfig {
allowSingleLine?: boolean;
}
/**
* Option.
*/
type BraceStyleOption = '1tbs' | 'stroustrup' | 'allman';
/**
* Options.
*/
type BraceStyleOptions = [BraceStyleOption?, BraceStyleConfig?];
/**
* Enforce consistent brace style for blocks in `<template>`.
*
* @see [brace-style](https://eslint.vuejs.org/rules/brace-style.html)
*/
type BraceStyleRuleConfig = RuleConfig<BraceStyleOptions>;
/**
* Enforce consistent brace style for blocks in `<template>`.
*
* @see [brace-style](https://eslint.vuejs.org/rules/brace-style.html)
*/
interface BraceStyleRule {
/**
* Enforce consistent brace style for blocks in `<template>`.
*
* @see [brace-style](https://eslint.vuejs.org/rules/brace-style.html)
*/
'vue/brace-style': BraceStyleRuleConfig;
}
/**
* Option.
*/
interface CamelcaseOption {
ignoreDestructuring?: boolean;
ignoreImports?: boolean;
ignoreGlobals?: boolean;
properties?: 'always' | 'never';
/**
* @minItems 0
*/
allow?: [] | [string];
}
/**
* Options.
*/
type CamelcaseOptions = [CamelcaseOption?];
/**
* Enforce camelcase naming convention in `<template>`.
*
* @see [camelcase](https://eslint.vuejs.org/rules/camelcase.html)
*/
type CamelcaseRuleConfig = RuleConfig<CamelcaseOptions>;
/**
* Enforce camelcase naming convention in `<template>`.
*
* @see [camelcase](https://eslint.vuejs.org/rules/camelcase.html)
*/
interface CamelcaseRule {
/**
* Enforce camelcase naming convention in `<template>`.
*
* @see [camelcase](https://eslint.vuejs.org/rules/camelcase.html)
*/
'vue/camelcase': CamelcaseRuleConfig;
}
/**
* Option.
*/
type CommaDangleOption =
| []
| [
| Value
| {
arrays?: ValueWithIgnore;
objects?: ValueWithIgnore;
imports?: ValueWithIgnore;
exports?: ValueWithIgnore;
functions?: ValueWithIgnore;
},
];
type Value = 'always-multiline' | 'always' | 'never' | 'only-multiline';
type ValueWithIgnore =
| 'always-multiline'
| 'always'
| 'ignore'
| 'never'
| 'only-multiline';
/**
* Options.
*/
type CommaDangleOptions = CommaDangleOption;
/**
* Require or disallow trailing commas in `<template>`.
*
* @see [comma-dangle](https://eslint.vuejs.org/rules/comma-dangle.html)
*/
type CommaDangleRuleConfig = RuleConfig<CommaDangleOptions>;
/**
* Require or disallow trailing commas in `<template>`.
*
* @see [comma-dangle](https://eslint.vuejs.org/rules/comma-dangle.html)
*/
interface CommaDangleRule {
/**
* Require or disallow trailing commas in `<template>`.
*
* @see [comma-dangle](https://eslint.vuejs.org/rules/comma-dangle.html)
*/
'vue/comma-dangle': CommaDangleRuleConfig;
}
/**
* Option.
*/
interface CommaSpacingOption {
before?: boolean;
after?: boolean;
}
/**
* Options.
*/
type CommaSpacingOptions = [CommaSpacingOption?];
/**
* Enforce consistent spacing before and after commas in `<template>`.
*
* @see [comma-spacing](https://eslint.vuejs.org/rules/comma-spacing.html)
*/
type CommaSpacingRuleConfig = RuleConfig<CommaSpacingOptions>;
/**
* Enforce consistent spacing before and after commas in `<template>`.
*
* @see [comma-spacing](https://eslint.vuejs.org/rules/comma-spacing.html)
*/
interface CommaSpacingRule {
/**
* Enforce consistent spacing before and after commas in `<template>`.
*
* @see [comma-spacing](https://eslint.vuejs.org/rules/comma-spacing.html)
*/
'vue/comma-spacing': CommaSpacingRuleConfig;
}
/**
* Config.
*/
interface CommaStyleConfig {
exceptions?: {
[k: string]: boolean;
};
}
/**
* Option.
*/
type CommaStyleOption = 'first' | 'last';
/**
* Options.
*/
type CommaStyleOptions = [CommaStyleOption?, CommaStyleConfig?];
/**
* Enforce consistent comma style in `<template>`.
*
* @see [comma-style](https://eslint.vuejs.org/rules/comma-style.html)
*/
type CommaStyleRuleConfig = RuleConfig<CommaStyleOptions>;
/**
* Enforce consistent comma style in `<template>`.
*
* @see [comma-style](https://eslint.vuejs.org/rules/comma-style.html)
*/
interface CommaStyleRule {
/**
* Enforce consistent comma style in `<template>`.
*
* @see [comma-style](https://eslint.vuejs.org/rules/comma-style.html)
*/
'vue/comma-style': CommaStyleRuleConfig;
}
/**
* Option.
*/
interface CommentDirectiveOption {
reportUnusedDisableDirectives?: boolean;
}
/**
* Options.
*/
type CommentDirectiveOptions = [CommentDirectiveOption?];
/**
* Support comment-directives in `<template>`.
*
* @see [comment-directive](https://eslint.vuejs.org/rules/comment-directive.html)
*/
type CommentDirectiveRuleConfig = RuleConfig<CommentDirectiveOptions>;
/**
* Support comment-directives in `<template>`.
*
* @see [comment-directive](https://eslint.vuejs.org/rules/comment-directive.html)
*/
interface CommentDirectiveRule {
/**
* Support comment-directives in `<template>`.
*
* @see [comment-directive](https://eslint.vuejs.org/rules/comment-directive.html)
*/
'vue/comment-directive': CommentDirectiveRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
*/
type ComponentApiStyleOption = [
'script-setup' | 'composition' | 'composition-vue2' | 'options',
...('script-setup' | 'composition' | 'composition-vue2' | 'options')[],
];
/**
* Options.
*/
type ComponentApiStyleOptions = [ComponentApiStyleOption?];
/**
* Enforce component API style.
*
* @see [component-api-style](https://eslint.vuejs.org/rules/component-api-style.html)
*/
type ComponentApiStyleRuleConfig = RuleConfig<ComponentApiStyleOptions>;
/**
* Enforce component API style.
*
* @see [component-api-style](https://eslint.vuejs.org/rules/component-api-style.html)
*/
interface ComponentApiStyleRule {
/**
* Enforce component API style.
*
* @see [component-api-style](https://eslint.vuejs.org/rules/component-api-style.html)
*/
'vue/component-api-style': ComponentApiStyleRuleConfig;
}
/**
* Option.
*/
type ComponentDefinitionNameCasingOption = 'PascalCase' | 'kebab-case';
/**
* Options.
*/
type ComponentDefinitionNameCasingOptions = [
ComponentDefinitionNameCasingOption?,
];
/**
* Enforce specific casing for component definition name.
*
* @see [component-definition-name-casing](https://eslint.vuejs.org/rules/component-definition-name-casing.html)
*/
type ComponentDefinitionNameCasingRuleConfig =
RuleConfig<ComponentDefinitionNameCasingOptions>;
/**
* Enforce specific casing for component definition name.
*
* @see [component-definition-name-casing](https://eslint.vuejs.org/rules/component-definition-name-casing.html)
*/
interface ComponentDefinitionNameCasingRule {
/**
* Enforce specific casing for component definition name.
*
* @see [component-definition-name-casing](https://eslint.vuejs.org/rules/component-definition-name-casing.html)
*/
'vue/component-definition-name-casing': ComponentDefinitionNameCasingRuleConfig;
}
/**
* Config.
*/
interface ComponentNameInTemplateCasingConfig$1 {
globals?: string[];
ignores?: string[];
registeredComponentsOnly?: boolean;
}
/**
* Option.
*/
type ComponentNameInTemplateCasingOption$1 = 'PascalCase' | 'kebab-case';
/**
* Options.
*/
type ComponentNameInTemplateCasingOptions$1 = [
ComponentNameInTemplateCasingOption$1?,
ComponentNameInTemplateCasingConfig$1?,
];
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
type ComponentNameInTemplateCasingRuleConfig$1 =
RuleConfig<ComponentNameInTemplateCasingOptions$1>;
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
interface ComponentNameInTemplateCasingRule$1 {
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
'vue/component-name-in-template-casing': ComponentNameInTemplateCasingRuleConfig$1;
}
/**
* Option.
*/
type ComponentOptionsNameCasingOption =
| 'camelCase'
| 'kebab-case'
| 'PascalCase';
/**
* Options.
*/
type ComponentOptionsNameCasingOptions = [
ComponentOptionsNameCasingOption?,
];
/**
* Enforce the casing of component name in `components` options.
*
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
*/
type ComponentOptionsNameCasingRuleConfig =
RuleConfig<ComponentOptionsNameCasingOptions>;
/**
* Enforce the casing of component name in `components` options.
*
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
*/
interface ComponentOptionsNameCasingRule {
/**
* Enforce the casing of component name in `components` options.
*
* @see [component-options-name-casing](https://eslint.vuejs.org/rules/component-options-name-casing.html)
*/
'vue/component-options-name-casing': ComponentOptionsNameCasingRuleConfig;
}
/**
* Option.
*/
interface ComponentTagsOrderOption {
order?: (string | string[])[];
}
/**
* Options.
*/
type ComponentTagsOrderOptions = [ComponentTagsOrderOption?];
/**
* Enforce order of component top-level elements.
*
* @deprecated
*
* @see [component-tags-order](https://eslint.vuejs.org/rules/component-tags-order.html)
*/
type ComponentTagsOrderRuleConfig =
RuleConfig<ComponentTagsOrderOptions>;
/**
* Enforce order of component top-level elements.
*
* @deprecated
*
* @see [component-tags-order](https://eslint.vuejs.org/rules/component-tags-order.html)
*/
interface ComponentTagsOrderRule {
/**
* Enforce order of component top-level elements.
*
* @deprecated
*
* @see [component-tags-order](https://eslint.vuejs.org/rules/component-tags-order.html)
*/
'vue/component-tags-order': ComponentTagsOrderRuleConfig;
}
/**
* Option.
*/
type CustomEventNameCasingOption =
| []
| ['kebab-case' | 'camelCase']
| [
'kebab-case' | 'camelCase',
{
ignores?: string[];
},
]
| []
| [
{
ignores?: string[];
},
];
/**
* Options.
*/
type CustomEventNameCasingOptions = CustomEventNameCasingOption;
/**
* Enforce specific casing for custom event name.
*
* @see [custom-event-name-casing](https://eslint.vuejs.org/rules/custom-event-name-casing.html)
*/
type CustomEventNameCasingRuleConfig =
RuleConfig<CustomEventNameCasingOptions>;
/**
* Enforce specific casing for custom event name.
*
* @see [custom-event-name-casing](https://eslint.vuejs.org/rules/custom-event-name-casing.html)
*/
interface CustomEventNameCasingRule {
/**
* Enforce specific casing for custom event name.
*
* @see [custom-event-name-casing](https://eslint.vuejs.org/rules/custom-event-name-casing.html)
*/
'vue/custom-event-name-casing': CustomEventNameCasingRuleConfig;
}
/**
* Option.
*/
type DefineEmitsDeclarationOption = 'type-based' | 'runtime';
/**
* Options.
*/
type DefineEmitsDeclarationOptions = [DefineEmitsDeclarationOption?];
/**
* Enforce declaration style of `defineEmits`.
*
* @see [define-emits-declaration](https://eslint.vuejs.org/rules/define-emits-declaration.html)
*/
type DefineEmitsDeclarationRuleConfig =
RuleConfig<DefineEmitsDeclarationOptions>;
/**
* Enforce declaration style of `defineEmits`.
*
* @see [define-emits-declaration](https://eslint.vuejs.org/rules/define-emits-declaration.html)
*/
interface DefineEmitsDeclarationRule {
/**
* Enforce declaration style of `defineEmits`.
*
* @see [define-emits-declaration](https://eslint.vuejs.org/rules/define-emits-declaration.html)
*/
'vue/define-emits-declaration': DefineEmitsDeclarationRuleConfig;
}
/**
* Option.
*/
interface DefineMacrosOrderOption {
order?: ('defineEmits' | 'defineProps' | 'defineOptions' | 'defineSlots')[];
}
/**
* Options.
*/
type DefineMacrosOrderOptions = [DefineMacrosOrderOption?];
/**
* Enforce order of `defineEmits` and `defineProps` compiler macros.
*
* @see [define-macros-order](https://eslint.vuejs.org/rules/define-macros-order.html)
*/
type DefineMacrosOrderRuleConfig = RuleConfig<DefineMacrosOrderOptions>;
/**
* Enforce order of `defineEmits` and `defineProps` compiler macros.
*
* @see [define-macros-order](https://eslint.vuejs.org/rules/define-macros-order.html)
*/
interface DefineMacrosOrderRule {
/**
* Enforce order of `defineEmits` and `defineProps` compiler macros.
*
* @see [define-macros-order](https://eslint.vuejs.org/rules/define-macros-order.html)
*/
'vue/define-macros-order': DefineMacrosOrderRuleConfig;
}
/**
* Option.
*/
type DefinePropsDeclarationOption = 'type-based' | 'runtime';
/**
* Options.
*/
type DefinePropsDeclarationOptions = [DefinePropsDeclarationOption?];
/**
* Enforce declaration style of `defineProps`.
*
* @see [define-props-declaration](https://eslint.vuejs.org/rules/define-props-declaration.html)
*/
type DefinePropsDeclarationRuleConfig =
RuleConfig<DefinePropsDeclarationOptions>;
/**
* Enforce declaration style of `defineProps`.
*
* @see [define-props-declaration](https://eslint.vuejs.org/rules/define-props-declaration.html)
*/
interface DefinePropsDeclarationRule {
/**
* Enforce declaration style of `defineProps`.
*
* @see [define-props-declaration](https://eslint.vuejs.org/rules/define-props-declaration.html)
*/
'vue/define-props-declaration': DefinePropsDeclarationRuleConfig;
}
/**
* Option.
*/
type DotLocationOption = 'object' | 'property';
/**
* Options.
*/
type DotLocationOptions = [DotLocationOption?];
/**
* Enforce consistent newlines before and after dots in `<template>`.
*
* @see [dot-location](https://eslint.vuejs.org/rules/dot-location.html)
*/
type DotLocationRuleConfig = RuleConfig<DotLocationOptions>;
/**
* Enforce consistent newlines before and after dots in `<template>`.
*
* @see [dot-location](https://eslint.vuejs.org/rules/dot-location.html)
*/
interface DotLocationRule {
/**
* Enforce consistent newlines before and after dots in `<template>`.
*
* @see [dot-location](https://eslint.vuejs.org/rules/dot-location.html)
*/
'vue/dot-location': DotLocationRuleConfig;
}
/**
* Option.
*/
interface DotNotationOption {
allowKeywords?: boolean;
allowPattern?: string;
}
/**
* Options.
*/
type DotNotationOptions = [DotNotationOption?];
/**
* Enforce dot notation whenever possible in `<template>`.
*
* @see [dot-notation](https://eslint.vuejs.org/rules/dot-notation.html)
*/
type DotNotationRuleConfig = RuleConfig<DotNotationOptions>;
/**
* Enforce dot notation whenever possible in `<template>`.
*
* @see [dot-notation](https://eslint.vuejs.org/rules/dot-notation.html)
*/
interface DotNotationRule {
/**
* Enforce dot notation whenever possible in `<template>`.
*
* @see [dot-notation](https://eslint.vuejs.org/rules/dot-notation.html)
*/
'vue/dot-notation': DotNotationRuleConfig;
}
/**
* Option.
*/
type EqeqeqOption =
| []
| ['always']
| [
'always',
{
null?: 'always' | 'never' | 'ignore';
},
]
| []
| ['smart' | 'allow-null'];
/**
* Options.
*/
type EqeqeqOptions = EqeqeqOption;
/**
* Require the use of `===` and `!==` in `<template>`.
*
* @see [eqeqeq](https://eslint.vuejs.org/rules/eqeqeq.html)
*/
type EqeqeqRuleConfig = RuleConfig<EqeqeqOptions>;
/**
* Require the use of `===` and `!==` in `<template>`.
*
* @see [eqeqeq](https://eslint.vuejs.org/rules/eqeqeq.html)
*/
interface EqeqeqRule {
/**
* Require the use of `===` and `!==` in `<template>`.
*
* @see [eqeqeq](https://eslint.vuejs.org/rules/eqeqeq.html)
*/
'vue/eqeqeq': EqeqeqRuleConfig;
}
/**
* Option.
*/
interface FirstAttributeLinebreakOption {
multiline?: 'below' | 'beside' | 'ignore';
singleline?: 'below' | 'beside' | 'ignore';
}
/**
* Options.
*/
type FirstAttributeLinebreakOptions = [FirstAttributeLinebreakOption?];
/**
* Enforce the location of first attribute.
*
* @see [first-attribute-linebreak](https://eslint.vuejs.org/rules/first-attribute-linebreak.html)
*/
type FirstAttributeLinebreakRuleConfig =
RuleConfig<FirstAttributeLinebreakOptions>;
/**
* Enforce the location of first attribute.
*
* @see [first-attribute-linebreak](https://eslint.vuejs.org/rules/first-attribute-linebreak.html)
*/
interface FirstAttributeLinebreakRule {
/**
* Enforce the location of first attribute.
*
* @see [first-attribute-linebreak](https://eslint.vuejs.org/rules/first-attribute-linebreak.html)
*/
'vue/first-attribute-linebreak': FirstAttributeLinebreakRuleConfig;
}
/**
* Option.
*/
type FuncCallSpacingOption =
| []
| ['never']
| []
| ['always']
| [
'always',
{
allowNewlines?: boolean;
},
];
/**
* Options.
*/
type FuncCallSpacingOptions = FuncCallSpacingOption;
/**
* Require or disallow spacing between function identifiers and their invocations in `<template>`.
*
* @see [func-call-spacing](https://eslint.vuejs.org/rules/func-call-spacing.html)
*/
type FuncCallSpacingRuleConfig = RuleConfig<FuncCallSpacingOptions>;
/**
* Require or disallow spacing between function identifiers and their invocations in `<template>`.
*
* @see [func-call-spacing](https://eslint.vuejs.org/rules/func-call-spacing.html)
*/
interface FuncCallSpacingRule {
/**
* Require or disallow spacing between function identifiers and their invocations in `<template>`.
*
* @see [func-call-spacing](https://eslint.vuejs.org/rules/func-call-spacing.html)
*/
'vue/func-call-spacing': FuncCallSpacingRuleConfig;
}
/**
* Option.
*/
interface HtmlButtonHasTypeOption {
button?: boolean;
submit?: boolean;
reset?: boolean;
}
/**
* Options.
*/
type HtmlButtonHasTypeOptions = [HtmlButtonHasTypeOption?];
/**
* Disallow usage of button without an explicit type attribute.
*
* @see [html-button-has-type](https://eslint.vuejs.org/rules/html-button-has-type.html)
*/
type HtmlButtonHasTypeRuleConfig = RuleConfig<HtmlButtonHasTypeOptions>;
/**
* Disallow usage of button without an explicit type attribute.
*
* @see [html-button-has-type](https://eslint.vuejs.org/rules/html-button-has-type.html)
*/
interface HtmlButtonHasTypeRule {
/**
* Disallow usage of button without an explicit type attribute.
*
* @see [html-button-has-type](https://eslint.vuejs.org/rules/html-button-has-type.html)
*/
'vue/html-button-has-type': HtmlButtonHasTypeRuleConfig;
}
/**
* Option.
*/
interface HtmlClosingBracketNewlineOption {
singleline?: 'always' | 'never';
multiline?: 'always' | 'never';
}
/**
* Options.
*/
type HtmlClosingBracketNewlineOptions = [
HtmlClosingBracketNewlineOption?,
];
/**
* Require or disallow a line break before tag's closing brackets.
*
* @see [html-closing-bracket-newline](https://eslint.vuejs.org/rules/html-closing-bracket-newline.html)
*/
type HtmlClosingBracketNewlineRuleConfig =
RuleConfig<HtmlClosingBracketNewlineOptions>;
/**
* Require or disallow a line break before tag's closing brackets.
*
* @see [html-closing-bracket-newline](https://eslint.vuejs.org/rules/html-closing-bracket-newline.html)
*/
interface HtmlClosingBracketNewlineRule {
/**
* Require or disallow a line break before tag's closing brackets.
*
* @see [html-closing-bracket-newline](https://eslint.vuejs.org/rules/html-closing-bracket-newline.html)
*/
'vue/html-closing-bracket-newline': HtmlClosingBracketNewlineRuleConfig;
}
/**
* Option.
*/
interface HtmlClosingBracketSpacingOption {
startTag?: 'always' | 'never';
endTag?: 'always' | 'never';
selfClosingTag?: 'always' | 'never';
}
/**
* Options.
*/
type HtmlClosingBracketSpacingOptions = [
HtmlClosingBracketSpacingOption?,
];
/**
* Require or disallow a space before tag's closing brackets.
*
* @see [html-closing-bracket-spacing](https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html)
*/
type HtmlClosingBracketSpacingRuleConfig =
RuleConfig<HtmlClosingBracketSpacingOptions>;
/**
* Require or disallow a space before tag's closing brackets.
*
* @see [html-closing-bracket-spacing](https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html)
*/
interface HtmlClosingBracketSpacingRule {
/**
* Require or disallow a space before tag's closing brackets.
*
* @see [html-closing-bracket-spacing](https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html)
*/
'vue/html-closing-bracket-spacing': HtmlClosingBracketSpacingRuleConfig;
}
/**
* Config.
*/
interface HtmlCommentContentNewlineConfig {
exceptions?: string[];
}
/**
* Option.
*/
type HtmlCommentContentNewlineOption =
| ('always' | 'never')
| {
singleline?: 'always' | 'never' | 'ignore';
multiline?: 'always' | 'never' | 'ignore';
};
/**
* Options.
*/
type HtmlCommentContentNewlineOptions = [
HtmlCommentContentNewlineOption?,
HtmlCommentContentNewlineConfig?,
];
/**
* Enforce unified line brake in HTML comments.
*
* @see [html-comment-content-newline](https://eslint.vuejs.org/rules/html-comment-content-newline.html)
*/
type HtmlCommentContentNewlineRuleConfig =
RuleConfig<HtmlCommentContentNewlineOptions>;
/**
* Enforce unified line brake in HTML comments.
*
* @see [html-comment-content-newline](https://eslint.vuejs.org/rules/html-comment-content-newline.html)
*/
interface HtmlCommentContentNewlineRule {
/**
* Enforce unified line brake in HTML comments.
*
* @see [html-comment-content-newline](https://eslint.vuejs.org/rules/html-comment-content-newline.html)
*/
'vue/html-comment-content-newline': HtmlCommentContentNewlineRuleConfig;
}
/**
* Config.
*/
interface HtmlCommentContentSpacingConfig {
exceptions?: string[];
}
/**
* Option.
*/
type HtmlCommentContentSpacingOption = 'always' | 'never';
/**
* Options.
*/
type HtmlCommentContentSpacingOptions = [
HtmlCommentContentSpacingOption?,
HtmlCommentContentSpacingConfig?,
];
/**
* Enforce unified spacing in HTML comments.
*
* @see [html-comment-content-spacing](https://eslint.vuejs.org/rules/html-comment-content-spacing.html)
*/
type HtmlCommentContentSpacingRuleConfig =
RuleConfig<HtmlCommentContentSpacingOptions>;
/**
* Enforce unified spacing in HTML comments.
*
* @see [html-comment-content-spacing](https://eslint.vuejs.org/rules/html-comment-content-spacing.html)
*/
interface HtmlCommentContentSpacingRule {
/**
* Enforce unified spacing in HTML comments.
*
* @see [html-comment-content-spacing](https://eslint.vuejs.org/rules/html-comment-content-spacing.html)
*/
'vue/html-comment-content-spacing': HtmlCommentContentSpacingRuleConfig;
}
/**
* Option.
*/
type HtmlCommentIndentOption = number | 'tab';
/**
* Options.
*/
type HtmlCommentIndentOptions = [HtmlCommentIndentOption?];
/**
* Enforce consistent indentation in HTML comments.
*
* @see [html-comment-indent](https://eslint.vuejs.org/rules/html-comment-indent.html)
*/
type HtmlCommentIndentRuleConfig = RuleConfig<HtmlCommentIndentOptions>;
/**
* Enforce consistent indentation in HTML comments.
*
* @see [html-comment-indent](https://eslint.vuejs.org/rules/html-comment-indent.html)
*/
interface HtmlCommentIndentRule {
/**
* Enforce consistent indentation in HTML comments.
*
* @see [html-comment-indent](https://eslint.vuejs.org/rules/html-comment-indent.html)
*/
'vue/html-comment-indent': HtmlCommentIndentRuleConfig;
}
/**
* Enforce end tag style.
*
* @see [html-end-tags](https://eslint.vuejs.org/rules/html-end-tags.html)
*/
type HtmlEndTagsRuleConfig = RuleConfig<[]>;
/**
* Enforce end tag style.
*
* @see [html-end-tags](https://eslint.vuejs.org/rules/html-end-tags.html)
*/
interface HtmlEndTagsRule {
/**
* Enforce end tag style.
*
* @see [html-end-tags](https://eslint.vuejs.org/rules/html-end-tags.html)
*/
'vue/html-end-tags': HtmlEndTagsRuleConfig;
}
/**
* Config.
*/
interface HtmlIndentConfig {
attribute?: number;
baseIndent?: number;
closeBracket?:
| number
| {
startTag?: number;
endTag?: number;
selfClosingTag?: number;
};
switchCase?: number;
alignAttributesVertically?: boolean;
ignores?: string[];
}
/**
* Option.
*/
type HtmlIndentOption = number | 'tab';
/**
* Options.
*/
type HtmlIndentOptions = [HtmlIndentOption?, HtmlIndentConfig?];
/**
* Enforce consistent indentation in `<template>`.
*
* @see [html-indent](https://eslint.vuejs.org/rules/html-indent.html)
*/
type HtmlIndentRuleConfig = RuleConfig<HtmlIndentOptions>;
/**
* Enforce consistent indentation in `<template>`.
*
* @see [html-indent](https://eslint.vuejs.org/rules/html-indent.html)
*/
interface HtmlIndentRule {
/**
* Enforce consistent indentation in `<template>`.
*
* @see [html-indent](https://eslint.vuejs.org/rules/html-indent.html)
*/
'vue/html-indent': HtmlIndentRuleConfig;
}
/**
* Config.
*/
interface HtmlQuotesConfig {
avoidEscape?: boolean;
}
/**
* Option.
*/
type HtmlQuotesOption = 'double' | 'single';
/**
* Options.
*/
type HtmlQuotesOptions = [HtmlQuotesOption?, HtmlQuotesConfig?];
/**
* Enforce quotes style of HTML attributes.
*
* @see [html-quotes](https://eslint.vuejs.org/rules/html-quotes.html)
*/
type HtmlQuotesRuleConfig = RuleConfig<HtmlQuotesOptions>;
/**
* Enforce quotes style of HTML attributes.
*
* @see [html-quotes](https://eslint.vuejs.org/rules/html-quotes.html)
*/
interface HtmlQuotesRule {
/**
* Enforce quotes style of HTML attributes.
*
* @see [html-quotes](https://eslint.vuejs.org/rules/html-quotes.html)
*/
'vue/html-quotes': HtmlQuotesRuleConfig;
}
/**
* Option.
*/
/**
* @maxItems 1
*/
type HtmlSelfClosingOption =
| []
| [
{
html?: {
normal?: OptionValue;
void?: OptionValue;
component?: OptionValue;
};
svg?: OptionValue;
math?: OptionValue;
},
];
type OptionValue = 'always' | 'never' | 'any';
/**
* Options.
*/
type HtmlSelfClosingOptions = HtmlSelfClosingOption;
/**
* Enforce self-closing style.
*
* @see [html-self-closing](https://eslint.vuejs.org/rules/html-self-closing.html)
*/
type HtmlSelfClosingRuleConfig = RuleConfig<HtmlSelfClosingOptions>;
/**
* Enforce self-closing style.
*
* @see [html-self-closing](https://eslint.vuejs.org/rules/html-self-closing.html)
*/
interface HtmlSelfClosingRule {
/**
* Enforce self-closing style.
*
* @see [html-self-closing](https://eslint.vuejs.org/rules/html-self-closing.html)
*/
'vue/html-self-closing': HtmlSelfClosingRuleConfig;
}
/**
* Prevent variables used in JSX to be marked as unused.
*
* @see [jsx-uses-vars](https://eslint.vuejs.org/rules/jsx-uses-vars.html)
*/
type JsxUsesVarsRuleConfig = RuleConfig<[]>;
/**
* Prevent variables used in JSX to be marked as unused.
*
* @see [jsx-uses-vars](https://eslint.vuejs.org/rules/jsx-uses-vars.html)
*/
interface JsxUsesVarsRule {
/**
* Prevent variables used in JSX to be marked as unused.
*
* @see [jsx-uses-vars](https://eslint.vuejs.org/rules/jsx-uses-vars.html)
*/
'vue/jsx-uses-vars': JsxUsesVarsRuleConfig;
}
/**
* Option.
*/
type KeySpacingOption$1 =
| {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
align?:
| ('colon' | 'value')
| {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
align?: {
mode?: 'strict' | 'minimum';
on?: 'colon' | 'value';
beforeColon?: boolean;
afterColon?: boolean;
};
};
/**
* Options.
*/
type KeySpacingOptions$1 = [KeySpacingOption$1?];
/**
* Enforce consistent spacing between keys and values in object literal properties in `<template>`.
*
* @see [key-spacing](https://eslint.vuejs.org/rules/key-spacing.html)
*/
type KeySpacingRuleConfig$1 = RuleConfig<KeySpacingOptions$1>;
/**
* Enforce consistent spacing between keys and values in object literal properties in `<template>`.
*
* @see [key-spacing](https://eslint.vuejs.org/rules/key-spacing.html)
*/
interface KeySpacingRule$1 {
/**
* Enforce consistent spacing between keys and values in object literal properties in `<template>`.
*
* @see [key-spacing](https://eslint.vuejs.org/rules/key-spacing.html)
*/
'vue/key-spacing': KeySpacingRuleConfig$1;
}
/**
* Option.
*/
interface KeywordSpacingOption {
before?: boolean;
after?: boolean;
overrides?: {
abstract?: {
before?: boolean;
after?: boolean;
};
as?: {
before?: boolean;
after?: boolean;
};
async?: {
before?: boolean;
after?: boolean;
};
await?: {
before?: boolean;
after?: boolean;
};
boolean?: {
before?: boolean;
after?: boolean;
};
break?: {
before?: boolean;
after?: boolean;
};
byte?: {
before?: boolean;
after?: boolean;
};
case?: {
before?: boolean;
after?: boolean;
};
catch?: {
before?: boolean;
after?: boolean;
};
char?: {
before?: boolean;
after?: boolean;
};
class?: {
before?: boolean;
after?: boolean;
};
const?: {
before?: boolean;
after?: boolean;
};
continue?: {
before?: boolean;
after?: boolean;
};
debugger?: {
before?: boolean;
after?: boolean;
};
default?: {
before?: boolean;
after?: boolean;
};
delete?: {
before?: boolean;
after?: boolean;
};
do?: {
before?: boolean;
after?: boolean;
};
double?: {
before?: boolean;
after?: boolean;
};
else?: {
before?: boolean;
after?: boolean;
};
enum?: {
before?: boolean;
after?: boolean;
};
export?: {
before?: boolean;
after?: boolean;
};
extends?: {
before?: boolean;
after?: boolean;
};
false?: {
before?: boolean;
after?: boolean;
};
final?: {
before?: boolean;
after?: boolean;
};
finally?: {
before?: boolean;
after?: boolean;
};
float?: {
before?: boolean;
after?: boolean;
};
for?: {
before?: boolean;
after?: boolean;
};
from?: {
before?: boolean;
after?: boolean;
};
function?: {
before?: boolean;
after?: boolean;
};
get?: {
before?: boolean;
after?: boolean;
};
goto?: {
before?: boolean;
after?: boolean;
};
if?: {
before?: boolean;
after?: boolean;
};
implements?: {
before?: boolean;
after?: boolean;
};
import?: {
before?: boolean;
after?: boolean;
};
in?: {
before?: boolean;
after?: boolean;
};
instanceof?: {
before?: boolean;
after?: boolean;
};
int?: {
before?: boolean;
after?: boolean;
};
interface?: {
before?: boolean;
after?: boolean;
};
let?: {
before?: boolean;
after?: boolean;
};
long?: {
before?: boolean;
after?: boolean;
};
native?: {
before?: boolean;
after?: boolean;
};
new?: {
before?: boolean;
after?: boolean;
};
null?: {
before?: boolean;
after?: boolean;
};
of?: {
before?: boolean;
after?: boolean;
};
package?: {
before?: boolean;
after?: boolean;
};
private?: {
before?: boolean;
after?: boolean;
};
protected?: {
before?: boolean;
after?: boolean;
};
public?: {
before?: boolean;
after?: boolean;
};
return?: {
before?: boolean;
after?: boolean;
};
set?: {
before?: boolean;
after?: boolean;
};
short?: {
before?: boolean;
after?: boolean;
};
static?: {
before?: boolean;
after?: boolean;
};
super?: {
before?: boolean;
after?: boolean;
};
switch?: {
before?: boolean;
after?: boolean;
};
synchronized?: {
before?: boolean;
after?: boolean;
};
this?: {
before?: boolean;
after?: boolean;
};
throw?: {
before?: boolean;
after?: boolean;
};
throws?: {
before?: boolean;
after?: boolean;
};
transient?: {
before?: boolean;
after?: boolean;
};
true?: {
before?: boolean;
after?: boolean;
};
try?: {
before?: boolean;
after?: boolean;
};
typeof?: {
before?: boolean;
after?: boolean;
};
var?: {
before?: boolean;
after?: boolean;
};
void?: {
before?: boolean;
after?: boolean;
};
volatile?: {
before?: boolean;
after?: boolean;
};
while?: {
before?: boolean;
after?: boolean;
};
with?: {
before?: boolean;
after?: boolean;
};
yield?: {
before?: boolean;
after?: boolean;
};
};
}
/**
* Options.
*/
type KeywordSpacingOptions = [KeywordSpacingOption?];
/**
* Enforce consistent spacing before and after keywords in `<template>`.
*
* @see [keyword-spacing](https://eslint.vuejs.org/rules/keyword-spacing.html)
*/
type KeywordSpacingRuleConfig = RuleConfig<KeywordSpacingOptions>;
/**
* Enforce consistent spacing before and after keywords in `<template>`.
*
* @see [keyword-spacing](https://eslint.vuejs.org/rules/keyword-spacing.html)
*/
interface KeywordSpacingRule {
/**
* Enforce consistent spacing before and after keywords in `<template>`.
*
* @see [keyword-spacing](https://eslint.vuejs.org/rules/keyword-spacing.html)
*/
'vue/keyword-spacing': KeywordSpacingRuleConfig;
}
/**
* Option.
*/
interface MatchComponentFileNameOption {
extensions?: string[];
shouldMatchCase?: boolean;
}
/**
* Options.
*/
type MatchComponentFileNameOptions = [MatchComponentFileNameOption?];
/**
* Require component name property to match its file name.
*
* @see [match-component-file-name](https://eslint.vuejs.org/rules/match-component-file-name.html)
*/
type MatchComponentFileNameRuleConfig =
RuleConfig<MatchComponentFileNameOptions>;
/**
* Require component name property to match its file name.
*
* @see [match-component-file-name](https://eslint.vuejs.org/rules/match-component-file-name.html)
*/
interface MatchComponentFileNameRule {
/**
* Require component name property to match its file name.
*
* @see [match-component-file-name](https://eslint.vuejs.org/rules/match-component-file-name.html)
*/
'vue/match-component-file-name': MatchComponentFileNameRuleConfig;
}
/**
* Require the registered component name to match the imported component name.
*
* @see [match-component-import-name](https://eslint.vuejs.org/rules/match-component-import-name.html)
*/
type MatchComponentImportNameRuleConfig = RuleConfig<[]>;
/**
* Require the registered component name to match the imported component name.
*
* @see [match-component-import-name](https://eslint.vuejs.org/rules/match-component-import-name.html)
*/
interface MatchComponentImportNameRule {
/**
* Require the registered component name to match the imported component name.
*
* @see [match-component-import-name](https://eslint.vuejs.org/rules/match-component-import-name.html)
*/
'vue/match-component-import-name': MatchComponentImportNameRuleConfig;
}
/**
* Option.
*/
interface MaxAttributesPerLineOption {
singleline?:
| number
| {
max?: number;
};
multiline?:
| number
| {
max?: number;
};
}
/**
* Options.
*/
type MaxAttributesPerLineOptions = [MaxAttributesPerLineOption?];
/**
* Enforce the maximum number of attributes per line.
*
* @see [max-attributes-per-line](https://eslint.vuejs.org/rules/max-attributes-per-line.html)
*/
type MaxAttributesPerLineRuleConfig =
RuleConfig<MaxAttributesPerLineOptions>;
/**
* Enforce the maximum number of attributes per line.
*
* @see [max-attributes-per-line](https://eslint.vuejs.org/rules/max-attributes-per-line.html)
*/
interface MaxAttributesPerLineRule {
/**
* Enforce the maximum number of attributes per line.
*
* @see [max-attributes-per-line](https://eslint.vuejs.org/rules/max-attributes-per-line.html)
*/
'vue/max-attributes-per-line': MaxAttributesPerLineRuleConfig;
}
/**
* Setting.
*/
interface MaxLenSetting {
code?: number;
template?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreTrailingComments?: boolean;
ignoreUrls?: boolean;
ignoreStrings?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreHTMLAttributeValues?: boolean;
ignoreHTMLTextContents?: boolean;
}
/**
* Config.
*/
type MaxLenConfig =
| {
code?: number;
template?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreTrailingComments?: boolean;
ignoreUrls?: boolean;
ignoreStrings?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreHTMLAttributeValues?: boolean;
ignoreHTMLTextContents?: boolean;
}
| number;
/**
* Option.
*/
type MaxLenOption =
| {
code?: number;
template?: number;
comments?: number;
tabWidth?: number;
ignorePattern?: string;
ignoreComments?: boolean;
ignoreTrailingComments?: boolean;
ignoreUrls?: boolean;
ignoreStrings?: boolean;
ignoreTemplateLiterals?: boolean;
ignoreRegExpLiterals?: boolean;
ignoreHTMLAttributeValues?: boolean;
ignoreHTMLTextContents?: boolean;
}
| number;
/**
* Options.
*/
type MaxLenOptions = [MaxLenOption?, MaxLenConfig?, MaxLenSetting?];
/**
* Enforce a maximum line length in `.vue` files.
*
* @see [max-len](https://eslint.vuejs.org/rules/max-len.html)
*/
type MaxLenRuleConfig = RuleConfig<MaxLenOptions>;
/**
* Enforce a maximum line length in `.vue` files.
*
* @see [max-len](https://eslint.vuejs.org/rules/max-len.html)
*/
interface MaxLenRule {
/**
* Enforce a maximum line length in `.vue` files.
*
* @see [max-len](https://eslint.vuejs.org/rules/max-len.html)
*/
'vue/max-len': MaxLenRuleConfig;
}
/**
* Option.
*/
interface MaxLinesPerBlockOption {
style?: number;
template?: number;
script?: number;
skipBlankLines?: boolean;
}
/**
* Options.
*/
type MaxLinesPerBlockOptions = [MaxLinesPerBlockOption?];
/**
* Enforce maximum number of lines in Vue SFC blocks.
*
* @see [max-lines-per-block](https://eslint.vuejs.org/rules/max-lines-per-block.html)
*/
type MaxLinesPerBlockRuleConfig = RuleConfig<MaxLinesPerBlockOptions>;
/**
* Enforce maximum number of lines in Vue SFC blocks.
*
* @see [max-lines-per-block](https://eslint.vuejs.org/rules/max-lines-per-block.html)
*/
interface MaxLinesPerBlockRule {
/**
* Enforce maximum number of lines in Vue SFC blocks.
*
* @see [max-lines-per-block](https://eslint.vuejs.org/rules/max-lines-per-block.html)
*/
'vue/max-lines-per-block': MaxLinesPerBlockRuleConfig;
}
/**
* Option.
*/
interface MultiWordComponentNamesOption {
ignores?: string[];
}
/**
* Options.
*/
type MultiWordComponentNamesOptions = [MultiWordComponentNamesOption?];
/**
* Require component names to be always multi-word.
*
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
*/
type MultiWordComponentNamesRuleConfig =
RuleConfig<MultiWordComponentNamesOptions>;
/**
* Require component names to be always multi-word.
*
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
*/
interface MultiWordComponentNamesRule {
/**
* Require component names to be always multi-word.
*
* @see [multi-word-component-names](https://eslint.vuejs.org/rules/multi-word-component-names.html)
*/
'vue/multi-word-component-names': MultiWordComponentNamesRuleConfig;
}
/**
* Option.
*/
interface MultilineHtmlElementContentNewlineOption {
ignoreWhenEmpty?: boolean;
ignores?: string[];
allowEmptyLines?: boolean;
}
/**
* Options.
*/
type MultilineHtmlElementContentNewlineOptions = [
MultilineHtmlElementContentNewlineOption?,
];
/**
* Require a line break before and after the contents of a multiline element.
*
* @see [multiline-html-element-content-newline](https://eslint.vuejs.org/rules/multiline-html-element-content-newline.html)
*/
type MultilineHtmlElementContentNewlineRuleConfig =
RuleConfig<MultilineHtmlElementContentNewlineOptions>;
/**
* Require a line break before and after the contents of a multiline element.
*
* @see [multiline-html-element-content-newline](https://eslint.vuejs.org/rules/multiline-html-element-content-newline.html)
*/
interface MultilineHtmlElementContentNewlineRule {
/**
* Require a line break before and after the contents of a multiline element.
*
* @see [multiline-html-element-content-newline](https://eslint.vuejs.org/rules/multiline-html-element-content-newline.html)
*/
'vue/multiline-html-element-content-newline': MultilineHtmlElementContentNewlineRuleConfig;
}
/**
* Option.
*/
type MultilineTernaryOption = 'always' | 'always-multiline' | 'never';
/**
* Options.
*/
type MultilineTernaryOptions = [MultilineTernaryOption?];
/**
* Enforce newlines between operands of ternary expressions in `<template>`.
*
* @see [multiline-ternary](https://eslint.vuejs.org/rules/multiline-ternary.html)
*/
type MultilineTernaryRuleConfig = RuleConfig<MultilineTernaryOptions>;
/**
* Enforce newlines between operands of ternary expressions in `<template>`.
*
* @see [multiline-ternary](https://eslint.vuejs.org/rules/multiline-ternary.html)
*/
interface MultilineTernaryRule {
/**
* Enforce newlines between operands of ternary expressions in `<template>`.
*
* @see [multiline-ternary](https://eslint.vuejs.org/rules/multiline-ternary.html)
*/
'vue/multiline-ternary': MultilineTernaryRuleConfig;
}
/**
* Option.
*/
type MustacheInterpolationSpacingOption = 'always' | 'never';
/**
* Options.
*/
type MustacheInterpolationSpacingOptions = [
MustacheInterpolationSpacingOption?,
];
/**
* Enforce unified spacing in mustache interpolations.
*
* @see [mustache-interpolation-spacing](https://eslint.vuejs.org/rules/mustache-interpolation-spacing.html)
*/
type MustacheInterpolationSpacingRuleConfig =
RuleConfig<MustacheInterpolationSpacingOptions>;
/**
* Enforce unified spacing in mustache interpolations.
*
* @see [mustache-interpolation-spacing](https://eslint.vuejs.org/rules/mustache-interpolation-spacing.html)
*/
interface MustacheInterpolationSpacingRule {
/**
* Enforce unified spacing in mustache interpolations.
*
* @see [mustache-interpolation-spacing](https://eslint.vuejs.org/rules/mustache-interpolation-spacing.html)
*/
'vue/mustache-interpolation-spacing': MustacheInterpolationSpacingRuleConfig;
}
/**
* Option.
*/
interface NewLineBetweenMultiLinePropertyOption {
minLineOfMultilineProperty?: number;
}
/**
* Options.
*/
type NewLineBetweenMultiLinePropertyOptions = [
NewLineBetweenMultiLinePropertyOption?,
];
/**
* Enforce new lines between multi-line properties in Vue components.
*
* @see [new-line-between-multi-line-property](https://eslint.vuejs.org/rules/new-line-between-multi-line-property.html)
*/
type NewLineBetweenMultiLinePropertyRuleConfig =
RuleConfig<NewLineBetweenMultiLinePropertyOptions>;
/**
* Enforce new lines between multi-line properties in Vue components.
*
* @see [new-line-between-multi-line-property](https://eslint.vuejs.org/rules/new-line-between-multi-line-property.html)
*/
interface NewLineBetweenMultiLinePropertyRule {
/**
* Enforce new lines between multi-line properties in Vue components.
*
* @see [new-line-between-multi-line-property](https://eslint.vuejs.org/rules/new-line-between-multi-line-property.html)
*/
'vue/new-line-between-multi-line-property': NewLineBetweenMultiLinePropertyRuleConfig;
}
/**
* Option.
*/
type NextTickStyleOption = 'promise' | 'callback';
/**
* Options.
*/
type NextTickStyleOptions = [NextTickStyleOption?];
/**
* Enforce Promise or callback style in `nextTick`.
*
* @see [next-tick-style](https://eslint.vuejs.org/rules/next-tick-style.html)
*/
type NextTickStyleRuleConfig = RuleConfig<NextTickStyleOptions>;
/**
* Enforce Promise or callback style in `nextTick`.
*
* @see [next-tick-style](https://eslint.vuejs.org/rules/next-tick-style.html)
*/
interface NextTickStyleRule {
/**
* Enforce Promise or callback style in `nextTick`.
*
* @see [next-tick-style](https://eslint.vuejs.org/rules/next-tick-style.html)
*/
'vue/next-tick-style': NextTickStyleRuleConfig;
}
/**
* Disallow using arrow functions to define watcher.
*
* @see [no-arrow-functions-in-watch](https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html)
*/
type NoArrowFunctionsInWatchRuleConfig = RuleConfig<[]>;
/**
* Disallow using arrow functions to define watcher.
*
* @see [no-arrow-functions-in-watch](https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html)
*/
interface NoArrowFunctionsInWatchRule {
/**
* Disallow using arrow functions to define watcher.
*
* @see [no-arrow-functions-in-watch](https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html)
*/
'vue/no-arrow-functions-in-watch': NoArrowFunctionsInWatchRuleConfig;
}
/**
* Disallow asynchronous actions in computed properties.
*
* @see [no-async-in-computed-properties](https://eslint.vuejs.org/rules/no-async-in-computed-properties.html)
*/
type NoAsyncInComputedPropertiesRuleConfig = RuleConfig<[]>;
/**
* Disallow asynchronous actions in computed properties.
*
* @see [no-async-in-computed-properties](https://eslint.vuejs.org/rules/no-async-in-computed-properties.html)
*/
interface NoAsyncInComputedPropertiesRule {
/**
* Disallow asynchronous actions in computed properties.
*
* @see [no-async-in-computed-properties](https://eslint.vuejs.org/rules/no-async-in-computed-properties.html)
*/
'vue/no-async-in-computed-properties': NoAsyncInComputedPropertiesRuleConfig;
}
/**
* Option.
*/
interface NoBareStringsInTemplateOption {
allowlist?: string[];
attributes?: {
/**
*/
[k: string]: string[];
};
directives?: string[];
}
/**
* Options.
*/
type NoBareStringsInTemplateOptions = [NoBareStringsInTemplateOption?];
/**
* Disallow the use of bare strings in `<template>`.
*
* @see [no-bare-strings-in-template](https://eslint.vuejs.org/rules/no-bare-strings-in-template.html)
*/
type NoBareStringsInTemplateRuleConfig =
RuleConfig<NoBareStringsInTemplateOptions>;
/**
* Disallow the use of bare strings in `<template>`.
*
* @see [no-bare-strings-in-template](https://eslint.vuejs.org/rules/no-bare-strings-in-template.html)
*/
interface NoBareStringsInTemplateRule {
/**
* Disallow the use of bare strings in `<template>`.
*
* @see [no-bare-strings-in-template](https://eslint.vuejs.org/rules/no-bare-strings-in-template.html)
*/
'vue/no-bare-strings-in-template': NoBareStringsInTemplateRuleConfig;
}
/**
* Option.
*/
type NoBooleanDefaultOption = 'default-false' | 'no-default';
/**
* Options.
*/
type NoBooleanDefaultOptions = [NoBooleanDefaultOption?];
/**
* Disallow boolean defaults.
*
* @see [no-boolean-default](https://eslint.vuejs.org/rules/no-boolean-default.html)
*/
type NoBooleanDefaultRuleConfig = RuleConfig<NoBooleanDefaultOptions>;
/**
* Disallow boolean defaults.
*
* @see [no-boolean-default](https://eslint.vuejs.org/rules/no-boolean-default.html)
*/
interface NoBooleanDefaultRule {
/**
* Disallow boolean defaults.
*
* @see [no-boolean-default](https://eslint.vuejs.org/rules/no-boolean-default.html)
*/
'vue/no-boolean-default': NoBooleanDefaultRuleConfig;
}
/**
* Option.
*/
interface NoChildContentOption {
/**
* @minItems 1
*/
additionalDirectives: [string, ...string[]];
}
/**
* Options.
*/
type NoChildContentOptions = [NoChildContentOption?];
/**
* Disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text`.
*
* @see [no-child-content](https://eslint.vuejs.org/rules/no-child-content.html)
*/
type NoChildContentRuleConfig = RuleConfig<NoChildContentOptions>;
/**
* Disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text`.
*
* @see [no-child-content](https://eslint.vuejs.org/rules/no-child-content.html)
*/
interface NoChildContentRule {
/**
* Disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text`.
*
* @see [no-child-content](https://eslint.vuejs.org/rules/no-child-content.html)
*/
'vue/no-child-content': NoChildContentRuleConfig;
}
/**
* Disallow accessing computed properties in `data`.
*
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
*/
type NoComputedPropertiesInDataRuleConfig = RuleConfig<[]>;
/**
* Disallow accessing computed properties in `data`.
*
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
*/
interface NoComputedPropertiesInDataRule {
/**
* Disallow accessing computed properties in `data`.
*
* @see [no-computed-properties-in-data](https://eslint.vuejs.org/rules/no-computed-properties-in-data.html)
*/
'vue/no-computed-properties-in-data': NoComputedPropertiesInDataRuleConfig;
}
/**
* Option.
*/
interface NoConsoleOption {
/**
* @minItems 1
*/
allow?: [string, ...string[]];
}
/**
* Options.
*/
type NoConsoleOptions = [NoConsoleOption?];
/**
* Disallow the use of `console` in `<template>`.
*
* @see [no-console](https://eslint.vuejs.org/rules/no-console.html)
*/
type NoConsoleRuleConfig = RuleConfig<NoConsoleOptions>;
/**
* Disallow the use of `console` in `<template>`.
*
* @see [no-console](https://eslint.vuejs.org/rules/no-console.html)
*/
interface NoConsoleRule {
/**
* Disallow the use of `console` in `<template>`.
*
* @see [no-console](https://eslint.vuejs.org/rules/no-console.html)
*/
'vue/no-console': NoConsoleRuleConfig;
}
/**
* Option.
*/
interface NoConstantConditionOption {
checkLoops?: boolean;
}
/**
* Options.
*/
type NoConstantConditionOptions = [NoConstantConditionOption?];
/**
* Disallow constant expressions in conditions in `<template>`.
*
* @see [no-constant-condition](https://eslint.vuejs.org/rules/no-constant-condition.html)
*/
type NoConstantConditionRuleConfig =
RuleConfig<NoConstantConditionOptions>;
/**
* Disallow constant expressions in conditions in `<template>`.
*
* @see [no-constant-condition](https://eslint.vuejs.org/rules/no-constant-condition.html)
*/
interface NoConstantConditionRule {
/**
* Disallow constant expressions in conditions in `<template>`.
*
* @see [no-constant-condition](https://eslint.vuejs.org/rules/no-constant-condition.html)
*/
'vue/no-constant-condition': NoConstantConditionRuleConfig;
}
/**
* Disallow custom modifiers on v-model used on the component.
*
* @see [no-custom-modifiers-on-v-model](https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html)
*/
type NoCustomModifiersOnVModelRuleConfig = RuleConfig<[]>;
/**
* Disallow custom modifiers on v-model used on the component.
*
* @see [no-custom-modifiers-on-v-model](https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html)
*/
interface NoCustomModifiersOnVModelRule {
/**
* Disallow custom modifiers on v-model used on the component.
*
* @see [no-custom-modifiers-on-v-model](https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html)
*/
'vue/no-custom-modifiers-on-v-model': NoCustomModifiersOnVModelRuleConfig;
}
/**
* Disallow using deprecated object declaration on data (in Vue.js 3.0.0+).
*
* @see [no-deprecated-data-object-declaration](https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html)
*/
type NoDeprecatedDataObjectDeclarationRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated object declaration on data (in Vue.js 3.0.0+).
*
* @see [no-deprecated-data-object-declaration](https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html)
*/
interface NoDeprecatedDataObjectDeclarationRule {
/**
* Disallow using deprecated object declaration on data (in Vue.js 3.0.0+).
*
* @see [no-deprecated-data-object-declaration](https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html)
*/
'vue/no-deprecated-data-object-declaration': NoDeprecatedDataObjectDeclarationRuleConfig;
}
/**
* Disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+).
*
* @see [no-deprecated-destroyed-lifecycle](https://eslint.vuejs.org/rules/no-deprecated-destroyed-lifecycle.html)
*/
type NoDeprecatedDestroyedLifecycleRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+).
*
* @see [no-deprecated-destroyed-lifecycle](https://eslint.vuejs.org/rules/no-deprecated-destroyed-lifecycle.html)
*/
interface NoDeprecatedDestroyedLifecycleRule {
/**
* Disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+).
*
* @see [no-deprecated-destroyed-lifecycle](https://eslint.vuejs.org/rules/no-deprecated-destroyed-lifecycle.html)
*/
'vue/no-deprecated-destroyed-lifecycle': NoDeprecatedDestroyedLifecycleRuleConfig;
}
/**
* Disallow using deprecated `$listeners` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-listeners-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-listeners-api.html)
*/
type NoDeprecatedDollarListenersApiRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `$listeners` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-listeners-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-listeners-api.html)
*/
interface NoDeprecatedDollarListenersApiRule {
/**
* Disallow using deprecated `$listeners` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-listeners-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-listeners-api.html)
*/
'vue/no-deprecated-dollar-listeners-api': NoDeprecatedDollarListenersApiRuleConfig;
}
/**
* Disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-scopedslots-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-scopedslots-api.html)
*/
type NoDeprecatedDollarScopedslotsApiRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-scopedslots-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-scopedslots-api.html)
*/
interface NoDeprecatedDollarScopedslotsApiRule {
/**
* Disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-dollar-scopedslots-api](https://eslint.vuejs.org/rules/no-deprecated-dollar-scopedslots-api.html)
*/
'vue/no-deprecated-dollar-scopedslots-api': NoDeprecatedDollarScopedslotsApiRuleConfig;
}
/**
* Disallow using deprecated events api (in Vue.js 3.0.0+).
*
* @see [no-deprecated-events-api](https://eslint.vuejs.org/rules/no-deprecated-events-api.html)
*/
type NoDeprecatedEventsApiRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated events api (in Vue.js 3.0.0+).
*
* @see [no-deprecated-events-api](https://eslint.vuejs.org/rules/no-deprecated-events-api.html)
*/
interface NoDeprecatedEventsApiRule {
/**
* Disallow using deprecated events api (in Vue.js 3.0.0+).
*
* @see [no-deprecated-events-api](https://eslint.vuejs.org/rules/no-deprecated-events-api.html)
*/
'vue/no-deprecated-events-api': NoDeprecatedEventsApiRuleConfig;
}
/**
* Disallow using deprecated filters syntax (in Vue.js 3.0.0+).
*
* @see [no-deprecated-filter](https://eslint.vuejs.org/rules/no-deprecated-filter.html)
*/
type NoDeprecatedFilterRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated filters syntax (in Vue.js 3.0.0+).
*
* @see [no-deprecated-filter](https://eslint.vuejs.org/rules/no-deprecated-filter.html)
*/
interface NoDeprecatedFilterRule {
/**
* Disallow using deprecated filters syntax (in Vue.js 3.0.0+).
*
* @see [no-deprecated-filter](https://eslint.vuejs.org/rules/no-deprecated-filter.html)
*/
'vue/no-deprecated-filter': NoDeprecatedFilterRuleConfig;
}
/**
* Disallow using deprecated the `functional` template (in Vue.js 3.0.0+).
*
* @see [no-deprecated-functional-template](https://eslint.vuejs.org/rules/no-deprecated-functional-template.html)
*/
type NoDeprecatedFunctionalTemplateRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated the `functional` template (in Vue.js 3.0.0+).
*
* @see [no-deprecated-functional-template](https://eslint.vuejs.org/rules/no-deprecated-functional-template.html)
*/
interface NoDeprecatedFunctionalTemplateRule {
/**
* Disallow using deprecated the `functional` template (in Vue.js 3.0.0+).
*
* @see [no-deprecated-functional-template](https://eslint.vuejs.org/rules/no-deprecated-functional-template.html)
*/
'vue/no-deprecated-functional-template': NoDeprecatedFunctionalTemplateRuleConfig;
}
/**
* Disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+).
*
* @see [no-deprecated-html-element-is](https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html)
*/
type NoDeprecatedHtmlElementIsRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+).
*
* @see [no-deprecated-html-element-is](https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html)
*/
interface NoDeprecatedHtmlElementIsRule {
/**
* Disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+).
*
* @see [no-deprecated-html-element-is](https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html)
*/
'vue/no-deprecated-html-element-is': NoDeprecatedHtmlElementIsRuleConfig;
}
/**
* Disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+).
*
* @see [no-deprecated-inline-template](https://eslint.vuejs.org/rules/no-deprecated-inline-template.html)
*/
type NoDeprecatedInlineTemplateRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+).
*
* @see [no-deprecated-inline-template](https://eslint.vuejs.org/rules/no-deprecated-inline-template.html)
*/
interface NoDeprecatedInlineTemplateRule {
/**
* Disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+).
*
* @see [no-deprecated-inline-template](https://eslint.vuejs.org/rules/no-deprecated-inline-template.html)
*/
'vue/no-deprecated-inline-template': NoDeprecatedInlineTemplateRuleConfig;
}
/**
* Option.
*/
interface NoDeprecatedModelDefinitionOption {
allowVue3Compat?: boolean;
}
/**
* Options.
*/
type NoDeprecatedModelDefinitionOptions = [
NoDeprecatedModelDefinitionOption?,
];
/**
* Disallow deprecated `model` definition (in Vue.js 3.0.0+).
*
* @see [no-deprecated-model-definition](https://eslint.vuejs.org/rules/no-deprecated-model-definition.html)
*/
type NoDeprecatedModelDefinitionRuleConfig =
RuleConfig<NoDeprecatedModelDefinitionOptions>;
/**
* Disallow deprecated `model` definition (in Vue.js 3.0.0+).
*
* @see [no-deprecated-model-definition](https://eslint.vuejs.org/rules/no-deprecated-model-definition.html)
*/
interface NoDeprecatedModelDefinitionRule {
/**
* Disallow deprecated `model` definition (in Vue.js 3.0.0+).
*
* @see [no-deprecated-model-definition](https://eslint.vuejs.org/rules/no-deprecated-model-definition.html)
*/
'vue/no-deprecated-model-definition': NoDeprecatedModelDefinitionRuleConfig;
}
/**
* Disallow deprecated `this` access in props default function (in Vue.js 3.0.0+).
*
* @see [no-deprecated-props-default-this](https://eslint.vuejs.org/rules/no-deprecated-props-default-this.html)
*/
type NoDeprecatedPropsDefaultThisRuleConfig = RuleConfig<[]>;
/**
* Disallow deprecated `this` access in props default function (in Vue.js 3.0.0+).
*
* @see [no-deprecated-props-default-this](https://eslint.vuejs.org/rules/no-deprecated-props-default-this.html)
*/
interface NoDeprecatedPropsDefaultThisRule {
/**
* Disallow deprecated `this` access in props default function (in Vue.js 3.0.0+).
*
* @see [no-deprecated-props-default-this](https://eslint.vuejs.org/rules/no-deprecated-props-default-this.html)
*/
'vue/no-deprecated-props-default-this': NoDeprecatedPropsDefaultThisRuleConfig;
}
/**
* Option.
*/
interface NoDeprecatedRouterLinkTagPropOption {
/**
* @minItems 1
*/
components?: [string, ...string[]];
}
/**
* Options.
*/
type NoDeprecatedRouterLinkTagPropOptions = [
NoDeprecatedRouterLinkTagPropOption?,
];
/**
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
*/
type NoDeprecatedRouterLinkTagPropRuleConfig =
RuleConfig<NoDeprecatedRouterLinkTagPropOptions>;
/**
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
*/
interface NoDeprecatedRouterLinkTagPropRule {
/**
* Disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-router-link-tag-prop](https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html)
*/
'vue/no-deprecated-router-link-tag-prop': NoDeprecatedRouterLinkTagPropRuleConfig;
}
/**
* Disallow deprecated `scope` attribute (in Vue.js 2.5.0+).
*
* @see [no-deprecated-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html)
*/
type NoDeprecatedScopeAttributeRuleConfig = RuleConfig<[]>;
/**
* Disallow deprecated `scope` attribute (in Vue.js 2.5.0+).
*
* @see [no-deprecated-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html)
*/
interface NoDeprecatedScopeAttributeRule {
/**
* Disallow deprecated `scope` attribute (in Vue.js 2.5.0+).
*
* @see [no-deprecated-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html)
*/
'vue/no-deprecated-scope-attribute': NoDeprecatedScopeAttributeRuleConfig;
}
/**
* Disallow deprecated `slot` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html)
*/
type NoDeprecatedSlotAttributeRuleConfig = RuleConfig<[]>;
/**
* Disallow deprecated `slot` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html)
*/
interface NoDeprecatedSlotAttributeRule {
/**
* Disallow deprecated `slot` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html)
*/
'vue/no-deprecated-slot-attribute': NoDeprecatedSlotAttributeRuleConfig;
}
/**
* Disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html)
*/
type NoDeprecatedSlotScopeAttributeRuleConfig = RuleConfig<[]>;
/**
* Disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html)
*/
interface NoDeprecatedSlotScopeAttributeRule {
/**
* Disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+).
*
* @see [no-deprecated-slot-scope-attribute](https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html)
*/
'vue/no-deprecated-slot-scope-attribute': NoDeprecatedSlotScopeAttributeRuleConfig;
}
/**
* Disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-bind-sync](https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html)
*/
type NoDeprecatedVBindSyncRuleConfig = RuleConfig<[]>;
/**
* Disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-bind-sync](https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html)
*/
interface NoDeprecatedVBindSyncRule {
/**
* Disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-bind-sync](https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html)
*/
'vue/no-deprecated-v-bind-sync': NoDeprecatedVBindSyncRuleConfig;
}
/**
* Disallow deprecated `v-is` directive (in Vue.js 3.1.0+).
*
* @see [no-deprecated-v-is](https://eslint.vuejs.org/rules/no-deprecated-v-is.html)
*/
type NoDeprecatedVIsRuleConfig = RuleConfig<[]>;
/**
* Disallow deprecated `v-is` directive (in Vue.js 3.1.0+).
*
* @see [no-deprecated-v-is](https://eslint.vuejs.org/rules/no-deprecated-v-is.html)
*/
interface NoDeprecatedVIsRule {
/**
* Disallow deprecated `v-is` directive (in Vue.js 3.1.0+).
*
* @see [no-deprecated-v-is](https://eslint.vuejs.org/rules/no-deprecated-v-is.html)
*/
'vue/no-deprecated-v-is': NoDeprecatedVIsRuleConfig;
}
/**
* Disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-native-modifier](https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html)
*/
type NoDeprecatedVOnNativeModifierRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-native-modifier](https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html)
*/
interface NoDeprecatedVOnNativeModifierRule {
/**
* Disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-native-modifier](https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html)
*/
'vue/no-deprecated-v-on-native-modifier': NoDeprecatedVOnNativeModifierRuleConfig;
}
/**
* Disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-number-modifiers](https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html)
*/
type NoDeprecatedVOnNumberModifiersRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-number-modifiers](https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html)
*/
interface NoDeprecatedVOnNumberModifiersRule {
/**
* Disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+).
*
* @see [no-deprecated-v-on-number-modifiers](https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html)
*/
'vue/no-deprecated-v-on-number-modifiers': NoDeprecatedVOnNumberModifiersRuleConfig;
}
/**
* Disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-vue-config-keycodes](https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html)
*/
type NoDeprecatedVueConfigKeycodesRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-vue-config-keycodes](https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html)
*/
interface NoDeprecatedVueConfigKeycodesRule {
/**
* Disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+).
*
* @see [no-deprecated-vue-config-keycodes](https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html)
*/
'vue/no-deprecated-vue-config-keycodes': NoDeprecatedVueConfigKeycodesRuleConfig;
}
/**
* Option.
*/
interface NoDupeKeysOption {
groups?: any[];
}
/**
* Options.
*/
type NoDupeKeysOptions = [NoDupeKeysOption?];
/**
* Disallow duplication of field names.
*
* @see [no-dupe-keys](https://eslint.vuejs.org/rules/no-dupe-keys.html)
*/
type NoDupeKeysRuleConfig = RuleConfig<NoDupeKeysOptions>;
/**
* Disallow duplication of field names.
*
* @see [no-dupe-keys](https://eslint.vuejs.org/rules/no-dupe-keys.html)
*/
interface NoDupeKeysRule {
/**
* Disallow duplication of field names.
*
* @see [no-dupe-keys](https://eslint.vuejs.org/rules/no-dupe-keys.html)
*/
'vue/no-dupe-keys': NoDupeKeysRuleConfig;
}
/**
* Disallow duplicate conditions in `v-if` / `v-else-if` chains.
*
* @see [no-dupe-v-else-if](https://eslint.vuejs.org/rules/no-dupe-v-else-if.html)
*/
type NoDupeVElseIfRuleConfig = RuleConfig<[]>;
/**
* Disallow duplicate conditions in `v-if` / `v-else-if` chains.
*
* @see [no-dupe-v-else-if](https://eslint.vuejs.org/rules/no-dupe-v-else-if.html)
*/
interface NoDupeVElseIfRule {
/**
* Disallow duplicate conditions in `v-if` / `v-else-if` chains.
*
* @see [no-dupe-v-else-if](https://eslint.vuejs.org/rules/no-dupe-v-else-if.html)
*/
'vue/no-dupe-v-else-if': NoDupeVElseIfRuleConfig;
}
/**
* Enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`.
*
* @see [no-duplicate-attr-inheritance](https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html)
*/
type NoDuplicateAttrInheritanceRuleConfig = RuleConfig<[]>;
/**
* Enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`.
*
* @see [no-duplicate-attr-inheritance](https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html)
*/
interface NoDuplicateAttrInheritanceRule {
/**
* Enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`.
*
* @see [no-duplicate-attr-inheritance](https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html)
*/
'vue/no-duplicate-attr-inheritance': NoDuplicateAttrInheritanceRuleConfig;
}
/**
* Option.
*/
interface NoDuplicateAttributesOption {
allowCoexistClass?: boolean;
allowCoexistStyle?: boolean;
}
/**
* Options.
*/
type NoDuplicateAttributesOptions = [NoDuplicateAttributesOption?];
/**
* Disallow duplication of attributes.
*
* @see [no-duplicate-attributes](https://eslint.vuejs.org/rules/no-duplicate-attributes.html)
*/
type NoDuplicateAttributesRuleConfig =
RuleConfig<NoDuplicateAttributesOptions>;
/**
* Disallow duplication of attributes.
*
* @see [no-duplicate-attributes](https://eslint.vuejs.org/rules/no-duplicate-attributes.html)
*/
interface NoDuplicateAttributesRule {
/**
* Disallow duplication of attributes.
*
* @see [no-duplicate-attributes](https://eslint.vuejs.org/rules/no-duplicate-attributes.html)
*/
'vue/no-duplicate-attributes': NoDuplicateAttributesRuleConfig;
}
/**
* Disallow the `<template>` `<script>` `<style>` block to be empty.
*
* @see [no-empty-component-block](https://eslint.vuejs.org/rules/no-empty-component-block.html)
*/
type NoEmptyComponentBlockRuleConfig = RuleConfig<[]>;
/**
* Disallow the `<template>` `<script>` `<style>` block to be empty.
*
* @see [no-empty-component-block](https://eslint.vuejs.org/rules/no-empty-component-block.html)
*/
interface NoEmptyComponentBlockRule {
/**
* Disallow the `<template>` `<script>` `<style>` block to be empty.
*
* @see [no-empty-component-block](https://eslint.vuejs.org/rules/no-empty-component-block.html)
*/
'vue/no-empty-component-block': NoEmptyComponentBlockRuleConfig;
}
/**
* Option.
*/
interface NoEmptyPatternOption {
allowObjectPatternsAsParameters?: boolean;
}
/**
* Options.
*/
type NoEmptyPatternOptions = [NoEmptyPatternOption?];
/**
* Disallow empty destructuring patterns in `<template>`.
*
* @see [no-empty-pattern](https://eslint.vuejs.org/rules/no-empty-pattern.html)
*/
type NoEmptyPatternRuleConfig = RuleConfig<NoEmptyPatternOptions>;
/**
* Disallow empty destructuring patterns in `<template>`.
*
* @see [no-empty-pattern](https://eslint.vuejs.org/rules/no-empty-pattern.html)
*/
interface NoEmptyPatternRule {
/**
* Disallow empty destructuring patterns in `<template>`.
*
* @see [no-empty-pattern](https://eslint.vuejs.org/rules/no-empty-pattern.html)
*/
'vue/no-empty-pattern': NoEmptyPatternRuleConfig;
}
/**
* Disallow `export` in `<script setup>`.
*
* @see [no-export-in-script-setup](https://eslint.vuejs.org/rules/no-export-in-script-setup.html)
*/
type NoExportInScriptSetupRuleConfig = RuleConfig<[]>;
/**
* Disallow `export` in `<script setup>`.
*
* @see [no-export-in-script-setup](https://eslint.vuejs.org/rules/no-export-in-script-setup.html)
*/
interface NoExportInScriptSetupRule {
/**
* Disallow `export` in `<script setup>`.
*
* @see [no-export-in-script-setup](https://eslint.vuejs.org/rules/no-export-in-script-setup.html)
*/
'vue/no-export-in-script-setup': NoExportInScriptSetupRuleConfig;
}
/**
* Disallow asynchronously registered `expose`.
*
* @see [no-expose-after-await](https://eslint.vuejs.org/rules/no-expose-after-await.html)
*/
type NoExposeAfterAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow asynchronously registered `expose`.
*
* @see [no-expose-after-await](https://eslint.vuejs.org/rules/no-expose-after-await.html)
*/
interface NoExposeAfterAwaitRule {
/**
* Disallow asynchronously registered `expose`.
*
* @see [no-expose-after-await](https://eslint.vuejs.org/rules/no-expose-after-await.html)
*/
'vue/no-expose-after-await': NoExposeAfterAwaitRuleConfig;
}
/**
* Option.
*/
type NoExtraParensOption =
| []
| ['functions']
| []
| ['all']
| [
'all',
{
conditionalAssign?: boolean;
ternaryOperandBinaryExpressions?: boolean;
nestedBinaryExpressions?: boolean;
returnAssign?: boolean;
ignoreJSX?: 'none' | 'all' | 'single-line' | 'multi-line';
enforceForArrowConditionals?: boolean;
enforceForSequenceExpressions?: boolean;
enforceForNewInMemberExpressions?: boolean;
enforceForFunctionPrototypeMethods?: boolean;
allowParensAfterCommentPattern?: string;
},
];
/**
* Options.
*/
type NoExtraParensOptions = NoExtraParensOption;
/**
* Disallow unnecessary parentheses in `<template>`.
*
* @see [no-extra-parens](https://eslint.vuejs.org/rules/no-extra-parens.html)
*/
type NoExtraParensRuleConfig = RuleConfig<NoExtraParensOptions>;
/**
* Disallow unnecessary parentheses in `<template>`.
*
* @see [no-extra-parens](https://eslint.vuejs.org/rules/no-extra-parens.html)
*/
interface NoExtraParensRule {
/**
* Disallow unnecessary parentheses in `<template>`.
*
* @see [no-extra-parens](https://eslint.vuejs.org/rules/no-extra-parens.html)
*/
'vue/no-extra-parens': NoExtraParensRuleConfig;
}
/**
* Require valid keys in model option.
*
* @deprecated
*
* @see [no-invalid-model-keys](https://eslint.vuejs.org/rules/no-invalid-model-keys.html)
*/
type NoInvalidModelKeysRuleConfig = RuleConfig<[]>;
/**
* Require valid keys in model option.
*
* @deprecated
*
* @see [no-invalid-model-keys](https://eslint.vuejs.org/rules/no-invalid-model-keys.html)
*/
interface NoInvalidModelKeysRule {
/**
* Require valid keys in model option.
*
* @deprecated
*
* @see [no-invalid-model-keys](https://eslint.vuejs.org/rules/no-invalid-model-keys.html)
*/
'vue/no-invalid-model-keys': NoInvalidModelKeysRuleConfig;
}
/**
* Option.
*/
interface NoIrregularWhitespaceOption$1 {
skipComments?: boolean;
skipStrings?: boolean;
skipTemplates?: boolean;
skipRegExps?: boolean;
skipHTMLAttributeValues?: boolean;
skipHTMLTextContents?: boolean;
}
/**
* Options.
*/
type NoIrregularWhitespaceOptions$1 = [NoIrregularWhitespaceOption$1?];
/**
* Disallow irregular whitespace in `.vue` files.
*
* @see [no-irregular-whitespace](https://eslint.vuejs.org/rules/no-irregular-whitespace.html)
*/
type NoIrregularWhitespaceRuleConfig$1 =
RuleConfig<NoIrregularWhitespaceOptions$1>;
/**
* Disallow irregular whitespace in `.vue` files.
*
* @see [no-irregular-whitespace](https://eslint.vuejs.org/rules/no-irregular-whitespace.html)
*/
interface NoIrregularWhitespaceRule$1 {
/**
* Disallow irregular whitespace in `.vue` files.
*
* @see [no-irregular-whitespace](https://eslint.vuejs.org/rules/no-irregular-whitespace.html)
*/
'vue/no-irregular-whitespace': NoIrregularWhitespaceRuleConfig$1;
}
/**
* Disallow asynchronously registered lifecycle hooks.
*
* @see [no-lifecycle-after-await](https://eslint.vuejs.org/rules/no-lifecycle-after-await.html)
*/
type NoLifecycleAfterAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow asynchronously registered lifecycle hooks.
*
* @see [no-lifecycle-after-await](https://eslint.vuejs.org/rules/no-lifecycle-after-await.html)
*/
interface NoLifecycleAfterAwaitRule {
/**
* Disallow asynchronously registered lifecycle hooks.
*
* @see [no-lifecycle-after-await](https://eslint.vuejs.org/rules/no-lifecycle-after-await.html)
*/
'vue/no-lifecycle-after-await': NoLifecycleAfterAwaitRuleConfig;
}
/**
* Option.
*/
interface NoLoneTemplateOption {
ignoreAccessible?: boolean;
}
/**
* Options.
*/
type NoLoneTemplateOptions = [NoLoneTemplateOption?];
/**
* Disallow unnecessary `<template>`.
*
* @see [no-lone-template](https://eslint.vuejs.org/rules/no-lone-template.html)
*/
type NoLoneTemplateRuleConfig = RuleConfig<NoLoneTemplateOptions>;
/**
* Disallow unnecessary `<template>`.
*
* @see [no-lone-template](https://eslint.vuejs.org/rules/no-lone-template.html)
*/
interface NoLoneTemplateRule {
/**
* Disallow unnecessary `<template>`.
*
* @see [no-lone-template](https://eslint.vuejs.org/rules/no-lone-template.html)
*/
'vue/no-lone-template': NoLoneTemplateRuleConfig;
}
/**
* Disallow literal numbers that lose precision in `<template>`.
*
* @see [no-loss-of-precision](https://eslint.vuejs.org/rules/no-loss-of-precision.html)
*/
type NoLossOfPrecisionRuleConfig = RuleConfig<[]>;
/**
* Disallow literal numbers that lose precision in `<template>`.
*
* @see [no-loss-of-precision](https://eslint.vuejs.org/rules/no-loss-of-precision.html)
*/
interface NoLossOfPrecisionRule {
/**
* Disallow literal numbers that lose precision in `<template>`.
*
* @see [no-loss-of-precision](https://eslint.vuejs.org/rules/no-loss-of-precision.html)
*/
'vue/no-loss-of-precision': NoLossOfPrecisionRuleConfig;
}
/**
* Option.
*/
interface NoMultiSpacesOption {
ignoreProperties?: boolean;
}
/**
* Options.
*/
type NoMultiSpacesOptions = [NoMultiSpacesOption?];
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.vuejs.org/rules/no-multi-spaces.html)
*/
type NoMultiSpacesRuleConfig = RuleConfig<NoMultiSpacesOptions>;
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.vuejs.org/rules/no-multi-spaces.html)
*/
interface NoMultiSpacesRule {
/**
* Disallow multiple spaces.
*
* @see [no-multi-spaces](https://eslint.vuejs.org/rules/no-multi-spaces.html)
*/
'vue/no-multi-spaces': NoMultiSpacesRuleConfig;
}
/**
* Disallow to pass multiple objects into array to class.
*
* @see [no-multiple-objects-in-class](https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html)
*/
type NoMultipleObjectsInClassRuleConfig = RuleConfig<[]>;
/**
* Disallow to pass multiple objects into array to class.
*
* @see [no-multiple-objects-in-class](https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html)
*/
interface NoMultipleObjectsInClassRule {
/**
* Disallow to pass multiple objects into array to class.
*
* @see [no-multiple-objects-in-class](https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html)
*/
'vue/no-multiple-objects-in-class': NoMultipleObjectsInClassRuleConfig;
}
/**
* Disallow to pass multiple arguments to scoped slots.
*
* @see [no-multiple-slot-args](https://eslint.vuejs.org/rules/no-multiple-slot-args.html)
*/
type NoMultipleSlotArgsRuleConfig = RuleConfig<[]>;
/**
* Disallow to pass multiple arguments to scoped slots.
*
* @see [no-multiple-slot-args](https://eslint.vuejs.org/rules/no-multiple-slot-args.html)
*/
interface NoMultipleSlotArgsRule {
/**
* Disallow to pass multiple arguments to scoped slots.
*
* @see [no-multiple-slot-args](https://eslint.vuejs.org/rules/no-multiple-slot-args.html)
*/
'vue/no-multiple-slot-args': NoMultipleSlotArgsRuleConfig;
}
/**
* Disallow adding multiple root nodes to the template.
*
* @see [no-multiple-template-root](https://eslint.vuejs.org/rules/no-multiple-template-root.html)
*/
type NoMultipleTemplateRootRuleConfig = RuleConfig<[]>;
/**
* Disallow adding multiple root nodes to the template.
*
* @see [no-multiple-template-root](https://eslint.vuejs.org/rules/no-multiple-template-root.html)
*/
interface NoMultipleTemplateRootRule {
/**
* Disallow adding multiple root nodes to the template.
*
* @see [no-multiple-template-root](https://eslint.vuejs.org/rules/no-multiple-template-root.html)
*/
'vue/no-multiple-template-root': NoMultipleTemplateRootRuleConfig;
}
/**
* Option.
*/
interface NoMutatingPropsOption {
shallowOnly?: boolean;
}
/**
* Options.
*/
type NoMutatingPropsOptions = [NoMutatingPropsOption?];
/**
* Disallow mutation of component props.
*
* @see [no-mutating-props](https://eslint.vuejs.org/rules/no-mutating-props.html)
*/
type NoMutatingPropsRuleConfig = RuleConfig<NoMutatingPropsOptions>;
/**
* Disallow mutation of component props.
*
* @see [no-mutating-props](https://eslint.vuejs.org/rules/no-mutating-props.html)
*/
interface NoMutatingPropsRule {
/**
* Disallow mutation of component props.
*
* @see [no-mutating-props](https://eslint.vuejs.org/rules/no-mutating-props.html)
*/
'vue/no-mutating-props': NoMutatingPropsRuleConfig;
}
/**
* Option.
*/
interface NoParsingErrorOption$1 {
'abrupt-closing-of-empty-comment'?: boolean;
'absence-of-digits-in-numeric-character-reference'?: boolean;
'cdata-in-html-content'?: boolean;
'character-reference-outside-unicode-range'?: boolean;
'control-character-in-input-stream'?: boolean;
'control-character-reference'?: boolean;
'eof-before-tag-name'?: boolean;
'eof-in-cdata'?: boolean;
'eof-in-comment'?: boolean;
'eof-in-tag'?: boolean;
'incorrectly-closed-comment'?: boolean;
'incorrectly-opened-comment'?: boolean;
'invalid-first-character-of-tag-name'?: boolean;
'missing-attribute-value'?: boolean;
'missing-end-tag-name'?: boolean;
'missing-semicolon-after-character-reference'?: boolean;
'missing-whitespace-between-attributes'?: boolean;
'nested-comment'?: boolean;
'noncharacter-character-reference'?: boolean;
'noncharacter-in-input-stream'?: boolean;
'null-character-reference'?: boolean;
'surrogate-character-reference'?: boolean;
'surrogate-in-input-stream'?: boolean;
'unexpected-character-in-attribute-name'?: boolean;
'unexpected-character-in-unquoted-attribute-value'?: boolean;
'unexpected-equals-sign-before-attribute-name'?: boolean;
'unexpected-null-character'?: boolean;
'unexpected-question-mark-instead-of-tag-name'?: boolean;
'unexpected-solidus-in-tag'?: boolean;
'unknown-named-character-reference'?: boolean;
'end-tag-with-attributes'?: boolean;
'duplicate-attribute'?: boolean;
'end-tag-with-trailing-solidus'?: boolean;
'non-void-html-element-start-tag-with-trailing-solidus'?: boolean;
'x-invalid-end-tag'?: boolean;
'x-invalid-namespace'?: boolean;
}
/**
* Options.
*/
type NoParsingErrorOptions$1 = [NoParsingErrorOption$1?];
/**
* Disallow parsing errors in `<template>`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
type NoParsingErrorRuleConfig$1 = RuleConfig<NoParsingErrorOptions$1>;
/**
* Disallow parsing errors in `<template>`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
interface NoParsingErrorRule$1 {
/**
* Disallow parsing errors in `<template>`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
'vue/no-parsing-error': NoParsingErrorRuleConfig$1;
}
/**
* Option.
*/
interface NoPotentialComponentOptionTypoOption {
/**
* @minItems 0
*/
presets?: ('all' | 'vue' | 'vue-router' | 'nuxt')[];
/**
* @minItems 0
*/
custom?: string[];
threshold?: number;
}
/**
* Options.
*/
type NoPotentialComponentOptionTypoOptions = [
NoPotentialComponentOptionTypoOption?,
];
/**
* Disallow a potential typo in your component property.
*
* @see [no-potential-component-option-typo](https://eslint.vuejs.org/rules/no-potential-component-option-typo.html)
*/
type NoPotentialComponentOptionTypoRuleConfig =
RuleConfig<NoPotentialComponentOptionTypoOptions>;
/**
* Disallow a potential typo in your component property.
*
* @see [no-potential-component-option-typo](https://eslint.vuejs.org/rules/no-potential-component-option-typo.html)
*/
interface NoPotentialComponentOptionTypoRule {
/**
* Disallow a potential typo in your component property.
*
* @see [no-potential-component-option-typo](https://eslint.vuejs.org/rules/no-potential-component-option-typo.html)
*/
'vue/no-potential-component-option-typo': NoPotentialComponentOptionTypoRuleConfig;
}
/**
* Disallow use of value wrapped by `ref()` (Composition API) as an operand.
*
* @see [no-ref-as-operand](https://eslint.vuejs.org/rules/no-ref-as-operand.html)
*/
type NoRefAsOperandRuleConfig = RuleConfig<[]>;
/**
* Disallow use of value wrapped by `ref()` (Composition API) as an operand.
*
* @see [no-ref-as-operand](https://eslint.vuejs.org/rules/no-ref-as-operand.html)
*/
interface NoRefAsOperandRule {
/**
* Disallow use of value wrapped by `ref()` (Composition API) as an operand.
*
* @see [no-ref-as-operand](https://eslint.vuejs.org/rules/no-ref-as-operand.html)
*/
'vue/no-ref-as-operand': NoRefAsOperandRuleConfig;
}
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @deprecated
*
* @see [no-ref-object-destructure](https://eslint.vuejs.org/rules/no-ref-object-destructure.html)
*/
type NoRefObjectDestructureRuleConfig = RuleConfig<[]>;
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @deprecated
*
* @see [no-ref-object-destructure](https://eslint.vuejs.org/rules/no-ref-object-destructure.html)
*/
interface NoRefObjectDestructureRule {
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @deprecated
*
* @see [no-ref-object-destructure](https://eslint.vuejs.org/rules/no-ref-object-destructure.html)
*/
'vue/no-ref-object-destructure': NoRefObjectDestructureRuleConfig;
}
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @see [no-ref-object-reactivity-loss](https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html)
*/
type NoRefObjectReactivityLossRuleConfig = RuleConfig<[]>;
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @see [no-ref-object-reactivity-loss](https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html)
*/
interface NoRefObjectReactivityLossRule {
/**
* Disallow usages of ref objects that can lead to loss of reactivity.
*
* @see [no-ref-object-reactivity-loss](https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html)
*/
'vue/no-ref-object-reactivity-loss': NoRefObjectReactivityLossRuleConfig;
}
/**
* Option.
*/
interface NoRequiredPropWithDefaultOption {
autofix?: boolean;
}
/**
* Options.
*/
type NoRequiredPropWithDefaultOptions = [
NoRequiredPropWithDefaultOption?,
];
/**
* Enforce props with default values to be optional.
*
* @see [no-required-prop-with-default](https://eslint.vuejs.org/rules/no-required-prop-with-default.html)
*/
type NoRequiredPropWithDefaultRuleConfig =
RuleConfig<NoRequiredPropWithDefaultOptions>;
/**
* Enforce props with default values to be optional.
*
* @see [no-required-prop-with-default](https://eslint.vuejs.org/rules/no-required-prop-with-default.html)
*/
interface NoRequiredPropWithDefaultRule {
/**
* Enforce props with default values to be optional.
*
* @see [no-required-prop-with-default](https://eslint.vuejs.org/rules/no-required-prop-with-default.html)
*/
'vue/no-required-prop-with-default': NoRequiredPropWithDefaultRuleConfig;
}
/**
* Option.
*/
interface NoReservedComponentNamesOption {
disallowVueBuiltInComponents?: boolean;
disallowVue3BuiltInComponents?: boolean;
}
/**
* Options.
*/
type NoReservedComponentNamesOptions = [NoReservedComponentNamesOption?];
/**
* Disallow the use of reserved names in component definitions.
*
* @see [no-reserved-component-names](https://eslint.vuejs.org/rules/no-reserved-component-names.html)
*/
type NoReservedComponentNamesRuleConfig =
RuleConfig<NoReservedComponentNamesOptions>;
/**
* Disallow the use of reserved names in component definitions.
*
* @see [no-reserved-component-names](https://eslint.vuejs.org/rules/no-reserved-component-names.html)
*/
interface NoReservedComponentNamesRule {
/**
* Disallow the use of reserved names in component definitions.
*
* @see [no-reserved-component-names](https://eslint.vuejs.org/rules/no-reserved-component-names.html)
*/
'vue/no-reserved-component-names': NoReservedComponentNamesRuleConfig;
}
/**
* Option.
*/
interface NoReservedKeysOption {
reserved?: any[];
groups?: any[];
}
/**
* Options.
*/
type NoReservedKeysOptions = [NoReservedKeysOption?];
/**
* Disallow overwriting reserved keys.
*
* @see [no-reserved-keys](https://eslint.vuejs.org/rules/no-reserved-keys.html)
*/
type NoReservedKeysRuleConfig = RuleConfig<NoReservedKeysOptions>;
/**
* Disallow overwriting reserved keys.
*
* @see [no-reserved-keys](https://eslint.vuejs.org/rules/no-reserved-keys.html)
*/
interface NoReservedKeysRule {
/**
* Disallow overwriting reserved keys.
*
* @see [no-reserved-keys](https://eslint.vuejs.org/rules/no-reserved-keys.html)
*/
'vue/no-reserved-keys': NoReservedKeysRuleConfig;
}
/**
* Option.
*/
interface NoReservedPropsOption {
vueVersion?: 2 | 3;
}
/**
* Options.
*/
type NoReservedPropsOptions = [NoReservedPropsOption?];
/**
* Disallow reserved names in props.
*
* @see [no-reserved-props](https://eslint.vuejs.org/rules/no-reserved-props.html)
*/
type NoReservedPropsRuleConfig = RuleConfig<NoReservedPropsOptions>;
/**
* Disallow reserved names in props.
*
* @see [no-reserved-props](https://eslint.vuejs.org/rules/no-reserved-props.html)
*/
interface NoReservedPropsRule {
/**
* Disallow reserved names in props.
*
* @see [no-reserved-props](https://eslint.vuejs.org/rules/no-reserved-props.html)
*/
'vue/no-reserved-props': NoReservedPropsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedBlockOption = (
| string
| {
element: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedBlockOptions = NoRestrictedBlockOption;
/**
* Disallow specific block.
*
* @see [no-restricted-block](https://eslint.vuejs.org/rules/no-restricted-block.html)
*/
type NoRestrictedBlockRuleConfig = RuleConfig<NoRestrictedBlockOptions>;
/**
* Disallow specific block.
*
* @see [no-restricted-block](https://eslint.vuejs.org/rules/no-restricted-block.html)
*/
interface NoRestrictedBlockRule {
/**
* Disallow specific block.
*
* @see [no-restricted-block](https://eslint.vuejs.org/rules/no-restricted-block.html)
*/
'vue/no-restricted-block': NoRestrictedBlockRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedCallAfterAwaitOption = {
module: string;
path?: string | string[];
message?: string;
}[];
/**
* Options.
*/
type NoRestrictedCallAfterAwaitOptions =
NoRestrictedCallAfterAwaitOption;
/**
* Disallow asynchronously called restricted methods.
*
* @see [no-restricted-call-after-await](https://eslint.vuejs.org/rules/no-restricted-call-after-await.html)
*/
type NoRestrictedCallAfterAwaitRuleConfig =
RuleConfig<NoRestrictedCallAfterAwaitOptions>;
/**
* Disallow asynchronously called restricted methods.
*
* @see [no-restricted-call-after-await](https://eslint.vuejs.org/rules/no-restricted-call-after-await.html)
*/
interface NoRestrictedCallAfterAwaitRule {
/**
* Disallow asynchronously called restricted methods.
*
* @see [no-restricted-call-after-await](https://eslint.vuejs.org/rules/no-restricted-call-after-await.html)
*/
'vue/no-restricted-call-after-await': NoRestrictedCallAfterAwaitRuleConfig;
}
/**
* Option.
*/
type NoRestrictedClassOption = string[];
/**
* Options.
*/
type NoRestrictedClassOptions = NoRestrictedClassOption;
/**
* Disallow specific classes in Vue components.
*
* @see [no-restricted-class](https://eslint.vuejs.org/rules/no-restricted-class.html)
*/
type NoRestrictedClassRuleConfig = RuleConfig<NoRestrictedClassOptions>;
/**
* Disallow specific classes in Vue components.
*
* @see [no-restricted-class](https://eslint.vuejs.org/rules/no-restricted-class.html)
*/
interface NoRestrictedClassRule {
/**
* Disallow specific classes in Vue components.
*
* @see [no-restricted-class](https://eslint.vuejs.org/rules/no-restricted-class.html)
*/
'vue/no-restricted-class': NoRestrictedClassRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedComponentNamesOption = (
| string
| {
name: string;
message?: string;
suggest?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedComponentNamesOptions =
NoRestrictedComponentNamesOption;
/**
* Disallow specific component names.
*
* @see [no-restricted-component-names](https://eslint.vuejs.org/rules/no-restricted-component-names.html)
*/
type NoRestrictedComponentNamesRuleConfig =
RuleConfig<NoRestrictedComponentNamesOptions>;
/**
* Disallow specific component names.
*
* @see [no-restricted-component-names](https://eslint.vuejs.org/rules/no-restricted-component-names.html)
*/
interface NoRestrictedComponentNamesRule {
/**
* Disallow specific component names.
*
* @see [no-restricted-component-names](https://eslint.vuejs.org/rules/no-restricted-component-names.html)
*/
'vue/no-restricted-component-names': NoRestrictedComponentNamesRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedComponentOptionsOption = (
| string
| string[]
| {
name: string | string[];
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedComponentOptionsOptions =
NoRestrictedComponentOptionsOption;
/**
* Disallow specific component option.
*
* @see [no-restricted-component-options](https://eslint.vuejs.org/rules/no-restricted-component-options.html)
*/
type NoRestrictedComponentOptionsRuleConfig =
RuleConfig<NoRestrictedComponentOptionsOptions>;
/**
* Disallow specific component option.
*
* @see [no-restricted-component-options](https://eslint.vuejs.org/rules/no-restricted-component-options.html)
*/
interface NoRestrictedComponentOptionsRule {
/**
* Disallow specific component option.
*
* @see [no-restricted-component-options](https://eslint.vuejs.org/rules/no-restricted-component-options.html)
*/
'vue/no-restricted-component-options': NoRestrictedComponentOptionsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedCustomEventOption = (
| string
| {
event: string;
message?: string;
suggest?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedCustomEventOptions = NoRestrictedCustomEventOption;
/**
* Disallow specific custom event.
*
* @see [no-restricted-custom-event](https://eslint.vuejs.org/rules/no-restricted-custom-event.html)
*/
type NoRestrictedCustomEventRuleConfig =
RuleConfig<NoRestrictedCustomEventOptions>;
/**
* Disallow specific custom event.
*
* @see [no-restricted-custom-event](https://eslint.vuejs.org/rules/no-restricted-custom-event.html)
*/
interface NoRestrictedCustomEventRule {
/**
* Disallow specific custom event.
*
* @see [no-restricted-custom-event](https://eslint.vuejs.org/rules/no-restricted-custom-event.html)
*/
'vue/no-restricted-custom-event': NoRestrictedCustomEventRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedHtmlElementsOption = (
| string
| {
element: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedHtmlElementsOptions = NoRestrictedHtmlElementsOption;
/**
* Disallow specific HTML elements.
*
* @see [no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements.html)
*/
type NoRestrictedHtmlElementsRuleConfig =
RuleConfig<NoRestrictedHtmlElementsOptions>;
/**
* Disallow specific HTML elements.
*
* @see [no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements.html)
*/
interface NoRestrictedHtmlElementsRule {
/**
* Disallow specific HTML elements.
*
* @see [no-restricted-html-elements](https://eslint.vuejs.org/rules/no-restricted-html-elements.html)
*/
'vue/no-restricted-html-elements': NoRestrictedHtmlElementsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedPropsOption = (
| string
| {
name: string;
message?: string;
suggest?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedPropsOptions = NoRestrictedPropsOption;
/**
* Disallow specific props.
*
* @see [no-restricted-props](https://eslint.vuejs.org/rules/no-restricted-props.html)
*/
type NoRestrictedPropsRuleConfig = RuleConfig<NoRestrictedPropsOptions>;
/**
* Disallow specific props.
*
* @see [no-restricted-props](https://eslint.vuejs.org/rules/no-restricted-props.html)
*/
interface NoRestrictedPropsRule {
/**
* Disallow specific props.
*
* @see [no-restricted-props](https://eslint.vuejs.org/rules/no-restricted-props.html)
*/
'vue/no-restricted-props': NoRestrictedPropsRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedStaticAttributeOption = (
| string
| {
key: string;
value?: string | true;
element?: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedStaticAttributeOptions =
NoRestrictedStaticAttributeOption;
/**
* Disallow specific attribute.
*
* @see [no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute.html)
*/
type NoRestrictedStaticAttributeRuleConfig =
RuleConfig<NoRestrictedStaticAttributeOptions>;
/**
* Disallow specific attribute.
*
* @see [no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute.html)
*/
interface NoRestrictedStaticAttributeRule {
/**
* Disallow specific attribute.
*
* @see [no-restricted-static-attribute](https://eslint.vuejs.org/rules/no-restricted-static-attribute.html)
*/
'vue/no-restricted-static-attribute': NoRestrictedStaticAttributeRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedSyntaxOption = (
| string
| {
selector: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedSyntaxOptions = NoRestrictedSyntaxOption;
/**
* Disallow specified syntax in `<template>`.
*
* @see [no-restricted-syntax](https://eslint.vuejs.org/rules/no-restricted-syntax.html)
*/
type NoRestrictedSyntaxRuleConfig =
RuleConfig<NoRestrictedSyntaxOptions>;
/**
* Disallow specified syntax in `<template>`.
*
* @see [no-restricted-syntax](https://eslint.vuejs.org/rules/no-restricted-syntax.html)
*/
interface NoRestrictedSyntaxRule {
/**
* Disallow specified syntax in `<template>`.
*
* @see [no-restricted-syntax](https://eslint.vuejs.org/rules/no-restricted-syntax.html)
*/
'vue/no-restricted-syntax': NoRestrictedSyntaxRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 0
*/
type NoRestrictedVBindOption = (
| (string | null)
| {
argument: string | null;
modifiers?: ('prop' | 'camel' | 'sync' | 'attr')[];
element?: string;
message?: string;
}
)[];
/**
* Options.
*/
type NoRestrictedVBindOptions = NoRestrictedVBindOption;
/**
* Disallow specific argument in `v-bind`.
*
* @see [no-restricted-v-bind](https://eslint.vuejs.org/rules/no-restricted-v-bind.html)
*/
type NoRestrictedVBindRuleConfig = RuleConfig<NoRestrictedVBindOptions>;
/**
* Disallow specific argument in `v-bind`.
*
* @see [no-restricted-v-bind](https://eslint.vuejs.org/rules/no-restricted-v-bind.html)
*/
interface NoRestrictedVBindRule {
/**
* Disallow specific argument in `v-bind`.
*
* @see [no-restricted-v-bind](https://eslint.vuejs.org/rules/no-restricted-v-bind.html)
*/
'vue/no-restricted-v-bind': NoRestrictedVBindRuleConfig;
}
/**
* Disallow `v-if` directives on root element.
*
* @see [no-root-v-if](https://eslint.vuejs.org/rules/no-root-v-if.html)
*/
type NoRootVIfRuleConfig = RuleConfig<[]>;
/**
* Disallow `v-if` directives on root element.
*
* @see [no-root-v-if](https://eslint.vuejs.org/rules/no-root-v-if.html)
*/
interface NoRootVIfRule {
/**
* Disallow `v-if` directives on root element.
*
* @see [no-root-v-if](https://eslint.vuejs.org/rules/no-root-v-if.html)
*/
'vue/no-root-v-if': NoRootVIfRuleConfig;
}
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @deprecated
*
* @see [no-setup-props-destructure](https://eslint.vuejs.org/rules/no-setup-props-destructure.html)
*/
type NoSetupPropsDestructureRuleConfig = RuleConfig<[]>;
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @deprecated
*
* @see [no-setup-props-destructure](https://eslint.vuejs.org/rules/no-setup-props-destructure.html)
*/
interface NoSetupPropsDestructureRule {
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @deprecated
*
* @see [no-setup-props-destructure](https://eslint.vuejs.org/rules/no-setup-props-destructure.html)
*/
'vue/no-setup-props-destructure': NoSetupPropsDestructureRuleConfig;
}
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @see [no-setup-props-reactivity-loss](https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html)
*/
type NoSetupPropsReactivityLossRuleConfig = RuleConfig<[]>;
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @see [no-setup-props-reactivity-loss](https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html)
*/
interface NoSetupPropsReactivityLossRule {
/**
* Disallow usages that lose the reactivity of `props` passed to `setup`.
*
* @see [no-setup-props-reactivity-loss](https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html)
*/
'vue/no-setup-props-reactivity-loss': NoSetupPropsReactivityLossRuleConfig;
}
/**
* Enforce component's data property to be a function.
*
* @see [no-shared-component-data](https://eslint.vuejs.org/rules/no-shared-component-data.html)
*/
type NoSharedComponentDataRuleConfig = RuleConfig<[]>;
/**
* Enforce component's data property to be a function.
*
* @see [no-shared-component-data](https://eslint.vuejs.org/rules/no-shared-component-data.html)
*/
interface NoSharedComponentDataRule {
/**
* Enforce component's data property to be a function.
*
* @see [no-shared-component-data](https://eslint.vuejs.org/rules/no-shared-component-data.html)
*/
'vue/no-shared-component-data': NoSharedComponentDataRuleConfig;
}
/**
* Disallow side effects in computed properties.
*
* @see [no-side-effects-in-computed-properties](https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html)
*/
type NoSideEffectsInComputedPropertiesRuleConfig = RuleConfig<[]>;
/**
* Disallow side effects in computed properties.
*
* @see [no-side-effects-in-computed-properties](https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html)
*/
interface NoSideEffectsInComputedPropertiesRule {
/**
* Disallow side effects in computed properties.
*
* @see [no-side-effects-in-computed-properties](https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html)
*/
'vue/no-side-effects-in-computed-properties': NoSideEffectsInComputedPropertiesRuleConfig;
}
/**
* Disallow spaces around equal signs in attribute.
*
* @see [no-spaces-around-equal-signs-in-attribute](https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html)
*/
type NoSpacesAroundEqualSignsInAttributeRuleConfig = RuleConfig<[]>;
/**
* Disallow spaces around equal signs in attribute.
*
* @see [no-spaces-around-equal-signs-in-attribute](https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html)
*/
interface NoSpacesAroundEqualSignsInAttributeRule {
/**
* Disallow spaces around equal signs in attribute.
*
* @see [no-spaces-around-equal-signs-in-attribute](https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html)
*/
'vue/no-spaces-around-equal-signs-in-attribute': NoSpacesAroundEqualSignsInAttributeRuleConfig;
}
/**
* Disallow sparse arrays in `<template>`.
*
* @see [no-sparse-arrays](https://eslint.vuejs.org/rules/no-sparse-arrays.html)
*/
type NoSparseArraysRuleConfig = RuleConfig<[]>;
/**
* Disallow sparse arrays in `<template>`.
*
* @see [no-sparse-arrays](https://eslint.vuejs.org/rules/no-sparse-arrays.html)
*/
interface NoSparseArraysRule {
/**
* Disallow sparse arrays in `<template>`.
*
* @see [no-sparse-arrays](https://eslint.vuejs.org/rules/no-sparse-arrays.html)
*/
'vue/no-sparse-arrays': NoSparseArraysRuleConfig;
}
/**
* Option.
*/
interface NoStaticInlineStylesOption {
allowBinding?: boolean;
}
/**
* Options.
*/
type NoStaticInlineStylesOptions = [NoStaticInlineStylesOption?];
/**
* Disallow static inline `style` attributes.
*
* @see [no-static-inline-styles](https://eslint.vuejs.org/rules/no-static-inline-styles.html)
*/
type NoStaticInlineStylesRuleConfig =
RuleConfig<NoStaticInlineStylesOptions>;
/**
* Disallow static inline `style` attributes.
*
* @see [no-static-inline-styles](https://eslint.vuejs.org/rules/no-static-inline-styles.html)
*/
interface NoStaticInlineStylesRule {
/**
* Disallow static inline `style` attributes.
*
* @see [no-static-inline-styles](https://eslint.vuejs.org/rules/no-static-inline-styles.html)
*/
'vue/no-static-inline-styles': NoStaticInlineStylesRuleConfig;
}
/**
* Disallow `key` attribute on `<template>`.
*
* @see [no-template-key](https://eslint.vuejs.org/rules/no-template-key.html)
*/
type NoTemplateKeyRuleConfig = RuleConfig<[]>;
/**
* Disallow `key` attribute on `<template>`.
*
* @see [no-template-key](https://eslint.vuejs.org/rules/no-template-key.html)
*/
interface NoTemplateKeyRule {
/**
* Disallow `key` attribute on `<template>`.
*
* @see [no-template-key](https://eslint.vuejs.org/rules/no-template-key.html)
*/
'vue/no-template-key': NoTemplateKeyRuleConfig;
}
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-template-shadow](https://eslint.vuejs.org/rules/no-template-shadow.html)
*/
type NoTemplateShadowRuleConfig = RuleConfig<[]>;
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-template-shadow](https://eslint.vuejs.org/rules/no-template-shadow.html)
*/
interface NoTemplateShadowRule {
/**
* Disallow variable declarations from shadowing variables declared in the outer scope.
*
* @see [no-template-shadow](https://eslint.vuejs.org/rules/no-template-shadow.html)
*/
'vue/no-template-shadow': NoTemplateShadowRuleConfig;
}
/**
* Option.
*/
interface NoTemplateTargetBlankOption {
allowReferrer?: boolean;
enforceDynamicLinks?: 'always' | 'never';
}
/**
* Options.
*/
type NoTemplateTargetBlankOptions = [NoTemplateTargetBlankOption?];
/**
* Disallow target="_blank" attribute without rel="noopener noreferrer".
*
* @see [no-template-target-blank](https://eslint.vuejs.org/rules/no-template-target-blank.html)
*/
type NoTemplateTargetBlankRuleConfig =
RuleConfig<NoTemplateTargetBlankOptions>;
/**
* Disallow target="_blank" attribute without rel="noopener noreferrer".
*
* @see [no-template-target-blank](https://eslint.vuejs.org/rules/no-template-target-blank.html)
*/
interface NoTemplateTargetBlankRule {
/**
* Disallow target="_blank" attribute without rel="noopener noreferrer".
*
* @see [no-template-target-blank](https://eslint.vuejs.org/rules/no-template-target-blank.html)
*/
'vue/no-template-target-blank': NoTemplateTargetBlankRuleConfig;
}
/**
* Disallow mustaches in `<textarea>`.
*
* @see [no-textarea-mustache](https://eslint.vuejs.org/rules/no-textarea-mustache.html)
*/
type NoTextareaMustacheRuleConfig = RuleConfig<[]>;
/**
* Disallow mustaches in `<textarea>`.
*
* @see [no-textarea-mustache](https://eslint.vuejs.org/rules/no-textarea-mustache.html)
*/
interface NoTextareaMustacheRule {
/**
* Disallow mustaches in `<textarea>`.
*
* @see [no-textarea-mustache](https://eslint.vuejs.org/rules/no-textarea-mustache.html)
*/
'vue/no-textarea-mustache': NoTextareaMustacheRuleConfig;
}
/**
* Disallow `this` usage in a `beforeRouteEnter` method.
*
* @see [no-this-in-before-route-enter](https://eslint.vuejs.org/rules/no-this-in-before-route-enter.html)
*/
type NoThisInBeforeRouteEnterRuleConfig = RuleConfig<[]>;
/**
* Disallow `this` usage in a `beforeRouteEnter` method.
*
* @see [no-this-in-before-route-enter](https://eslint.vuejs.org/rules/no-this-in-before-route-enter.html)
*/
interface NoThisInBeforeRouteEnterRule {
/**
* Disallow `this` usage in a `beforeRouteEnter` method.
*
* @see [no-this-in-before-route-enter](https://eslint.vuejs.org/rules/no-this-in-before-route-enter.html)
*/
'vue/no-this-in-before-route-enter': NoThisInBeforeRouteEnterRuleConfig;
}
/**
* Option.
*/
interface NoUndefComponentsOption {
ignorePatterns?: any[];
}
/**
* Options.
*/
type NoUndefComponentsOptions = [NoUndefComponentsOption?];
/**
* Disallow use of undefined components in `<template>`.
*
* @see [no-undef-components](https://eslint.vuejs.org/rules/no-undef-components.html)
*/
type NoUndefComponentsRuleConfig = RuleConfig<NoUndefComponentsOptions>;
/**
* Disallow use of undefined components in `<template>`.
*
* @see [no-undef-components](https://eslint.vuejs.org/rules/no-undef-components.html)
*/
interface NoUndefComponentsRule {
/**
* Disallow use of undefined components in `<template>`.
*
* @see [no-undef-components](https://eslint.vuejs.org/rules/no-undef-components.html)
*/
'vue/no-undef-components': NoUndefComponentsRuleConfig;
}
/**
* Option.
*/
interface NoUndefPropertiesOption {
ignores?: string[];
}
/**
* Options.
*/
type NoUndefPropertiesOptions = [NoUndefPropertiesOption?];
/**
* Disallow undefined properties.
*
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
*/
type NoUndefPropertiesRuleConfig = RuleConfig<NoUndefPropertiesOptions>;
/**
* Disallow undefined properties.
*
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
*/
interface NoUndefPropertiesRule {
/**
* Disallow undefined properties.
*
* @see [no-undef-properties](https://eslint.vuejs.org/rules/no-undef-properties.html)
*/
'vue/no-undef-properties': NoUndefPropertiesRuleConfig;
}
/**
* Option.
*/
interface NoUnsupportedFeaturesOption {
version?: string;
ignores?: (
| 'slot-scope-attribute'
| 'dynamic-directive-arguments'
| 'v-slot'
| 'script-setup'
| 'style-css-vars-injection'
| 'v-model-argument'
| 'v-model-custom-modifiers'
| 'v-is'
| 'is-attribute-with-vue-prefix'
| 'v-memo'
| 'v-bind-prop-modifier-shorthand'
| 'v-bind-attr-modifier'
| 'define-options'
| 'define-slots'
)[];
}
/**
* Options.
*/
type NoUnsupportedFeaturesOptions = [NoUnsupportedFeaturesOption?];
/**
* Disallow unsupported Vue.js syntax on the specified version.
*
* @see [no-unsupported-features](https://eslint.vuejs.org/rules/no-unsupported-features.html)
*/
type NoUnsupportedFeaturesRuleConfig =
RuleConfig<NoUnsupportedFeaturesOptions>;
/**
* Disallow unsupported Vue.js syntax on the specified version.
*
* @see [no-unsupported-features](https://eslint.vuejs.org/rules/no-unsupported-features.html)
*/
interface NoUnsupportedFeaturesRule {
/**
* Disallow unsupported Vue.js syntax on the specified version.
*
* @see [no-unsupported-features](https://eslint.vuejs.org/rules/no-unsupported-features.html)
*/
'vue/no-unsupported-features': NoUnsupportedFeaturesRuleConfig;
}
/**
* Option.
*/
interface NoUnusedComponentsOption {
ignoreWhenBindingPresent?: boolean;
}
/**
* Options.
*/
type NoUnusedComponentsOptions = [NoUnusedComponentsOption?];
/**
* Disallow registering components that are not used inside templates.
*
* @see [no-unused-components](https://eslint.vuejs.org/rules/no-unused-components.html)
*/
type NoUnusedComponentsRuleConfig =
RuleConfig<NoUnusedComponentsOptions>;
/**
* Disallow registering components that are not used inside templates.
*
* @see [no-unused-components](https://eslint.vuejs.org/rules/no-unused-components.html)
*/
interface NoUnusedComponentsRule {
/**
* Disallow registering components that are not used inside templates.
*
* @see [no-unused-components](https://eslint.vuejs.org/rules/no-unused-components.html)
*/
'vue/no-unused-components': NoUnusedComponentsRuleConfig;
}
/**
* Option.
*/
interface NoUnusedPropertiesOption {
groups?: (
| 'props'
| 'data'
| 'asyncData'
| 'computed'
| 'methods'
| 'setup'
)[];
deepData?: boolean;
ignorePublicMembers?: boolean;
unreferencedOptions?: (
| 'unknownMemberAsUnreferenced'
| 'returnAsUnreferenced'
)[];
}
/**
* Options.
*/
type NoUnusedPropertiesOptions = [NoUnusedPropertiesOption?];
/**
* Disallow unused properties.
*
* @see [no-unused-properties](https://eslint.vuejs.org/rules/no-unused-properties.html)
*/
type NoUnusedPropertiesRuleConfig =
RuleConfig<NoUnusedPropertiesOptions>;
/**
* Disallow unused properties.
*
* @see [no-unused-properties](https://eslint.vuejs.org/rules/no-unused-properties.html)
*/
interface NoUnusedPropertiesRule {
/**
* Disallow unused properties.
*
* @see [no-unused-properties](https://eslint.vuejs.org/rules/no-unused-properties.html)
*/
'vue/no-unused-properties': NoUnusedPropertiesRuleConfig;
}
/**
* Disallow unused refs.
*
* @see [no-unused-refs](https://eslint.vuejs.org/rules/no-unused-refs.html)
*/
type NoUnusedRefsRuleConfig = RuleConfig<[]>;
/**
* Disallow unused refs.
*
* @see [no-unused-refs](https://eslint.vuejs.org/rules/no-unused-refs.html)
*/
interface NoUnusedRefsRule {
/**
* Disallow unused refs.
*
* @see [no-unused-refs](https://eslint.vuejs.org/rules/no-unused-refs.html)
*/
'vue/no-unused-refs': NoUnusedRefsRuleConfig;
}
/**
* Option.
*/
interface NoUnusedVarsOption {
ignorePattern?: string;
}
/**
* Options.
*/
type NoUnusedVarsOptions = [NoUnusedVarsOption?];
/**
* Disallow unused variable definitions of v-for directives or scope attributes.
*
* @see [no-unused-vars](https://eslint.vuejs.org/rules/no-unused-vars.html)
*/
type NoUnusedVarsRuleConfig = RuleConfig<NoUnusedVarsOptions>;
/**
* Disallow unused variable definitions of v-for directives or scope attributes.
*
* @see [no-unused-vars](https://eslint.vuejs.org/rules/no-unused-vars.html)
*/
interface NoUnusedVarsRule {
/**
* Disallow unused variable definitions of v-for directives or scope attributes.
*
* @see [no-unused-vars](https://eslint.vuejs.org/rules/no-unused-vars.html)
*/
'vue/no-unused-vars': NoUnusedVarsRuleConfig;
}
/**
* Disallow use computed property like method.
*
* @see [no-use-computed-property-like-method](https://eslint.vuejs.org/rules/no-use-computed-property-like-method.html)
*/
type NoUseComputedPropertyLikeMethodRuleConfig = RuleConfig<[]>;
/**
* Disallow use computed property like method.
*
* @see [no-use-computed-property-like-method](https://eslint.vuejs.org/rules/no-use-computed-property-like-method.html)
*/
interface NoUseComputedPropertyLikeMethodRule {
/**
* Disallow use computed property like method.
*
* @see [no-use-computed-property-like-method](https://eslint.vuejs.org/rules/no-use-computed-property-like-method.html)
*/
'vue/no-use-computed-property-like-method': NoUseComputedPropertyLikeMethodRuleConfig;
}
/**
* Disallow using `v-else-if`/`v-else` on the same element as `v-for`.
*
* @see [no-use-v-else-with-v-for](https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html)
*/
type NoUseVElseWithVForRuleConfig = RuleConfig<[]>;
/**
* Disallow using `v-else-if`/`v-else` on the same element as `v-for`.
*
* @see [no-use-v-else-with-v-for](https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html)
*/
interface NoUseVElseWithVForRule {
/**
* Disallow using `v-else-if`/`v-else` on the same element as `v-for`.
*
* @see [no-use-v-else-with-v-for](https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html)
*/
'vue/no-use-v-else-with-v-for': NoUseVElseWithVForRuleConfig;
}
/**
* Option.
*/
interface NoUseVIfWithVForOption {
allowUsingIterationVar?: boolean;
}
/**
* Options.
*/
type NoUseVIfWithVForOptions = [NoUseVIfWithVForOption?];
/**
* Disallow using `v-if` on the same element as `v-for`.
*
* @see [no-use-v-if-with-v-for](https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html)
*/
type NoUseVIfWithVForRuleConfig = RuleConfig<NoUseVIfWithVForOptions>;
/**
* Disallow using `v-if` on the same element as `v-for`.
*
* @see [no-use-v-if-with-v-for](https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html)
*/
interface NoUseVIfWithVForRule {
/**
* Disallow using `v-if` on the same element as `v-for`.
*
* @see [no-use-v-if-with-v-for](https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html)
*/
'vue/no-use-v-if-with-v-for': NoUseVIfWithVForRuleConfig;
}
/**
* Disallow unnecessary concatenation of literals or template literals in `<template>`.
*
* @see [no-useless-concat](https://eslint.vuejs.org/rules/no-useless-concat.html)
*/
type NoUselessConcatRuleConfig = RuleConfig<[]>;
/**
* Disallow unnecessary concatenation of literals or template literals in `<template>`.
*
* @see [no-useless-concat](https://eslint.vuejs.org/rules/no-useless-concat.html)
*/
interface NoUselessConcatRule {
/**
* Disallow unnecessary concatenation of literals or template literals in `<template>`.
*
* @see [no-useless-concat](https://eslint.vuejs.org/rules/no-useless-concat.html)
*/
'vue/no-useless-concat': NoUselessConcatRuleConfig;
}
/**
* Option.
*/
interface NoUselessMustachesOption {
ignoreIncludesComment?: boolean;
ignoreStringEscape?: boolean;
}
/**
* Options.
*/
type NoUselessMustachesOptions = [NoUselessMustachesOption?];
/**
* Disallow unnecessary mustache interpolations.
*
* @see [no-useless-mustaches](https://eslint.vuejs.org/rules/no-useless-mustaches.html)
*/
type NoUselessMustachesRuleConfig =
RuleConfig<NoUselessMustachesOptions>;
/**
* Disallow unnecessary mustache interpolations.
*
* @see [no-useless-mustaches](https://eslint.vuejs.org/rules/no-useless-mustaches.html)
*/
interface NoUselessMustachesRule {
/**
* Disallow unnecessary mustache interpolations.
*
* @see [no-useless-mustaches](https://eslint.vuejs.org/rules/no-useless-mustaches.html)
*/
'vue/no-useless-mustaches': NoUselessMustachesRuleConfig;
}
/**
* Disallow useless attribute on `<template>`.
*
* @see [no-useless-template-attributes](https://eslint.vuejs.org/rules/no-useless-template-attributes.html)
*/
type NoUselessTemplateAttributesRuleConfig = RuleConfig<[]>;
/**
* Disallow useless attribute on `<template>`.
*
* @see [no-useless-template-attributes](https://eslint.vuejs.org/rules/no-useless-template-attributes.html)
*/
interface NoUselessTemplateAttributesRule {
/**
* Disallow useless attribute on `<template>`.
*
* @see [no-useless-template-attributes](https://eslint.vuejs.org/rules/no-useless-template-attributes.html)
*/
'vue/no-useless-template-attributes': NoUselessTemplateAttributesRuleConfig;
}
/**
* Option.
*/
interface NoUselessVBindOption {
ignoreIncludesComment?: boolean;
ignoreStringEscape?: boolean;
}
/**
* Options.
*/
type NoUselessVBindOptions = [NoUselessVBindOption?];
/**
* Disallow unnecessary `v-bind` directives.
*
* @see [no-useless-v-bind](https://eslint.vuejs.org/rules/no-useless-v-bind.html)
*/
type NoUselessVBindRuleConfig = RuleConfig<NoUselessVBindOptions>;
/**
* Disallow unnecessary `v-bind` directives.
*
* @see [no-useless-v-bind](https://eslint.vuejs.org/rules/no-useless-v-bind.html)
*/
interface NoUselessVBindRule {
/**
* Disallow unnecessary `v-bind` directives.
*
* @see [no-useless-v-bind](https://eslint.vuejs.org/rules/no-useless-v-bind.html)
*/
'vue/no-useless-v-bind': NoUselessVBindRuleConfig;
}
/**
* Disallow `key` attribute on `<template v-for>`.
*
* @see [no-v-for-template-key](https://eslint.vuejs.org/rules/no-v-for-template-key.html)
*/
type NoVForTemplateKeyRuleConfig = RuleConfig<[]>;
/**
* Disallow `key` attribute on `<template v-for>`.
*
* @see [no-v-for-template-key](https://eslint.vuejs.org/rules/no-v-for-template-key.html)
*/
interface NoVForTemplateKeyRule {
/**
* Disallow `key` attribute on `<template v-for>`.
*
* @see [no-v-for-template-key](https://eslint.vuejs.org/rules/no-v-for-template-key.html)
*/
'vue/no-v-for-template-key': NoVForTemplateKeyRuleConfig;
}
/**
* Disallow key of `<template v-for>` placed on child elements.
*
* @see [no-v-for-template-key-on-child](https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html)
*/
type NoVForTemplateKeyOnChildRuleConfig = RuleConfig<[]>;
/**
* Disallow key of `<template v-for>` placed on child elements.
*
* @see [no-v-for-template-key-on-child](https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html)
*/
interface NoVForTemplateKeyOnChildRule {
/**
* Disallow key of `<template v-for>` placed on child elements.
*
* @see [no-v-for-template-key-on-child](https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html)
*/
'vue/no-v-for-template-key-on-child': NoVForTemplateKeyOnChildRuleConfig;
}
/**
* Disallow use of v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint.vuejs.org/rules/no-v-html.html)
*/
type NoVHtmlRuleConfig$1 = RuleConfig<[]>;
/**
* Disallow use of v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint.vuejs.org/rules/no-v-html.html)
*/
interface NoVHtmlRule$1 {
/**
* Disallow use of v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint.vuejs.org/rules/no-v-html.html)
*/
'vue/no-v-html': NoVHtmlRuleConfig$1;
}
/**
* Disallow adding an argument to `v-model` used in custom component.
*
* @see [no-v-model-argument](https://eslint.vuejs.org/rules/no-v-model-argument.html)
*/
type NoVModelArgumentRuleConfig = RuleConfig<[]>;
/**
* Disallow adding an argument to `v-model` used in custom component.
*
* @see [no-v-model-argument](https://eslint.vuejs.org/rules/no-v-model-argument.html)
*/
interface NoVModelArgumentRule {
/**
* Disallow adding an argument to `v-model` used in custom component.
*
* @see [no-v-model-argument](https://eslint.vuejs.org/rules/no-v-model-argument.html)
*/
'vue/no-v-model-argument': NoVModelArgumentRuleConfig;
}
/**
* Disallow use of v-text.
*
* @see [no-v-text](https://eslint.vuejs.org/rules/no-v-text.html)
*/
type NoVTextRuleConfig = RuleConfig<[]>;
/**
* Disallow use of v-text.
*
* @see [no-v-text](https://eslint.vuejs.org/rules/no-v-text.html)
*/
interface NoVTextRule {
/**
* Disallow use of v-text.
*
* @see [no-v-text](https://eslint.vuejs.org/rules/no-v-text.html)
*/
'vue/no-v-text': NoVTextRuleConfig;
}
/**
* Disallow v-text / v-html on component.
*
* @see [no-v-text-v-html-on-component](https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html)
*/
type NoVTextVHtmlOnComponentRuleConfig = RuleConfig<[]>;
/**
* Disallow v-text / v-html on component.
*
* @see [no-v-text-v-html-on-component](https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html)
*/
interface NoVTextVHtmlOnComponentRule {
/**
* Disallow v-text / v-html on component.
*
* @see [no-v-text-v-html-on-component](https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html)
*/
'vue/no-v-text-v-html-on-component': NoVTextVHtmlOnComponentRuleConfig;
}
/**
* Disallow asynchronously registered `watch`.
*
* @see [no-watch-after-await](https://eslint.vuejs.org/rules/no-watch-after-await.html)
*/
type NoWatchAfterAwaitRuleConfig = RuleConfig<[]>;
/**
* Disallow asynchronously registered `watch`.
*
* @see [no-watch-after-await](https://eslint.vuejs.org/rules/no-watch-after-await.html)
*/
interface NoWatchAfterAwaitRule {
/**
* Disallow asynchronously registered `watch`.
*
* @see [no-watch-after-await](https://eslint.vuejs.org/rules/no-watch-after-await.html)
*/
'vue/no-watch-after-await': NoWatchAfterAwaitRuleConfig;
}
/**
* Option.
*/
type ObjectCurlyNewlineOption =
| (
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
}
)
| {
ObjectExpression?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ObjectPattern?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ImportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
ExportDeclaration?:
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
};
/**
* Options.
*/
type ObjectCurlyNewlineOptions = [ObjectCurlyNewlineOption?];
/**
* Enforce consistent line breaks after opening and before closing braces in `<template>`.
*
* @see [object-curly-newline](https://eslint.vuejs.org/rules/object-curly-newline.html)
*/
type ObjectCurlyNewlineRuleConfig =
RuleConfig<ObjectCurlyNewlineOptions>;
/**
* Enforce consistent line breaks after opening and before closing braces in `<template>`.
*
* @see [object-curly-newline](https://eslint.vuejs.org/rules/object-curly-newline.html)
*/
interface ObjectCurlyNewlineRule {
/**
* Enforce consistent line breaks after opening and before closing braces in `<template>`.
*
* @see [object-curly-newline](https://eslint.vuejs.org/rules/object-curly-newline.html)
*/
'vue/object-curly-newline': ObjectCurlyNewlineRuleConfig;
}
/**
* Config.
*/
interface ObjectCurlySpacingConfig {
arraysInObjects?: boolean;
objectsInObjects?: boolean;
}
/**
* Option.
*/
type ObjectCurlySpacingOption = 'always' | 'never';
/**
* Options.
*/
type ObjectCurlySpacingOptions = [
ObjectCurlySpacingOption?,
ObjectCurlySpacingConfig?,
];
/**
* Enforce consistent spacing inside braces in `<template>`.
*
* @see [object-curly-spacing](https://eslint.vuejs.org/rules/object-curly-spacing.html)
*/
type ObjectCurlySpacingRuleConfig =
RuleConfig<ObjectCurlySpacingOptions>;
/**
* Enforce consistent spacing inside braces in `<template>`.
*
* @see [object-curly-spacing](https://eslint.vuejs.org/rules/object-curly-spacing.html)
*/
interface ObjectCurlySpacingRule {
/**
* Enforce consistent spacing inside braces in `<template>`.
*
* @see [object-curly-spacing](https://eslint.vuejs.org/rules/object-curly-spacing.html)
*/
'vue/object-curly-spacing': ObjectCurlySpacingRuleConfig;
}
/**
* Option.
*/
interface ObjectPropertyNewlineOption {
allowAllPropertiesOnSameLine?: boolean;
allowMultiplePropertiesPerLine?: boolean;
}
/**
* Options.
*/
type ObjectPropertyNewlineOptions = [ObjectPropertyNewlineOption?];
/**
* Enforce placing object properties on separate lines in `<template>`.
*
* @see [object-property-newline](https://eslint.vuejs.org/rules/object-property-newline.html)
*/
type ObjectPropertyNewlineRuleConfig =
RuleConfig<ObjectPropertyNewlineOptions>;
/**
* Enforce placing object properties on separate lines in `<template>`.
*
* @see [object-property-newline](https://eslint.vuejs.org/rules/object-property-newline.html)
*/
interface ObjectPropertyNewlineRule {
/**
* Enforce placing object properties on separate lines in `<template>`.
*
* @see [object-property-newline](https://eslint.vuejs.org/rules/object-property-newline.html)
*/
'vue/object-property-newline': ObjectPropertyNewlineRuleConfig;
}
/**
* Option.
*/
type ObjectShorthandOption =
| []
| [
| 'always'
| 'methods'
| 'properties'
| 'never'
| 'consistent'
| 'consistent-as-needed',
]
| []
| ['always' | 'methods' | 'properties']
| [
'always' | 'methods' | 'properties',
{
avoidQuotes?: boolean;
},
]
| []
| ['always' | 'methods']
| [
'always' | 'methods',
{
ignoreConstructors?: boolean;
methodsIgnorePattern?: string;
avoidQuotes?: boolean;
avoidExplicitReturnArrows?: boolean;
},
];
/**
* Options.
*/
type ObjectShorthandOptions = ObjectShorthandOption;
/**
* Require or disallow method and property shorthand syntax for object literals in `<template>`.
*
* @see [object-shorthand](https://eslint.vuejs.org/rules/object-shorthand.html)
*/
type ObjectShorthandRuleConfig = RuleConfig<ObjectShorthandOptions>;
/**
* Require or disallow method and property shorthand syntax for object literals in `<template>`.
*
* @see [object-shorthand](https://eslint.vuejs.org/rules/object-shorthand.html)
*/
interface ObjectShorthandRule {
/**
* Require or disallow method and property shorthand syntax for object literals in `<template>`.
*
* @see [object-shorthand](https://eslint.vuejs.org/rules/object-shorthand.html)
*/
'vue/object-shorthand': ObjectShorthandRuleConfig;
}
/**
* Enforce that each component should be in its own file.
*
* @see [one-component-per-file](https://eslint.vuejs.org/rules/one-component-per-file.html)
*/
type OneComponentPerFileRuleConfig = RuleConfig<[]>;
/**
* Enforce that each component should be in its own file.
*
* @see [one-component-per-file](https://eslint.vuejs.org/rules/one-component-per-file.html)
*/
interface OneComponentPerFileRule {
/**
* Enforce that each component should be in its own file.
*
* @see [one-component-per-file](https://eslint.vuejs.org/rules/one-component-per-file.html)
*/
'vue/one-component-per-file': OneComponentPerFileRuleConfig;
}
/**
* Config.
*/
interface OperatorLinebreakConfig {
overrides?: {
[k: string]: 'after' | 'before' | 'none' | 'ignore';
};
}
/**
* Option.
*/
type OperatorLinebreakOption = 'after' | 'before' | 'none' | null;
/**
* Options.
*/
type OperatorLinebreakOptions = [
OperatorLinebreakOption?,
OperatorLinebreakConfig?,
];
/**
* Enforce consistent linebreak style for operators in `<template>`.
*
* @see [operator-linebreak](https://eslint.vuejs.org/rules/operator-linebreak.html)
*/
type OperatorLinebreakRuleConfig = RuleConfig<OperatorLinebreakOptions>;
/**
* Enforce consistent linebreak style for operators in `<template>`.
*
* @see [operator-linebreak](https://eslint.vuejs.org/rules/operator-linebreak.html)
*/
interface OperatorLinebreakRule {
/**
* Enforce consistent linebreak style for operators in `<template>`.
*
* @see [operator-linebreak](https://eslint.vuejs.org/rules/operator-linebreak.html)
*/
'vue/operator-linebreak': OperatorLinebreakRuleConfig;
}
/**
* Option.
*/
interface OrderInComponentsOption {
order?: any[];
}
/**
* Options.
*/
type OrderInComponentsOptions = [OrderInComponentsOption?];
/**
* Enforce order of properties in components.
*
* @see [order-in-components](https://eslint.vuejs.org/rules/order-in-components.html)
*/
type OrderInComponentsRuleConfig = RuleConfig<OrderInComponentsOptions>;
/**
* Enforce order of properties in components.
*
* @see [order-in-components](https://eslint.vuejs.org/rules/order-in-components.html)
*/
interface OrderInComponentsRule {
/**
* Enforce order of properties in components.
*
* @see [order-in-components](https://eslint.vuejs.org/rules/order-in-components.html)
*/
'vue/order-in-components': OrderInComponentsRuleConfig;
}
/**
* Option.
*/
type PaddingLineBetweenBlocksOption = 'never' | 'always';
/**
* Options.
*/
type PaddingLineBetweenBlocksOptions = [PaddingLineBetweenBlocksOption?];
/**
* Require or disallow padding lines between blocks.
*
* @see [padding-line-between-blocks](https://eslint.vuejs.org/rules/padding-line-between-blocks.html)
*/
type PaddingLineBetweenBlocksRuleConfig =
RuleConfig<PaddingLineBetweenBlocksOptions>;
/**
* Require or disallow padding lines between blocks.
*
* @see [padding-line-between-blocks](https://eslint.vuejs.org/rules/padding-line-between-blocks.html)
*/
interface PaddingLineBetweenBlocksRule {
/**
* Require or disallow padding lines between blocks.
*
* @see [padding-line-between-blocks](https://eslint.vuejs.org/rules/padding-line-between-blocks.html)
*/
'vue/padding-line-between-blocks': PaddingLineBetweenBlocksRuleConfig;
}
/**
* Option.
*/
type PaddingLineBetweenTagsOption = {
blankLine: 'always' | 'never' | 'consistent';
prev: string;
next: string;
}[];
/**
* Options.
*/
type PaddingLineBetweenTagsOptions = [PaddingLineBetweenTagsOption?];
/**
* Require or disallow newlines between sibling tags in template.
*
* @see [padding-line-between-tags](https://eslint.vuejs.org/rules/padding-line-between-tags.html)
*/
type PaddingLineBetweenTagsRuleConfig =
RuleConfig<PaddingLineBetweenTagsOptions>;
/**
* Require or disallow newlines between sibling tags in template.
*
* @see [padding-line-between-tags](https://eslint.vuejs.org/rules/padding-line-between-tags.html)
*/
interface PaddingLineBetweenTagsRule {
/**
* Require or disallow newlines between sibling tags in template.
*
* @see [padding-line-between-tags](https://eslint.vuejs.org/rules/padding-line-between-tags.html)
*/
'vue/padding-line-between-tags': PaddingLineBetweenTagsRuleConfig;
}
/**
* Option.
*/
type PaddingLinesInComponentDefinitionOption =
| ('always' | 'never')
| {
betweenOptions?: 'never' | 'always' | 'ignore';
withinOption?:
| ('never' | 'always' | 'ignore')
| {
/**
*/
[k: string]:
| ('never' | 'always' | 'ignore')
| {
betweenItems?: 'never' | 'always' | 'ignore';
withinEach?: 'never' | 'always' | 'ignore';
};
};
groupSingleLineProperties?: boolean;
};
/**
* Options.
*/
type PaddingLinesInComponentDefinitionOptions = [
PaddingLinesInComponentDefinitionOption?,
];
/**
* Require or disallow padding lines in component definition.
*
* @see [padding-lines-in-component-definition](https://eslint.vuejs.org/rules/padding-lines-in-component-definition.html)
*/
type PaddingLinesInComponentDefinitionRuleConfig =
RuleConfig<PaddingLinesInComponentDefinitionOptions>;
/**
* Require or disallow padding lines in component definition.
*
* @see [padding-lines-in-component-definition](https://eslint.vuejs.org/rules/padding-lines-in-component-definition.html)
*/
interface PaddingLinesInComponentDefinitionRule {
/**
* Require or disallow padding lines in component definition.
*
* @see [padding-lines-in-component-definition](https://eslint.vuejs.org/rules/padding-lines-in-component-definition.html)
*/
'vue/padding-lines-in-component-definition': PaddingLinesInComponentDefinitionRuleConfig;
}
/**
* Enforce use of `defineOptions` instead of default export.
*
* @see [prefer-define-options](https://eslint.vuejs.org/rules/prefer-define-options.html)
*/
type PreferDefineOptionsRuleConfig = RuleConfig<[]>;
/**
* Enforce use of `defineOptions` instead of default export.
*
* @see [prefer-define-options](https://eslint.vuejs.org/rules/prefer-define-options.html)
*/
interface PreferDefineOptionsRule {
/**
* Enforce use of `defineOptions` instead of default export.
*
* @see [prefer-define-options](https://eslint.vuejs.org/rules/prefer-define-options.html)
*/
'vue/prefer-define-options': PreferDefineOptionsRuleConfig;
}
/**
* Enforce import from 'vue' instead of import from '@vue/*'.
*
* @see [prefer-import-from-vue](https://eslint.vuejs.org/rules/prefer-import-from-vue.html)
*/
type PreferImportFromVueRuleConfig = RuleConfig<[]>;
/**
* Enforce import from 'vue' instead of import from '@vue/*'.
*
* @see [prefer-import-from-vue](https://eslint.vuejs.org/rules/prefer-import-from-vue.html)
*/
interface PreferImportFromVueRule {
/**
* Enforce import from 'vue' instead of import from '@vue/*'.
*
* @see [prefer-import-from-vue](https://eslint.vuejs.org/rules/prefer-import-from-vue.html)
*/
'vue/prefer-import-from-vue': PreferImportFromVueRuleConfig;
}
/**
* Enforce `Boolean` comes first in component prop types.
*
* @see [prefer-prop-type-boolean-first](https://eslint.vuejs.org/rules/prefer-prop-type-boolean-first.html)
*/
type PreferPropTypeBooleanFirstRuleConfig = RuleConfig<[]>;
/**
* Enforce `Boolean` comes first in component prop types.
*
* @see [prefer-prop-type-boolean-first](https://eslint.vuejs.org/rules/prefer-prop-type-boolean-first.html)
*/
interface PreferPropTypeBooleanFirstRule {
/**
* Enforce `Boolean` comes first in component prop types.
*
* @see [prefer-prop-type-boolean-first](https://eslint.vuejs.org/rules/prefer-prop-type-boolean-first.html)
*/
'vue/prefer-prop-type-boolean-first': PreferPropTypeBooleanFirstRuleConfig;
}
/**
* Require static class names in template to be in a separate `class` attribute.
*
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
*/
type PreferSeparateStaticClassRuleConfig = RuleConfig<[]>;
/**
* Require static class names in template to be in a separate `class` attribute.
*
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
*/
interface PreferSeparateStaticClassRule {
/**
* Require static class names in template to be in a separate `class` attribute.
*
* @see [prefer-separate-static-class](https://eslint.vuejs.org/rules/prefer-separate-static-class.html)
*/
'vue/prefer-separate-static-class': PreferSeparateStaticClassRuleConfig;
}
/**
* Require template literals instead of string concatenation in `<template>`.
*
* @see [prefer-template](https://eslint.vuejs.org/rules/prefer-template.html)
*/
type PreferTemplateRuleConfig = RuleConfig<[]>;
/**
* Require template literals instead of string concatenation in `<template>`.
*
* @see [prefer-template](https://eslint.vuejs.org/rules/prefer-template.html)
*/
interface PreferTemplateRule {
/**
* Require template literals instead of string concatenation in `<template>`.
*
* @see [prefer-template](https://eslint.vuejs.org/rules/prefer-template.html)
*/
'vue/prefer-template': PreferTemplateRuleConfig;
}
/**
* Option.
*/
type PreferTrueAttributeShorthandOption = 'always' | 'never';
/**
* Options.
*/
type PreferTrueAttributeShorthandOptions = [
PreferTrueAttributeShorthandOption?,
];
/**
* Require shorthand form attribute when `v-bind` value is `true`.
*
* @see [prefer-true-attribute-shorthand](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html)
*/
type PreferTrueAttributeShorthandRuleConfig =
RuleConfig<PreferTrueAttributeShorthandOptions>;
/**
* Require shorthand form attribute when `v-bind` value is `true`.
*
* @see [prefer-true-attribute-shorthand](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html)
*/
interface PreferTrueAttributeShorthandRule {
/**
* Require shorthand form attribute when `v-bind` value is `true`.
*
* @see [prefer-true-attribute-shorthand](https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html)
*/
'vue/prefer-true-attribute-shorthand': PreferTrueAttributeShorthandRuleConfig;
}
/**
* Option.
*/
type PropNameCasingOption = 'camelCase' | 'snake_case';
/**
* Options.
*/
type PropNameCasingOptions = [PropNameCasingOption?];
/**
* Enforce specific casing for the Prop name in Vue components.
*
* @see [prop-name-casing](https://eslint.vuejs.org/rules/prop-name-casing.html)
*/
type PropNameCasingRuleConfig = RuleConfig<PropNameCasingOptions>;
/**
* Enforce specific casing for the Prop name in Vue components.
*
* @see [prop-name-casing](https://eslint.vuejs.org/rules/prop-name-casing.html)
*/
interface PropNameCasingRule {
/**
* Enforce specific casing for the Prop name in Vue components.
*
* @see [prop-name-casing](https://eslint.vuejs.org/rules/prop-name-casing.html)
*/
'vue/prop-name-casing': PropNameCasingRuleConfig;
}
/**
* Option.
*/
type QuotePropsOption =
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| []
| ['always' | 'as-needed' | 'consistent' | 'consistent-as-needed']
| [
'always' | 'as-needed' | 'consistent' | 'consistent-as-needed',
{
keywords?: boolean;
unnecessary?: boolean;
numbers?: boolean;
},
];
/**
* Options.
*/
type QuotePropsOptions = QuotePropsOption;
/**
* Require quotes around object literal property names in `<template>`.
*
* @see [quote-props](https://eslint.vuejs.org/rules/quote-props.html)
*/
type QuotePropsRuleConfig = RuleConfig<QuotePropsOptions>;
/**
* Require quotes around object literal property names in `<template>`.
*
* @see [quote-props](https://eslint.vuejs.org/rules/quote-props.html)
*/
interface QuotePropsRule {
/**
* Require quotes around object literal property names in `<template>`.
*
* @see [quote-props](https://eslint.vuejs.org/rules/quote-props.html)
*/
'vue/quote-props': QuotePropsRuleConfig;
}
/**
* Require `v-bind:is` of `<component>` elements.
*
* @see [require-component-is](https://eslint.vuejs.org/rules/require-component-is.html)
*/
type RequireComponentIsRuleConfig = RuleConfig<[]>;
/**
* Require `v-bind:is` of `<component>` elements.
*
* @see [require-component-is](https://eslint.vuejs.org/rules/require-component-is.html)
*/
interface RequireComponentIsRule {
/**
* Require `v-bind:is` of `<component>` elements.
*
* @see [require-component-is](https://eslint.vuejs.org/rules/require-component-is.html)
*/
'vue/require-component-is': RequireComponentIsRuleConfig;
}
/**
* Require default value for props.
*
* @see [require-default-prop](https://eslint.vuejs.org/rules/require-default-prop.html)
*/
type RequireDefaultPropRuleConfig = RuleConfig<[]>;
/**
* Require default value for props.
*
* @see [require-default-prop](https://eslint.vuejs.org/rules/require-default-prop.html)
*/
interface RequireDefaultPropRule {
/**
* Require default value for props.
*
* @see [require-default-prop](https://eslint.vuejs.org/rules/require-default-prop.html)
*/
'vue/require-default-prop': RequireDefaultPropRuleConfig;
}
/**
* Option.
*/
interface RequireDirectExportOption {
disallowFunctionalComponentFunction?: boolean;
}
/**
* Options.
*/
type RequireDirectExportOptions = [RequireDirectExportOption?];
/**
* Require the component to be directly exported.
*
* @see [require-direct-export](https://eslint.vuejs.org/rules/require-direct-export.html)
*/
type RequireDirectExportRuleConfig =
RuleConfig<RequireDirectExportOptions>;
/**
* Require the component to be directly exported.
*
* @see [require-direct-export](https://eslint.vuejs.org/rules/require-direct-export.html)
*/
interface RequireDirectExportRule {
/**
* Require the component to be directly exported.
*
* @see [require-direct-export](https://eslint.vuejs.org/rules/require-direct-export.html)
*/
'vue/require-direct-export': RequireDirectExportRuleConfig;
}
/**
* Require type definitions in emits.
*
* @see [require-emit-validator](https://eslint.vuejs.org/rules/require-emit-validator.html)
*/
type RequireEmitValidatorRuleConfig = RuleConfig<[]>;
/**
* Require type definitions in emits.
*
* @see [require-emit-validator](https://eslint.vuejs.org/rules/require-emit-validator.html)
*/
interface RequireEmitValidatorRule {
/**
* Require type definitions in emits.
*
* @see [require-emit-validator](https://eslint.vuejs.org/rules/require-emit-validator.html)
*/
'vue/require-emit-validator': RequireEmitValidatorRuleConfig;
}
/**
* Option.
*/
interface RequireExplicitEmitsOption {
allowProps?: boolean;
}
/**
* Options.
*/
type RequireExplicitEmitsOptions = [RequireExplicitEmitsOption?];
/**
* Require `emits` option with name triggered by `$emit()`.
*
* @see [require-explicit-emits](https://eslint.vuejs.org/rules/require-explicit-emits.html)
*/
type RequireExplicitEmitsRuleConfig =
RuleConfig<RequireExplicitEmitsOptions>;
/**
* Require `emits` option with name triggered by `$emit()`.
*
* @see [require-explicit-emits](https://eslint.vuejs.org/rules/require-explicit-emits.html)
*/
interface RequireExplicitEmitsRule {
/**
* Require `emits` option with name triggered by `$emit()`.
*
* @see [require-explicit-emits](https://eslint.vuejs.org/rules/require-explicit-emits.html)
*/
'vue/require-explicit-emits': RequireExplicitEmitsRuleConfig;
}
/**
* Require declare public properties using `expose`.
*
* @see [require-expose](https://eslint.vuejs.org/rules/require-expose.html)
*/
type RequireExposeRuleConfig = RuleConfig<[]>;
/**
* Require declare public properties using `expose`.
*
* @see [require-expose](https://eslint.vuejs.org/rules/require-expose.html)
*/
interface RequireExposeRule {
/**
* Require declare public properties using `expose`.
*
* @see [require-expose](https://eslint.vuejs.org/rules/require-expose.html)
*/
'vue/require-expose': RequireExposeRuleConfig;
}
/**
* Option.
*/
interface RequireMacroVariableNameOption {
defineProps?: string;
defineEmits?: string;
defineSlots?: string;
useSlots?: string;
useAttrs?: string;
}
/**
* Options.
*/
type RequireMacroVariableNameOptions = [RequireMacroVariableNameOption?];
/**
* Require a certain macro variable name.
*
* @see [require-macro-variable-name](https://eslint.vuejs.org/rules/require-macro-variable-name.html)
*/
type RequireMacroVariableNameRuleConfig =
RuleConfig<RequireMacroVariableNameOptions>;
/**
* Require a certain macro variable name.
*
* @see [require-macro-variable-name](https://eslint.vuejs.org/rules/require-macro-variable-name.html)
*/
interface RequireMacroVariableNameRule {
/**
* Require a certain macro variable name.
*
* @see [require-macro-variable-name](https://eslint.vuejs.org/rules/require-macro-variable-name.html)
*/
'vue/require-macro-variable-name': RequireMacroVariableNameRuleConfig;
}
/**
* Require a name property in Vue components.
*
* @see [require-name-property](https://eslint.vuejs.org/rules/require-name-property.html)
*/
type RequireNamePropertyRuleConfig = RuleConfig<[]>;
/**
* Require a name property in Vue components.
*
* @see [require-name-property](https://eslint.vuejs.org/rules/require-name-property.html)
*/
interface RequireNamePropertyRule {
/**
* Require a name property in Vue components.
*
* @see [require-name-property](https://eslint.vuejs.org/rules/require-name-property.html)
*/
'vue/require-name-property': RequireNamePropertyRuleConfig;
}
/**
* Option.
*/
interface RequirePropCommentOption {
type?: 'JSDoc' | 'line' | 'block' | 'any';
}
/**
* Options.
*/
type RequirePropCommentOptions = [RequirePropCommentOption?];
/**
* Require props to have a comment.
*
* @see [require-prop-comment](https://eslint.vuejs.org/rules/require-prop-comment.html)
*/
type RequirePropCommentRuleConfig =
RuleConfig<RequirePropCommentOptions>;
/**
* Require props to have a comment.
*
* @see [require-prop-comment](https://eslint.vuejs.org/rules/require-prop-comment.html)
*/
interface RequirePropCommentRule {
/**
* Require props to have a comment.
*
* @see [require-prop-comment](https://eslint.vuejs.org/rules/require-prop-comment.html)
*/
'vue/require-prop-comment': RequirePropCommentRuleConfig;
}
/**
* Require prop type to be a constructor.
*
* @see [require-prop-type-constructor](https://eslint.vuejs.org/rules/require-prop-type-constructor.html)
*/
type RequirePropTypeConstructorRuleConfig = RuleConfig<[]>;
/**
* Require prop type to be a constructor.
*
* @see [require-prop-type-constructor](https://eslint.vuejs.org/rules/require-prop-type-constructor.html)
*/
interface RequirePropTypeConstructorRule {
/**
* Require prop type to be a constructor.
*
* @see [require-prop-type-constructor](https://eslint.vuejs.org/rules/require-prop-type-constructor.html)
*/
'vue/require-prop-type-constructor': RequirePropTypeConstructorRuleConfig;
}
/**
* Require type definitions in props.
*
* @see [require-prop-types](https://eslint.vuejs.org/rules/require-prop-types.html)
*/
type RequirePropTypesRuleConfig = RuleConfig<[]>;
/**
* Require type definitions in props.
*
* @see [require-prop-types](https://eslint.vuejs.org/rules/require-prop-types.html)
*/
interface RequirePropTypesRule {
/**
* Require type definitions in props.
*
* @see [require-prop-types](https://eslint.vuejs.org/rules/require-prop-types.html)
*/
'vue/require-prop-types': RequirePropTypesRuleConfig;
}
/**
* Enforce render function to always return value.
*
* @see [require-render-return](https://eslint.vuejs.org/rules/require-render-return.html)
*/
type RequireRenderReturnRuleConfig = RuleConfig<[]>;
/**
* Enforce render function to always return value.
*
* @see [require-render-return](https://eslint.vuejs.org/rules/require-render-return.html)
*/
interface RequireRenderReturnRule {
/**
* Enforce render function to always return value.
*
* @see [require-render-return](https://eslint.vuejs.org/rules/require-render-return.html)
*/
'vue/require-render-return': RequireRenderReturnRuleConfig;
}
/**
* Enforce properties of `$slots` to be used as a function.
*
* @see [require-slots-as-functions](https://eslint.vuejs.org/rules/require-slots-as-functions.html)
*/
type RequireSlotsAsFunctionsRuleConfig = RuleConfig<[]>;
/**
* Enforce properties of `$slots` to be used as a function.
*
* @see [require-slots-as-functions](https://eslint.vuejs.org/rules/require-slots-as-functions.html)
*/
interface RequireSlotsAsFunctionsRule {
/**
* Enforce properties of `$slots` to be used as a function.
*
* @see [require-slots-as-functions](https://eslint.vuejs.org/rules/require-slots-as-functions.html)
*/
'vue/require-slots-as-functions': RequireSlotsAsFunctionsRuleConfig;
}
/**
* Require control the display of the content inside `<transition>`.
*
* @see [require-toggle-inside-transition](https://eslint.vuejs.org/rules/require-toggle-inside-transition.html)
*/
type RequireToggleInsideTransitionRuleConfig = RuleConfig<[]>;
/**
* Require control the display of the content inside `<transition>`.
*
* @see [require-toggle-inside-transition](https://eslint.vuejs.org/rules/require-toggle-inside-transition.html)
*/
interface RequireToggleInsideTransitionRule {
/**
* Require control the display of the content inside `<transition>`.
*
* @see [require-toggle-inside-transition](https://eslint.vuejs.org/rules/require-toggle-inside-transition.html)
*/
'vue/require-toggle-inside-transition': RequireToggleInsideTransitionRuleConfig;
}
/**
* Enforce adding type declarations to object props.
*
* @see [require-typed-object-prop](https://eslint.vuejs.org/rules/require-typed-object-prop.html)
*/
type RequireTypedObjectPropRuleConfig = RuleConfig<[]>;
/**
* Enforce adding type declarations to object props.
*
* @see [require-typed-object-prop](https://eslint.vuejs.org/rules/require-typed-object-prop.html)
*/
interface RequireTypedObjectPropRule {
/**
* Enforce adding type declarations to object props.
*
* @see [require-typed-object-prop](https://eslint.vuejs.org/rules/require-typed-object-prop.html)
*/
'vue/require-typed-object-prop': RequireTypedObjectPropRuleConfig;
}
/**
* Require `ref` and `shallowRef` functions to be strongly typed.
*
* @see [require-typed-ref](https://eslint.vuejs.org/rules/require-typed-ref.html)
*/
type RequireTypedRefRuleConfig = RuleConfig<[]>;
/**
* Require `ref` and `shallowRef` functions to be strongly typed.
*
* @see [require-typed-ref](https://eslint.vuejs.org/rules/require-typed-ref.html)
*/
interface RequireTypedRefRule {
/**
* Require `ref` and `shallowRef` functions to be strongly typed.
*
* @see [require-typed-ref](https://eslint.vuejs.org/rules/require-typed-ref.html)
*/
'vue/require-typed-ref': RequireTypedRefRuleConfig;
}
/**
* Require `v-bind:key` with `v-for` directives.
*
* @see [require-v-for-key](https://eslint.vuejs.org/rules/require-v-for-key.html)
*/
type RequireVForKeyRuleConfig = RuleConfig<[]>;
/**
* Require `v-bind:key` with `v-for` directives.
*
* @see [require-v-for-key](https://eslint.vuejs.org/rules/require-v-for-key.html)
*/
interface RequireVForKeyRule {
/**
* Require `v-bind:key` with `v-for` directives.
*
* @see [require-v-for-key](https://eslint.vuejs.org/rules/require-v-for-key.html)
*/
'vue/require-v-for-key': RequireVForKeyRuleConfig;
}
/**
* Enforce props default values to be valid.
*
* @see [require-valid-default-prop](https://eslint.vuejs.org/rules/require-valid-default-prop.html)
*/
type RequireValidDefaultPropRuleConfig = RuleConfig<[]>;
/**
* Enforce props default values to be valid.
*
* @see [require-valid-default-prop](https://eslint.vuejs.org/rules/require-valid-default-prop.html)
*/
interface RequireValidDefaultPropRule {
/**
* Enforce props default values to be valid.
*
* @see [require-valid-default-prop](https://eslint.vuejs.org/rules/require-valid-default-prop.html)
*/
'vue/require-valid-default-prop': RequireValidDefaultPropRuleConfig;
}
/**
* Option.
*/
interface ReturnInComputedPropertyOption {
treatUndefinedAsUnspecified?: boolean;
}
/**
* Options.
*/
type ReturnInComputedPropertyOptions = [ReturnInComputedPropertyOption?];
/**
* Enforce that a return statement is present in computed property.
*
* @see [return-in-computed-property](https://eslint.vuejs.org/rules/return-in-computed-property.html)
*/
type ReturnInComputedPropertyRuleConfig =
RuleConfig<ReturnInComputedPropertyOptions>;
/**
* Enforce that a return statement is present in computed property.
*
* @see [return-in-computed-property](https://eslint.vuejs.org/rules/return-in-computed-property.html)
*/
interface ReturnInComputedPropertyRule {
/**
* Enforce that a return statement is present in computed property.
*
* @see [return-in-computed-property](https://eslint.vuejs.org/rules/return-in-computed-property.html)
*/
'vue/return-in-computed-property': ReturnInComputedPropertyRuleConfig;
}
/**
* Enforce that a return statement is present in emits validator.
*
* @see [return-in-emits-validator](https://eslint.vuejs.org/rules/return-in-emits-validator.html)
*/
type ReturnInEmitsValidatorRuleConfig = RuleConfig<[]>;
/**
* Enforce that a return statement is present in emits validator.
*
* @see [return-in-emits-validator](https://eslint.vuejs.org/rules/return-in-emits-validator.html)
*/
interface ReturnInEmitsValidatorRule {
/**
* Enforce that a return statement is present in emits validator.
*
* @see [return-in-emits-validator](https://eslint.vuejs.org/rules/return-in-emits-validator.html)
*/
'vue/return-in-emits-validator': ReturnInEmitsValidatorRuleConfig;
}
/**
* Config.
*/
interface ScriptIndentConfig {
baseIndent?: number;
switchCase?: number;
ignores?: string[];
}
/**
* Option.
*/
type ScriptIndentOption = number | 'tab';
/**
* Options.
*/
type ScriptIndentOptions = [ScriptIndentOption?, ScriptIndentConfig?];
/**
* Enforce consistent indentation in `<script>`.
*
* @see [script-indent](https://eslint.vuejs.org/rules/script-indent.html)
*/
type ScriptIndentRuleConfig = RuleConfig<ScriptIndentOptions>;
/**
* Enforce consistent indentation in `<script>`.
*
* @see [script-indent](https://eslint.vuejs.org/rules/script-indent.html)
*/
interface ScriptIndentRule {
/**
* Enforce consistent indentation in `<script>`.
*
* @see [script-indent](https://eslint.vuejs.org/rules/script-indent.html)
*/
'vue/script-indent': ScriptIndentRuleConfig;
}
/**
* Prevent `<script setup>` variables used in `<template>` to be marked as unused.
*
* @deprecated
*
* @see [script-setup-uses-vars](https://eslint.vuejs.org/rules/script-setup-uses-vars.html)
*/
type ScriptSetupUsesVarsRuleConfig = RuleConfig<[]>;
/**
* Prevent `<script setup>` variables used in `<template>` to be marked as unused.
*
* @deprecated
*
* @see [script-setup-uses-vars](https://eslint.vuejs.org/rules/script-setup-uses-vars.html)
*/
interface ScriptSetupUsesVarsRule {
/**
* Prevent `<script setup>` variables used in `<template>` to be marked as unused.
*
* @deprecated
*
* @see [script-setup-uses-vars](https://eslint.vuejs.org/rules/script-setup-uses-vars.html)
*/
'vue/script-setup-uses-vars': ScriptSetupUsesVarsRuleConfig;
}
/**
* Option.
*/
interface SinglelineHtmlElementContentNewlineOption {
ignoreWhenNoAttributes?: boolean;
ignoreWhenEmpty?: boolean;
ignores?: string[];
}
/**
* Options.
*/
type SinglelineHtmlElementContentNewlineOptions = [
SinglelineHtmlElementContentNewlineOption?,
];
/**
* Require a line break before and after the contents of a singleline element.
*
* @see [singleline-html-element-content-newline](https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html)
*/
type SinglelineHtmlElementContentNewlineRuleConfig =
RuleConfig<SinglelineHtmlElementContentNewlineOptions>;
/**
* Require a line break before and after the contents of a singleline element.
*
* @see [singleline-html-element-content-newline](https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html)
*/
interface SinglelineHtmlElementContentNewlineRule {
/**
* Require a line break before and after the contents of a singleline element.
*
* @see [singleline-html-element-content-newline](https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html)
*/
'vue/singleline-html-element-content-newline': SinglelineHtmlElementContentNewlineRuleConfig;
}
/**
* Config.
*/
interface SortKeysConfig {
caseSensitive?: boolean;
ignoreChildrenOf?: any[];
ignoreGrandchildrenOf?: any[];
minKeys?: number;
natural?: boolean;
runOutsideVue?: boolean;
}
/**
* Option.
*/
type SortKeysOption$1 = 'asc' | 'desc';
/**
* Options.
*/
type SortKeysOptions$1 = [SortKeysOption$1?, SortKeysConfig?];
/**
* Enforce sort-keys in a manner that is compatible with order-in-components.
*
* @see [sort-keys](https://eslint.vuejs.org/rules/sort-keys.html)
*/
type SortKeysRuleConfig$1 = RuleConfig<SortKeysOptions$1>;
/**
* Enforce sort-keys in a manner that is compatible with order-in-components.
*
* @see [sort-keys](https://eslint.vuejs.org/rules/sort-keys.html)
*/
interface SortKeysRule$1 {
/**
* Enforce sort-keys in a manner that is compatible with order-in-components.
*
* @see [sort-keys](https://eslint.vuejs.org/rules/sort-keys.html)
*/
'vue/sort-keys': SortKeysRuleConfig$1;
}
/**
* Config.
*/
interface SpaceInParensConfig {
exceptions?: ('{}' | '[]' | '()' | 'empty')[];
}
/**
* Option.
*/
type SpaceInParensOption = 'always' | 'never';
/**
* Options.
*/
type SpaceInParensOptions = [SpaceInParensOption?, SpaceInParensConfig?];
/**
* Enforce consistent spacing inside parentheses in `<template>`.
*
* @see [space-in-parens](https://eslint.vuejs.org/rules/space-in-parens.html)
*/
type SpaceInParensRuleConfig = RuleConfig<SpaceInParensOptions>;
/**
* Enforce consistent spacing inside parentheses in `<template>`.
*
* @see [space-in-parens](https://eslint.vuejs.org/rules/space-in-parens.html)
*/
interface SpaceInParensRule {
/**
* Enforce consistent spacing inside parentheses in `<template>`.
*
* @see [space-in-parens](https://eslint.vuejs.org/rules/space-in-parens.html)
*/
'vue/space-in-parens': SpaceInParensRuleConfig;
}
/**
* Option.
*/
interface SpaceInfixOpsOption {
int32Hint?: boolean;
}
/**
* Options.
*/
type SpaceInfixOpsOptions = [SpaceInfixOpsOption?];
/**
* Require spacing around infix operators in `<template>`.
*
* @see [space-infix-ops](https://eslint.vuejs.org/rules/space-infix-ops.html)
*/
type SpaceInfixOpsRuleConfig = RuleConfig<SpaceInfixOpsOptions>;
/**
* Require spacing around infix operators in `<template>`.
*
* @see [space-infix-ops](https://eslint.vuejs.org/rules/space-infix-ops.html)
*/
interface SpaceInfixOpsRule {
/**
* Require spacing around infix operators in `<template>`.
*
* @see [space-infix-ops](https://eslint.vuejs.org/rules/space-infix-ops.html)
*/
'vue/space-infix-ops': SpaceInfixOpsRuleConfig;
}
/**
* Option.
*/
interface SpaceUnaryOpsOption {
words?: boolean;
nonwords?: boolean;
overrides?: {
[k: string]: boolean;
};
}
/**
* Options.
*/
type SpaceUnaryOpsOptions = [SpaceUnaryOpsOption?];
/**
* Enforce consistent spacing before or after unary operators in `<template>`.
*
* @see [space-unary-ops](https://eslint.vuejs.org/rules/space-unary-ops.html)
*/
type SpaceUnaryOpsRuleConfig = RuleConfig<SpaceUnaryOpsOptions>;
/**
* Enforce consistent spacing before or after unary operators in `<template>`.
*
* @see [space-unary-ops](https://eslint.vuejs.org/rules/space-unary-ops.html)
*/
interface SpaceUnaryOpsRule {
/**
* Enforce consistent spacing before or after unary operators in `<template>`.
*
* @see [space-unary-ops](https://eslint.vuejs.org/rules/space-unary-ops.html)
*/
'vue/space-unary-ops': SpaceUnaryOpsRuleConfig;
}
/**
* Enforce static class names order.
*
* @see [static-class-names-order](https://eslint.vuejs.org/rules/static-class-names-order.html)
*/
type StaticClassNamesOrderRuleConfig = RuleConfig<[]>;
/**
* Enforce static class names order.
*
* @see [static-class-names-order](https://eslint.vuejs.org/rules/static-class-names-order.html)
*/
interface StaticClassNamesOrderRule {
/**
* Enforce static class names order.
*
* @see [static-class-names-order](https://eslint.vuejs.org/rules/static-class-names-order.html)
*/
'vue/static-class-names-order': StaticClassNamesOrderRuleConfig;
}
/**
* Option.
*/
type TemplateCurlySpacingOption = 'always' | 'never';
/**
* Options.
*/
type TemplateCurlySpacingOptions = [TemplateCurlySpacingOption?];
/**
* Require or disallow spacing around embedded expressions of template strings in `<template>`.
*
* @see [template-curly-spacing](https://eslint.vuejs.org/rules/template-curly-spacing.html)
*/
type TemplateCurlySpacingRuleConfig =
RuleConfig<TemplateCurlySpacingOptions>;
/**
* Require or disallow spacing around embedded expressions of template strings in `<template>`.
*
* @see [template-curly-spacing](https://eslint.vuejs.org/rules/template-curly-spacing.html)
*/
interface TemplateCurlySpacingRule {
/**
* Require or disallow spacing around embedded expressions of template strings in `<template>`.
*
* @see [template-curly-spacing](https://eslint.vuejs.org/rules/template-curly-spacing.html)
*/
'vue/template-curly-spacing': TemplateCurlySpacingRuleConfig;
}
/**
* Option.
*/
type ThisInTemplateOption = 'always' | 'never';
/**
* Options.
*/
type ThisInTemplateOptions = [ThisInTemplateOption?];
/**
* Disallow usage of `this` in template.
*
* @see [this-in-template](https://eslint.vuejs.org/rules/this-in-template.html)
*/
type ThisInTemplateRuleConfig = RuleConfig<ThisInTemplateOptions>;
/**
* Disallow usage of `this` in template.
*
* @see [this-in-template](https://eslint.vuejs.org/rules/this-in-template.html)
*/
interface ThisInTemplateRule {
/**
* Disallow usage of `this` in template.
*
* @see [this-in-template](https://eslint.vuejs.org/rules/this-in-template.html)
*/
'vue/this-in-template': ThisInTemplateRuleConfig;
}
/**
* Enforce usage of `exact` modifier on `v-on`.
*
* @see [use-v-on-exact](https://eslint.vuejs.org/rules/use-v-on-exact.html)
*/
type UseVOnExactRuleConfig = RuleConfig<[]>;
/**
* Enforce usage of `exact` modifier on `v-on`.
*
* @see [use-v-on-exact](https://eslint.vuejs.org/rules/use-v-on-exact.html)
*/
interface UseVOnExactRule {
/**
* Enforce usage of `exact` modifier on `v-on`.
*
* @see [use-v-on-exact](https://eslint.vuejs.org/rules/use-v-on-exact.html)
*/
'vue/use-v-on-exact': UseVOnExactRuleConfig;
}
/**
* Option.
*/
type VBindStyleOption = 'shorthand' | 'longform';
/**
* Options.
*/
type VBindStyleOptions = [VBindStyleOption?];
/**
* Enforce `v-bind` directive style.
*
* @see [v-bind-style](https://eslint.vuejs.org/rules/v-bind-style.html)
*/
type VBindStyleRuleConfig = RuleConfig<VBindStyleOptions>;
/**
* Enforce `v-bind` directive style.
*
* @see [v-bind-style](https://eslint.vuejs.org/rules/v-bind-style.html)
*/
interface VBindStyleRule {
/**
* Enforce `v-bind` directive style.
*
* @see [v-bind-style](https://eslint.vuejs.org/rules/v-bind-style.html)
*/
'vue/v-bind-style': VBindStyleRuleConfig;
}
/**
* Option.
*/
type VForDelimiterStyleOption = 'in' | 'of';
/**
* Options.
*/
type VForDelimiterStyleOptions = [VForDelimiterStyleOption?];
/**
* Enforce `v-for` directive's delimiter style.
*
* @see [v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style.html)
*/
type VForDelimiterStyleRuleConfig =
RuleConfig<VForDelimiterStyleOptions>;
/**
* Enforce `v-for` directive's delimiter style.
*
* @see [v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style.html)
*/
interface VForDelimiterStyleRule {
/**
* Enforce `v-for` directive's delimiter style.
*
* @see [v-for-delimiter-style](https://eslint.vuejs.org/rules/v-for-delimiter-style.html)
*/
'vue/v-for-delimiter-style': VForDelimiterStyleRuleConfig;
}
/**
* Config.
*/
interface VOnEventHyphenationConfig {
autofix?: boolean;
ignore?: string[];
}
/**
* Option.
*/
type VOnEventHyphenationOption = 'always' | 'never';
/**
* Options.
*/
type VOnEventHyphenationOptions = [
VOnEventHyphenationOption?,
VOnEventHyphenationConfig?,
];
/**
* Enforce v-on event naming style on custom components in template.
*
* @see [v-on-event-hyphenation](https://eslint.vuejs.org/rules/v-on-event-hyphenation.html)
*/
type VOnEventHyphenationRuleConfig =
RuleConfig<VOnEventHyphenationOptions>;
/**
* Enforce v-on event naming style on custom components in template.
*
* @see [v-on-event-hyphenation](https://eslint.vuejs.org/rules/v-on-event-hyphenation.html)
*/
interface VOnEventHyphenationRule {
/**
* Enforce v-on event naming style on custom components in template.
*
* @see [v-on-event-hyphenation](https://eslint.vuejs.org/rules/v-on-event-hyphenation.html)
*/
'vue/v-on-event-hyphenation': VOnEventHyphenationRuleConfig;
}
/**
* Config.
*/
interface VOnFunctionCallConfig {
ignoreIncludesComment?: boolean;
}
/**
* Option.
*/
type VOnFunctionCallOption = 'always' | 'never';
/**
* Options.
*/
type VOnFunctionCallOptions = [
VOnFunctionCallOption?,
VOnFunctionCallConfig?,
];
/**
* Enforce or forbid parentheses after method calls without arguments in `v-on` directives.
*
* @deprecated
*
* @see [v-on-function-call](https://eslint.vuejs.org/rules/v-on-function-call.html)
*/
type VOnFunctionCallRuleConfig = RuleConfig<VOnFunctionCallOptions>;
/**
* Enforce or forbid parentheses after method calls without arguments in `v-on` directives.
*
* @deprecated
*
* @see [v-on-function-call](https://eslint.vuejs.org/rules/v-on-function-call.html)
*/
interface VOnFunctionCallRule {
/**
* Enforce or forbid parentheses after method calls without arguments in `v-on` directives.
*
* @deprecated
*
* @see [v-on-function-call](https://eslint.vuejs.org/rules/v-on-function-call.html)
*/
'vue/v-on-function-call': VOnFunctionCallRuleConfig;
}
/**
* Config.
*/
interface VOnHandlerStyleConfig {
ignoreIncludesComment?: boolean;
}
/**
* Option.
*/
type VOnHandlerStyleOption =
| ('inline' | 'inline-function')
| ['method', 'inline' | 'inline-function'];
/**
* Options.
*/
type VOnHandlerStyleOptions = [
VOnHandlerStyleOption?,
VOnHandlerStyleConfig?,
];
/**
* Enforce writing style for handlers in `v-on` directives.
*
* @see [v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style.html)
*/
type VOnHandlerStyleRuleConfig = RuleConfig<VOnHandlerStyleOptions>;
/**
* Enforce writing style for handlers in `v-on` directives.
*
* @see [v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style.html)
*/
interface VOnHandlerStyleRule {
/**
* Enforce writing style for handlers in `v-on` directives.
*
* @see [v-on-handler-style](https://eslint.vuejs.org/rules/v-on-handler-style.html)
*/
'vue/v-on-handler-style': VOnHandlerStyleRuleConfig;
}
/**
* Option.
*/
type VOnStyleOption = 'shorthand' | 'longform';
/**
* Options.
*/
type VOnStyleOptions = [VOnStyleOption?];
/**
* Enforce `v-on` directive style.
*
* @see [v-on-style](https://eslint.vuejs.org/rules/v-on-style.html)
*/
type VOnStyleRuleConfig = RuleConfig<VOnStyleOptions>;
/**
* Enforce `v-on` directive style.
*
* @see [v-on-style](https://eslint.vuejs.org/rules/v-on-style.html)
*/
interface VOnStyleRule {
/**
* Enforce `v-on` directive style.
*
* @see [v-on-style](https://eslint.vuejs.org/rules/v-on-style.html)
*/
'vue/v-on-style': VOnStyleRuleConfig;
}
/**
* Option.
*/
type VSlotStyleOption =
| ('shorthand' | 'longform')
| {
atComponent?: 'shorthand' | 'longform' | 'v-slot';
default?: 'shorthand' | 'longform' | 'v-slot';
named?: 'shorthand' | 'longform';
};
/**
* Options.
*/
type VSlotStyleOptions = [VSlotStyleOption?];
/**
* Enforce `v-slot` directive style.
*
* @see [v-slot-style](https://eslint.vuejs.org/rules/v-slot-style.html)
*/
type VSlotStyleRuleConfig = RuleConfig<VSlotStyleOptions>;
/**
* Enforce `v-slot` directive style.
*
* @see [v-slot-style](https://eslint.vuejs.org/rules/v-slot-style.html)
*/
interface VSlotStyleRule {
/**
* Enforce `v-slot` directive style.
*
* @see [v-slot-style](https://eslint.vuejs.org/rules/v-slot-style.html)
*/
'vue/v-slot-style': VSlotStyleRuleConfig;
}
/**
* Require valid attribute names.
*
* @see [valid-attribute-name](https://eslint.vuejs.org/rules/valid-attribute-name.html)
*/
type ValidAttributeNameRuleConfig = RuleConfig<[]>;
/**
* Require valid attribute names.
*
* @see [valid-attribute-name](https://eslint.vuejs.org/rules/valid-attribute-name.html)
*/
interface ValidAttributeNameRule {
/**
* Require valid attribute names.
*
* @see [valid-attribute-name](https://eslint.vuejs.org/rules/valid-attribute-name.html)
*/
'vue/valid-attribute-name': ValidAttributeNameRuleConfig;
}
/**
* Enforce valid `defineEmits` compiler macro.
*
* @see [valid-define-emits](https://eslint.vuejs.org/rules/valid-define-emits.html)
*/
type ValidDefineEmitsRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `defineEmits` compiler macro.
*
* @see [valid-define-emits](https://eslint.vuejs.org/rules/valid-define-emits.html)
*/
interface ValidDefineEmitsRule {
/**
* Enforce valid `defineEmits` compiler macro.
*
* @see [valid-define-emits](https://eslint.vuejs.org/rules/valid-define-emits.html)
*/
'vue/valid-define-emits': ValidDefineEmitsRuleConfig;
}
/**
* Enforce valid `defineOptions` compiler macro.
*
* @see [valid-define-options](https://eslint.vuejs.org/rules/valid-define-options.html)
*/
type ValidDefineOptionsRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `defineOptions` compiler macro.
*
* @see [valid-define-options](https://eslint.vuejs.org/rules/valid-define-options.html)
*/
interface ValidDefineOptionsRule {
/**
* Enforce valid `defineOptions` compiler macro.
*
* @see [valid-define-options](https://eslint.vuejs.org/rules/valid-define-options.html)
*/
'vue/valid-define-options': ValidDefineOptionsRuleConfig;
}
/**
* Enforce valid `defineProps` compiler macro.
*
* @see [valid-define-props](https://eslint.vuejs.org/rules/valid-define-props.html)
*/
type ValidDefinePropsRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `defineProps` compiler macro.
*
* @see [valid-define-props](https://eslint.vuejs.org/rules/valid-define-props.html)
*/
interface ValidDefinePropsRule {
/**
* Enforce valid `defineProps` compiler macro.
*
* @see [valid-define-props](https://eslint.vuejs.org/rules/valid-define-props.html)
*/
'vue/valid-define-props': ValidDefinePropsRuleConfig;
}
/**
* Require valid keys in model option.
*
* @see [valid-model-definition](https://eslint.vuejs.org/rules/valid-model-definition.html)
*/
type ValidModelDefinitionRuleConfig = RuleConfig<[]>;
/**
* Require valid keys in model option.
*
* @see [valid-model-definition](https://eslint.vuejs.org/rules/valid-model-definition.html)
*/
interface ValidModelDefinitionRule {
/**
* Require valid keys in model option.
*
* @see [valid-model-definition](https://eslint.vuejs.org/rules/valid-model-definition.html)
*/
'vue/valid-model-definition': ValidModelDefinitionRuleConfig;
}
/**
* Enforce valid `nextTick` function calls.
*
* @see [valid-next-tick](https://eslint.vuejs.org/rules/valid-next-tick.html)
*/
type ValidNextTickRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `nextTick` function calls.
*
* @see [valid-next-tick](https://eslint.vuejs.org/rules/valid-next-tick.html)
*/
interface ValidNextTickRule {
/**
* Enforce valid `nextTick` function calls.
*
* @see [valid-next-tick](https://eslint.vuejs.org/rules/valid-next-tick.html)
*/
'vue/valid-next-tick': ValidNextTickRuleConfig;
}
/**
* Enforce valid template root.
*
* @see [valid-template-root](https://eslint.vuejs.org/rules/valid-template-root.html)
*/
type ValidTemplateRootRuleConfig = RuleConfig<[]>;
/**
* Enforce valid template root.
*
* @see [valid-template-root](https://eslint.vuejs.org/rules/valid-template-root.html)
*/
interface ValidTemplateRootRule {
/**
* Enforce valid template root.
*
* @see [valid-template-root](https://eslint.vuejs.org/rules/valid-template-root.html)
*/
'vue/valid-template-root': ValidTemplateRootRuleConfig;
}
/**
* Enforce valid `v-bind` directives.
*
* @see [valid-v-bind](https://eslint.vuejs.org/rules/valid-v-bind.html)
*/
type ValidVBindRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-bind` directives.
*
* @see [valid-v-bind](https://eslint.vuejs.org/rules/valid-v-bind.html)
*/
interface ValidVBindRule {
/**
* Enforce valid `v-bind` directives.
*
* @see [valid-v-bind](https://eslint.vuejs.org/rules/valid-v-bind.html)
*/
'vue/valid-v-bind': ValidVBindRuleConfig;
}
/**
* Enforce valid `.sync` modifier on `v-bind` directives.
*
* @see [valid-v-bind-sync](https://eslint.vuejs.org/rules/valid-v-bind-sync.html)
*/
type ValidVBindSyncRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `.sync` modifier on `v-bind` directives.
*
* @see [valid-v-bind-sync](https://eslint.vuejs.org/rules/valid-v-bind-sync.html)
*/
interface ValidVBindSyncRule {
/**
* Enforce valid `.sync` modifier on `v-bind` directives.
*
* @see [valid-v-bind-sync](https://eslint.vuejs.org/rules/valid-v-bind-sync.html)
*/
'vue/valid-v-bind-sync': ValidVBindSyncRuleConfig;
}
/**
* Enforce valid `v-cloak` directives.
*
* @see [valid-v-cloak](https://eslint.vuejs.org/rules/valid-v-cloak.html)
*/
type ValidVCloakRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-cloak` directives.
*
* @see [valid-v-cloak](https://eslint.vuejs.org/rules/valid-v-cloak.html)
*/
interface ValidVCloakRule {
/**
* Enforce valid `v-cloak` directives.
*
* @see [valid-v-cloak](https://eslint.vuejs.org/rules/valid-v-cloak.html)
*/
'vue/valid-v-cloak': ValidVCloakRuleConfig;
}
/**
* Enforce valid `v-else` directives.
*
* @see [valid-v-else](https://eslint.vuejs.org/rules/valid-v-else.html)
*/
type ValidVElseRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-else` directives.
*
* @see [valid-v-else](https://eslint.vuejs.org/rules/valid-v-else.html)
*/
interface ValidVElseRule {
/**
* Enforce valid `v-else` directives.
*
* @see [valid-v-else](https://eslint.vuejs.org/rules/valid-v-else.html)
*/
'vue/valid-v-else': ValidVElseRuleConfig;
}
/**
* Enforce valid `v-else-if` directives.
*
* @see [valid-v-else-if](https://eslint.vuejs.org/rules/valid-v-else-if.html)
*/
type ValidVElseIfRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-else-if` directives.
*
* @see [valid-v-else-if](https://eslint.vuejs.org/rules/valid-v-else-if.html)
*/
interface ValidVElseIfRule {
/**
* Enforce valid `v-else-if` directives.
*
* @see [valid-v-else-if](https://eslint.vuejs.org/rules/valid-v-else-if.html)
*/
'vue/valid-v-else-if': ValidVElseIfRuleConfig;
}
/**
* Enforce valid `v-for` directives.
*
* @see [valid-v-for](https://eslint.vuejs.org/rules/valid-v-for.html)
*/
type ValidVForRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-for` directives.
*
* @see [valid-v-for](https://eslint.vuejs.org/rules/valid-v-for.html)
*/
interface ValidVForRule {
/**
* Enforce valid `v-for` directives.
*
* @see [valid-v-for](https://eslint.vuejs.org/rules/valid-v-for.html)
*/
'vue/valid-v-for': ValidVForRuleConfig;
}
/**
* Enforce valid `v-html` directives.
*
* @see [valid-v-html](https://eslint.vuejs.org/rules/valid-v-html.html)
*/
type ValidVHtmlRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-html` directives.
*
* @see [valid-v-html](https://eslint.vuejs.org/rules/valid-v-html.html)
*/
interface ValidVHtmlRule {
/**
* Enforce valid `v-html` directives.
*
* @see [valid-v-html](https://eslint.vuejs.org/rules/valid-v-html.html)
*/
'vue/valid-v-html': ValidVHtmlRuleConfig;
}
/**
* Enforce valid `v-if` directives.
*
* @see [valid-v-if](https://eslint.vuejs.org/rules/valid-v-if.html)
*/
type ValidVIfRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-if` directives.
*
* @see [valid-v-if](https://eslint.vuejs.org/rules/valid-v-if.html)
*/
interface ValidVIfRule {
/**
* Enforce valid `v-if` directives.
*
* @see [valid-v-if](https://eslint.vuejs.org/rules/valid-v-if.html)
*/
'vue/valid-v-if': ValidVIfRuleConfig;
}
/**
* Enforce valid `v-is` directives.
*
* @see [valid-v-is](https://eslint.vuejs.org/rules/valid-v-is.html)
*/
type ValidVIsRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-is` directives.
*
* @see [valid-v-is](https://eslint.vuejs.org/rules/valid-v-is.html)
*/
interface ValidVIsRule {
/**
* Enforce valid `v-is` directives.
*
* @see [valid-v-is](https://eslint.vuejs.org/rules/valid-v-is.html)
*/
'vue/valid-v-is': ValidVIsRuleConfig;
}
/**
* Enforce valid `v-memo` directives.
*
* @see [valid-v-memo](https://eslint.vuejs.org/rules/valid-v-memo.html)
*/
type ValidVMemoRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-memo` directives.
*
* @see [valid-v-memo](https://eslint.vuejs.org/rules/valid-v-memo.html)
*/
interface ValidVMemoRule {
/**
* Enforce valid `v-memo` directives.
*
* @see [valid-v-memo](https://eslint.vuejs.org/rules/valid-v-memo.html)
*/
'vue/valid-v-memo': ValidVMemoRuleConfig;
}
/**
* Enforce valid `v-model` directives.
*
* @see [valid-v-model](https://eslint.vuejs.org/rules/valid-v-model.html)
*/
type ValidVModelRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-model` directives.
*
* @see [valid-v-model](https://eslint.vuejs.org/rules/valid-v-model.html)
*/
interface ValidVModelRule {
/**
* Enforce valid `v-model` directives.
*
* @see [valid-v-model](https://eslint.vuejs.org/rules/valid-v-model.html)
*/
'vue/valid-v-model': ValidVModelRuleConfig;
}
/**
* Option.
*/
interface ValidVOnOption {
modifiers?: any[];
}
/**
* Options.
*/
type ValidVOnOptions = [ValidVOnOption?];
/**
* Enforce valid `v-on` directives.
*
* @see [valid-v-on](https://eslint.vuejs.org/rules/valid-v-on.html)
*/
type ValidVOnRuleConfig = RuleConfig<ValidVOnOptions>;
/**
* Enforce valid `v-on` directives.
*
* @see [valid-v-on](https://eslint.vuejs.org/rules/valid-v-on.html)
*/
interface ValidVOnRule {
/**
* Enforce valid `v-on` directives.
*
* @see [valid-v-on](https://eslint.vuejs.org/rules/valid-v-on.html)
*/
'vue/valid-v-on': ValidVOnRuleConfig;
}
/**
* Enforce valid `v-once` directives.
*
* @see [valid-v-once](https://eslint.vuejs.org/rules/valid-v-once.html)
*/
type ValidVOnceRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-once` directives.
*
* @see [valid-v-once](https://eslint.vuejs.org/rules/valid-v-once.html)
*/
interface ValidVOnceRule {
/**
* Enforce valid `v-once` directives.
*
* @see [valid-v-once](https://eslint.vuejs.org/rules/valid-v-once.html)
*/
'vue/valid-v-once': ValidVOnceRuleConfig;
}
/**
* Enforce valid `v-pre` directives.
*
* @see [valid-v-pre](https://eslint.vuejs.org/rules/valid-v-pre.html)
*/
type ValidVPreRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-pre` directives.
*
* @see [valid-v-pre](https://eslint.vuejs.org/rules/valid-v-pre.html)
*/
interface ValidVPreRule {
/**
* Enforce valid `v-pre` directives.
*
* @see [valid-v-pre](https://eslint.vuejs.org/rules/valid-v-pre.html)
*/
'vue/valid-v-pre': ValidVPreRuleConfig;
}
/**
* Enforce valid `v-show` directives.
*
* @see [valid-v-show](https://eslint.vuejs.org/rules/valid-v-show.html)
*/
type ValidVShowRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-show` directives.
*
* @see [valid-v-show](https://eslint.vuejs.org/rules/valid-v-show.html)
*/
interface ValidVShowRule {
/**
* Enforce valid `v-show` directives.
*
* @see [valid-v-show](https://eslint.vuejs.org/rules/valid-v-show.html)
*/
'vue/valid-v-show': ValidVShowRuleConfig;
}
/**
* Option.
*/
interface ValidVSlotOption {
allowModifiers?: boolean;
}
/**
* Options.
*/
type ValidVSlotOptions = [ValidVSlotOption?];
/**
* Enforce valid `v-slot` directives.
*
* @see [valid-v-slot](https://eslint.vuejs.org/rules/valid-v-slot.html)
*/
type ValidVSlotRuleConfig = RuleConfig<ValidVSlotOptions>;
/**
* Enforce valid `v-slot` directives.
*
* @see [valid-v-slot](https://eslint.vuejs.org/rules/valid-v-slot.html)
*/
interface ValidVSlotRule {
/**
* Enforce valid `v-slot` directives.
*
* @see [valid-v-slot](https://eslint.vuejs.org/rules/valid-v-slot.html)
*/
'vue/valid-v-slot': ValidVSlotRuleConfig;
}
/**
* Enforce valid `v-text` directives.
*
* @see [valid-v-text](https://eslint.vuejs.org/rules/valid-v-text.html)
*/
type ValidVTextRuleConfig = RuleConfig<[]>;
/**
* Enforce valid `v-text` directives.
*
* @see [valid-v-text](https://eslint.vuejs.org/rules/valid-v-text.html)
*/
interface ValidVTextRule {
/**
* Enforce valid `v-text` directives.
*
* @see [valid-v-text](https://eslint.vuejs.org/rules/valid-v-text.html)
*/
'vue/valid-v-text': ValidVTextRuleConfig;
}
/**
* All Vue rules.
*/
type VueRules = ArrayBracketNewlineRule &
ArrayBracketSpacingRule &
ArrayElementNewlineRule &
ArrowSpacingRule &
AttributeHyphenationRule &
AttributesOrderRule &
BlockLangRule &
BlockOrderRule &
BlockSpacingRule &
BlockTagNewlineRule &
BraceStyleRule &
CamelcaseRule &
CommaDangleRule &
CommaSpacingRule &
CommaStyleRule &
CommentDirectiveRule &
ComponentApiStyleRule &
ComponentDefinitionNameCasingRule &
ComponentNameInTemplateCasingRule$1 &
ComponentOptionsNameCasingRule &
ComponentTagsOrderRule &
CustomEventNameCasingRule &
DefineEmitsDeclarationRule &
DefineMacrosOrderRule &
DefinePropsDeclarationRule &
DotLocationRule &
DotNotationRule &
EqeqeqRule &
FirstAttributeLinebreakRule &
FuncCallSpacingRule &
HtmlButtonHasTypeRule &
HtmlClosingBracketNewlineRule &
HtmlClosingBracketSpacingRule &
HtmlCommentContentNewlineRule &
HtmlCommentContentSpacingRule &
HtmlCommentIndentRule &
HtmlEndTagsRule &
HtmlIndentRule &
HtmlQuotesRule &
HtmlSelfClosingRule &
JsxUsesVarsRule &
KeySpacingRule$1 &
KeywordSpacingRule &
MatchComponentFileNameRule &
MatchComponentImportNameRule &
MaxAttributesPerLineRule &
MaxLenRule &
MaxLinesPerBlockRule &
MultiWordComponentNamesRule &
MultilineHtmlElementContentNewlineRule &
MultilineTernaryRule &
MustacheInterpolationSpacingRule &
NewLineBetweenMultiLinePropertyRule &
NextTickStyleRule &
NoArrowFunctionsInWatchRule &
NoAsyncInComputedPropertiesRule &
NoBareStringsInTemplateRule &
NoBooleanDefaultRule &
NoChildContentRule &
NoComputedPropertiesInDataRule &
NoConsoleRule &
NoConstantConditionRule &
NoCustomModifiersOnVModelRule &
NoDeprecatedDataObjectDeclarationRule &
NoDeprecatedDestroyedLifecycleRule &
NoDeprecatedDollarListenersApiRule &
NoDeprecatedDollarScopedslotsApiRule &
NoDeprecatedEventsApiRule &
NoDeprecatedFilterRule &
NoDeprecatedFunctionalTemplateRule &
NoDeprecatedHtmlElementIsRule &
NoDeprecatedInlineTemplateRule &
NoDeprecatedModelDefinitionRule &
NoDeprecatedPropsDefaultThisRule &
NoDeprecatedRouterLinkTagPropRule &
NoDeprecatedScopeAttributeRule &
NoDeprecatedSlotAttributeRule &
NoDeprecatedSlotScopeAttributeRule &
NoDeprecatedVBindSyncRule &
NoDeprecatedVIsRule &
NoDeprecatedVOnNativeModifierRule &
NoDeprecatedVOnNumberModifiersRule &
NoDeprecatedVueConfigKeycodesRule &
NoDupeKeysRule &
NoDupeVElseIfRule &
NoDuplicateAttrInheritanceRule &
NoDuplicateAttributesRule &
NoEmptyComponentBlockRule &
NoEmptyPatternRule &
NoExportInScriptSetupRule &
NoExposeAfterAwaitRule &
NoExtraParensRule &
NoInvalidModelKeysRule &
NoIrregularWhitespaceRule$1 &
NoLifecycleAfterAwaitRule &
NoLoneTemplateRule &
NoLossOfPrecisionRule &
NoMultiSpacesRule &
NoMultipleObjectsInClassRule &
NoMultipleSlotArgsRule &
NoMultipleTemplateRootRule &
NoMutatingPropsRule &
NoParsingErrorRule$1 &
NoPotentialComponentOptionTypoRule &
NoRefAsOperandRule &
NoRefObjectDestructureRule &
NoRefObjectReactivityLossRule &
NoRequiredPropWithDefaultRule &
NoReservedComponentNamesRule &
NoReservedKeysRule &
NoReservedPropsRule &
NoRestrictedBlockRule &
NoRestrictedCallAfterAwaitRule &
NoRestrictedClassRule &
NoRestrictedComponentNamesRule &
NoRestrictedComponentOptionsRule &
NoRestrictedCustomEventRule &
NoRestrictedHtmlElementsRule &
NoRestrictedPropsRule &
NoRestrictedStaticAttributeRule &
NoRestrictedSyntaxRule &
NoRestrictedVBindRule &
NoRootVIfRule &
NoSetupPropsDestructureRule &
NoSetupPropsReactivityLossRule &
NoSharedComponentDataRule &
NoSideEffectsInComputedPropertiesRule &
NoSpacesAroundEqualSignsInAttributeRule &
NoSparseArraysRule &
NoStaticInlineStylesRule &
NoTemplateKeyRule &
NoTemplateShadowRule &
NoTemplateTargetBlankRule &
NoTextareaMustacheRule &
NoThisInBeforeRouteEnterRule &
NoUndefComponentsRule &
NoUndefPropertiesRule &
NoUnsupportedFeaturesRule &
NoUnusedComponentsRule &
NoUnusedPropertiesRule &
NoUnusedRefsRule &
NoUnusedVarsRule &
NoUseComputedPropertyLikeMethodRule &
NoUseVElseWithVForRule &
NoUseVIfWithVForRule &
NoUselessConcatRule &
NoUselessMustachesRule &
NoUselessTemplateAttributesRule &
NoUselessVBindRule &
NoVForTemplateKeyOnChildRule &
NoVForTemplateKeyRule &
NoVHtmlRule$1 &
NoVModelArgumentRule &
NoVTextVHtmlOnComponentRule &
NoVTextRule &
NoWatchAfterAwaitRule &
ObjectCurlyNewlineRule &
ObjectCurlySpacingRule &
ObjectPropertyNewlineRule &
ObjectShorthandRule &
OneComponentPerFileRule &
OperatorLinebreakRule &
OrderInComponentsRule &
PaddingLineBetweenBlocksRule &
PaddingLineBetweenTagsRule &
PaddingLinesInComponentDefinitionRule &
PreferDefineOptionsRule &
PreferImportFromVueRule &
PreferPropTypeBooleanFirstRule &
PreferSeparateStaticClassRule &
PreferTemplateRule &
PreferTrueAttributeShorthandRule &
PropNameCasingRule &
QuotePropsRule &
RequireComponentIsRule &
RequireDefaultPropRule &
RequireDirectExportRule &
RequireEmitValidatorRule &
RequireExplicitEmitsRule &
RequireExposeRule &
RequireMacroVariableNameRule &
RequireNamePropertyRule &
RequirePropCommentRule &
RequirePropTypeConstructorRule &
RequirePropTypesRule &
RequireRenderReturnRule &
RequireSlotsAsFunctionsRule &
RequireToggleInsideTransitionRule &
RequireTypedObjectPropRule &
RequireTypedRefRule &
RequireVForKeyRule &
RequireValidDefaultPropRule &
ReturnInComputedPropertyRule &
ReturnInEmitsValidatorRule &
ScriptIndentRule &
ScriptSetupUsesVarsRule &
SinglelineHtmlElementContentNewlineRule &
SortKeysRule$1 &
SpaceInParensRule &
SpaceInfixOpsRule &
SpaceUnaryOpsRule &
StaticClassNamesOrderRule &
TemplateCurlySpacingRule &
ThisInTemplateRule &
UseVOnExactRule &
VBindStyleRule &
VForDelimiterStyleRule &
VOnEventHyphenationRule &
VOnFunctionCallRule &
VOnHandlerStyleRule &
VOnStyleRule &
VSlotStyleRule &
ValidAttributeNameRule &
ValidDefineEmitsRule &
ValidDefineOptionsRule &
ValidDefinePropsRule &
ValidModelDefinitionRule &
ValidNextTickRule &
ValidTemplateRootRule &
ValidVBindSyncRule &
ValidVBindRule &
ValidVCloakRule &
ValidVElseIfRule &
ValidVElseRule &
ValidVForRule &
ValidVHtmlRule &
ValidVIfRule &
ValidVIsRule &
ValidVMemoRule &
ValidVModelRule &
ValidVOnRule &
ValidVOnceRule &
ValidVPreRule &
ValidVShowRule &
ValidVSlotRule &
ValidVTextRule;
/**
* Config.
*/
interface KeyFormatStyleConfig {
allowArray?: boolean;
splitByDots?: boolean;
}
/**
* Option.
*/
type KeyFormatStyleOption =
| 'camelCase'
| 'kebab-case'
| 'snake_case'
| 'SCREAMING_SNAKE_CASE';
/**
* Options.
*/
type KeyFormatStyleOptions = [
KeyFormatStyleOption?,
KeyFormatStyleConfig?,
];
/**
* Enforce specific casing for localization keys.
*
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
*/
type KeyFormatStyleRuleConfig = RuleConfig<KeyFormatStyleOptions>;
/**
* Enforce specific casing for localization keys.
*
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
*/
interface KeyFormatStyleRule {
/**
* Enforce specific casing for localization keys.
*
* @see [key-format-style](https://eslint-plugin-vue-i18n.intlify.dev/rules/key-format-style.html)
*/
'@intlify/vue-i18n/key-format-style': KeyFormatStyleRuleConfig;
}
/**
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
*/
type NoDeprecatedI18nComponentRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
*/
interface NoDeprecatedI18nComponentRule {
/**
* Disallow using deprecated `<i18n>` components (in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-component](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-component.html)
*/
'@intlify/vue-i18n/no-deprecated-i18n-component': NoDeprecatedI18nComponentRuleConfig;
}
/**
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
*/
type NoDeprecatedI18nPlaceAttrRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
*/
interface NoDeprecatedI18nPlaceAttrRule {
/**
* Disallow using deprecated `place` attribute (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-place-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-place-attr.html)
*/
'@intlify/vue-i18n/no-deprecated-i18n-place-attr': NoDeprecatedI18nPlaceAttrRuleConfig;
}
/**
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
*/
type NoDeprecatedI18nPlacesPropRuleConfig = RuleConfig<[]>;
/**
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
*/
interface NoDeprecatedI18nPlacesPropRule {
/**
* Disallow using deprecated `places` prop (Removed in Vue I18n 9.0.0+).
*
* @see [no-deprecated-i18n-places-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-deprecated-i18n-places-prop.html)
*/
'@intlify/vue-i18n/no-deprecated-i18n-places-prop': NoDeprecatedI18nPlacesPropRuleConfig;
}
/**
* Option.
*/
interface NoDuplicateKeysInLocaleOption {
ignoreI18nBlock?: boolean;
}
/**
* Options.
*/
type NoDuplicateKeysInLocaleOptions = [NoDuplicateKeysInLocaleOption?];
/**
* Disallow duplicate localization keys within the same locale.
*
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
*/
type NoDuplicateKeysInLocaleRuleConfig =
RuleConfig<NoDuplicateKeysInLocaleOptions>;
/**
* Disallow duplicate localization keys within the same locale.
*
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
*/
interface NoDuplicateKeysInLocaleRule {
/**
* Disallow duplicate localization keys within the same locale.
*
* @see [no-duplicate-keys-in-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-duplicate-keys-in-locale.html)
*/
'@intlify/vue-i18n/no-duplicate-keys-in-locale': NoDuplicateKeysInLocaleRuleConfig;
}
/**
* Disallow localization dynamic keys at localization methods.
*
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
*/
type NoDynamicKeysRuleConfig = RuleConfig<[]>;
/**
* Disallow localization dynamic keys at localization methods.
*
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
*/
interface NoDynamicKeysRule {
/**
* Disallow localization dynamic keys at localization methods.
*
* @see [no-dynamic-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-dynamic-keys.html)
*/
'@intlify/vue-i18n/no-dynamic-keys': NoDynamicKeysRuleConfig;
}
/**
* Disallow use HTML localization messages.
*
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
*/
type NoHtmlMessagesRuleConfig = RuleConfig<[]>;
/**
* Disallow use HTML localization messages.
*
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
*/
interface NoHtmlMessagesRule {
/**
* Disallow use HTML localization messages.
*
* @see [no-html-messages](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-html-messages.html)
*/
'@intlify/vue-i18n/no-html-messages': NoHtmlMessagesRuleConfig;
}
/**
* Disallow using `path` prop with `<i18n-t>`.
*
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
*/
type NoI18nTPathPropRuleConfig = RuleConfig<[]>;
/**
* Disallow using `path` prop with `<i18n-t>`.
*
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
*/
interface NoI18nTPathPropRule {
/**
* Disallow using `path` prop with `<i18n-t>`.
*
* @see [no-i18n-t-path-prop](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-i18n-t-path-prop.html)
*/
'@intlify/vue-i18n/no-i18n-t-path-prop': NoI18nTPathPropRuleConfig;
}
/**
* Disallow missing locale message key at localization methods.
*
* @see [no-missing-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys.html)
*/
type NoMissingKeysRuleConfig = RuleConfig<[]>;
/**
* Disallow missing locale message key at localization methods.
*
* @see [no-missing-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys.html)
*/
interface NoMissingKeysRule {
/**
* Disallow missing locale message key at localization methods.
*
* @see [no-missing-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys.html)
*/
'@intlify/vue-i18n/no-missing-keys': NoMissingKeysRuleConfig;
}
/**
* Option.
*/
interface NoMissingKeysInOtherLocalesOption {
ignoreLocales?: string[];
}
/**
* Options.
*/
type NoMissingKeysInOtherLocalesOptions = [
NoMissingKeysInOtherLocalesOption?,
];
/**
* Disallow missing locale message keys in other locales.
*
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
*/
type NoMissingKeysInOtherLocalesRuleConfig =
RuleConfig<NoMissingKeysInOtherLocalesOptions>;
/**
* Disallow missing locale message keys in other locales.
*
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
*/
interface NoMissingKeysInOtherLocalesRule {
/**
* Disallow missing locale message keys in other locales.
*
* @see [no-missing-keys-in-other-locales](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-missing-keys-in-other-locales.html)
*/
'@intlify/vue-i18n/no-missing-keys-in-other-locales': NoMissingKeysInOtherLocalesRuleConfig;
}
/**
* Option.
*/
interface NoRawTextOption {
attributes?: {
/**
*/
[k: string]: string[];
};
ignoreNodes?: any[];
ignorePattern?: string;
ignoreText?: any[];
[k: string]: any;
}
/**
* Options.
*/
type NoRawTextOptions = [NoRawTextOption?];
/**
* Disallow to string literal in template or JSX.
*
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
*/
type NoRawTextRuleConfig = RuleConfig<NoRawTextOptions>;
/**
* Disallow to string literal in template or JSX.
*
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
*/
interface NoRawTextRule {
/**
* Disallow to string literal in template or JSX.
*
* @see [no-raw-text](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-raw-text.html)
*/
'@intlify/vue-i18n/no-raw-text': NoRawTextRuleConfig;
}
/**
* Option.
*/
interface NoUnknownLocaleOption {
locales?: string[];
disableRFC5646?: boolean;
}
/**
* Options.
*/
type NoUnknownLocaleOptions = [NoUnknownLocaleOption?];
/**
* Disallow unknown locale name.
*
* @see [no-unknown-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unknown-locale.html)
*/
type NoUnknownLocaleRuleConfig = RuleConfig<NoUnknownLocaleOptions>;
/**
* Disallow unknown locale name.
*
* @see [no-unknown-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unknown-locale.html)
*/
interface NoUnknownLocaleRule {
/**
* Disallow unknown locale name.
*
* @see [no-unknown-locale](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unknown-locale.html)
*/
'@intlify/vue-i18n/no-unknown-locale': NoUnknownLocaleRuleConfig;
}
/**
* Option.
*/
interface NoUnusedKeysOption {
src?: string;
extensions?: string[];
ignores?: string[];
enableFix?: boolean;
}
/**
* Options.
*/
type NoUnusedKeysOptions = [NoUnusedKeysOption?];
/**
* Disallow unused localization keys.
*
* @see [no-unused-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unused-keys.html)
*/
type NoUnusedKeysRuleConfig = RuleConfig<NoUnusedKeysOptions>;
/**
* Disallow unused localization keys.
*
* @see [no-unused-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unused-keys.html)
*/
interface NoUnusedKeysRule {
/**
* Disallow unused localization keys.
*
* @see [no-unused-keys](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-unused-keys.html)
*/
'@intlify/vue-i18n/no-unused-keys': NoUnusedKeysRuleConfig;
}
/**
* Disallow use of localization methods on v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-v-html.html)
*/
type NoVHtmlRuleConfig = RuleConfig<[]>;
/**
* Disallow use of localization methods on v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-v-html.html)
*/
interface NoVHtmlRule {
/**
* Disallow use of localization methods on v-html to prevent XSS attack.
*
* @see [no-v-html](https://eslint-plugin-vue-i18n.intlify.dev/rules/no-v-html.html)
*/
'@intlify/vue-i18n/no-v-html': NoVHtmlRuleConfig;
}
/**
* Enforce linked key to be enclosed in parentheses.
*
* @see [prefer-linked-key-with-paren](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-linked-key-with-paren.html)
*/
type PreferLinkedKeyWithParenRuleConfig = RuleConfig<[]>;
/**
* Enforce linked key to be enclosed in parentheses.
*
* @see [prefer-linked-key-with-paren](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-linked-key-with-paren.html)
*/
interface PreferLinkedKeyWithParenRule {
/**
* Enforce linked key to be enclosed in parentheses.
*
* @see [prefer-linked-key-with-paren](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-linked-key-with-paren.html)
*/
'@intlify/vue-i18n/prefer-linked-key-with-paren': PreferLinkedKeyWithParenRuleConfig;
}
/**
* Require lang attribute on `<i18n>` block.
*
* @see [prefer-sfc-lang-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-sfc-lang-attr.html)
*/
type PreferSfcLangAttrRuleConfig = RuleConfig<[]>;
/**
* Require lang attribute on `<i18n>` block.
*
* @see [prefer-sfc-lang-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-sfc-lang-attr.html)
*/
interface PreferSfcLangAttrRule {
/**
* Require lang attribute on `<i18n>` block.
*
* @see [prefer-sfc-lang-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/prefer-sfc-lang-attr.html)
*/
'@intlify/vue-i18n/prefer-sfc-lang-attr': PreferSfcLangAttrRuleConfig;
}
/**
* Option.
*/
type SfcLocaleAttrOption = 'always' | 'never';
/**
* Options.
*/
type SfcLocaleAttrOptions = [SfcLocaleAttrOption?];
/**
* Require or disallow the locale attribute on `<i18n>` block.
*
* @see [sfc-locale-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/sfc-locale-attr.html)
*/
type SfcLocaleAttrRuleConfig = RuleConfig<SfcLocaleAttrOptions>;
/**
* Require or disallow the locale attribute on `<i18n>` block.
*
* @see [sfc-locale-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/sfc-locale-attr.html)
*/
interface SfcLocaleAttrRule {
/**
* Require or disallow the locale attribute on `<i18n>` block.
*
* @see [sfc-locale-attr](https://eslint-plugin-vue-i18n.intlify.dev/rules/sfc-locale-attr.html)
*/
'@intlify/vue-i18n/sfc-locale-attr': SfcLocaleAttrRuleConfig;
}
/**
* Option.
*/
interface ValidMessageSyntaxOption {
allowNotString?: boolean;
}
/**
* Options.
*/
type ValidMessageSyntaxOptions = [ValidMessageSyntaxOption?];
/**
* Disallow invalid message syntax.
*
* @see [valid-message-syntax](https://eslint-plugin-vue-i18n.intlify.dev/rules/valid-message-syntax.html)
*/
type ValidMessageSyntaxRuleConfig =
RuleConfig<ValidMessageSyntaxOptions>;
/**
* Disallow invalid message syntax.
*
* @see [valid-message-syntax](https://eslint-plugin-vue-i18n.intlify.dev/rules/valid-message-syntax.html)
*/
interface ValidMessageSyntaxRule {
/**
* Disallow invalid message syntax.
*
* @see [valid-message-syntax](https://eslint-plugin-vue-i18n.intlify.dev/rules/valid-message-syntax.html)
*/
'@intlify/vue-i18n/valid-message-syntax': ValidMessageSyntaxRuleConfig;
}
/**
* All VueI18n rules.
*/
type VueI18nRules = KeyFormatStyleRule &
NoDeprecatedI18nComponentRule &
NoDeprecatedI18nPlaceAttrRule &
NoDeprecatedI18nPlacesPropRule &
NoDuplicateKeysInLocaleRule &
NoDynamicKeysRule &
NoHtmlMessagesRule &
NoI18nTPathPropRule &
NoMissingKeysInOtherLocalesRule &
NoMissingKeysRule &
NoRawTextRule &
NoUnknownLocaleRule &
NoUnusedKeysRule &
NoVHtmlRule &
PreferLinkedKeyWithParenRule &
PreferSfcLangAttrRule &
SfcLocaleAttrRule &
ValidMessageSyntaxRule;
/**
* Config.
*/
interface ComponentNameInTemplateCasingConfig {
ignores?: string[];
registeredComponentsOnly?: boolean;
}
/**
* Option.
*/
type ComponentNameInTemplateCasingOption = 'PascalCase' | 'kebab-case';
/**
* Options.
*/
type ComponentNameInTemplateCasingOptions = [
ComponentNameInTemplateCasingOption?,
ComponentNameInTemplateCasingConfig?,
];
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
type ComponentNameInTemplateCasingRuleConfig =
RuleConfig<ComponentNameInTemplateCasingOptions>;
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
interface ComponentNameInTemplateCasingRule {
/**
* Enforce specific casing for the component naming style in template.
*
* @see [component-name-in-template-casing](https://eslint.vuejs.org/rules/component-name-in-template-casing.html)
*/
'vue-pug/component-name-in-template-casing': ComponentNameInTemplateCasingRuleConfig;
}
/**
* Option.
*/
interface NoParsingErrorOption {
ASSERT_FAILED?: boolean;
SYNTAX_ERROR?: boolean;
INCORRECT_NESTING?: boolean;
NO_END_BRACKET?: boolean;
BRACKET_MISMATCH?: boolean;
INVALID_ID?: boolean;
INVALID_CLASS_NAME?: boolean;
NO_EXTENDS_PATH?: boolean;
MALFORMED_EXTENDS?: boolean;
NO_INCLUDE_PATH?: boolean;
MALFORMED_INCLUDE?: boolean;
NO_CASE_EXPRESSION?: boolean;
NO_WHEN_EXPRESSION?: boolean;
DEFAULT_WITH_EXPRESSION?: boolean;
ELSE_CONDITION?: boolean;
NO_WHILE_EXPRESSION?: boolean;
MALFORMED_EACH?: boolean;
MALFORMED_EACH_OF_LVAL?: boolean;
INVALID_KEY_CHARACTER?: boolean;
INVALID_INDENTATION?: boolean;
INCONSISTENT_INDENTATION?: boolean;
UNEXPECTED_TEXT?: boolean;
INVALID_TOKEN?: boolean;
BLOCK_IN_BUFFERED_CODE?: boolean;
BLOCK_OUTISDE_MIXIN?: boolean;
RAW_INCLUDE_BLOCK?: boolean;
MIXIN_WITHOUT_BODY?: boolean;
}
/**
* Options.
*/
type NoParsingErrorOptions = [NoParsingErrorOption?];
/**
* Disallow parsing errors in `<template lang="pug">`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
type NoParsingErrorRuleConfig = RuleConfig<NoParsingErrorOptions>;
/**
* Disallow parsing errors in `<template lang="pug">`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
interface NoParsingErrorRule {
/**
* Disallow parsing errors in `<template lang="pug">`.
*
* @see [no-parsing-error](https://eslint.vuejs.org/rules/no-parsing-error.html)
*/
'vue-pug/no-parsing-error': NoParsingErrorRuleConfig;
}
/**
* Disallow pug control flow features.
*
* @see [no-pug-control-flow](https://eslint-plugin-vue-pug.rash.codes/rules/no-pug-control-flow.html)
*/
type NoPugControlFlowRuleConfig = RuleConfig<[]>;
/**
* Disallow pug control flow features.
*
* @see [no-pug-control-flow](https://eslint-plugin-vue-pug.rash.codes/rules/no-pug-control-flow.html)
*/
interface NoPugControlFlowRule {
/**
* Disallow pug control flow features.
*
* @see [no-pug-control-flow](https://eslint-plugin-vue-pug.rash.codes/rules/no-pug-control-flow.html)
*/
'vue-pug/no-pug-control-flow': NoPugControlFlowRuleConfig;
}
/**
* All VuePug rules.
*/
type VuePugRules = ComponentNameInTemplateCasingRule &
NoParsingErrorRule &
NoPugControlFlowRule;
/**
* Option.
*/
type BlockMappingOption =
| ('always' | 'never')
| {
singleline?: 'always' | 'never' | 'ignore';
multiline?: 'always' | 'never' | 'ignore';
};
/**
* Options.
*/
type BlockMappingOptions = [BlockMappingOption?];
/**
* Require or disallow block style mappings.
*
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html)
*/
type BlockMappingRuleConfig = RuleConfig<BlockMappingOptions>;
/**
* Require or disallow block style mappings.
*
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html)
*/
interface BlockMappingRule {
/**
* Require or disallow block style mappings.
*
* @see [block-mapping](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping.html)
*/
'yml/block-mapping': BlockMappingRuleConfig;
}
/**
* Option.
*/
type BlockMappingColonIndicatorNewlineOption = 'always' | 'never';
/**
* Options.
*/
type BlockMappingColonIndicatorNewlineOptions = [
BlockMappingColonIndicatorNewlineOption?,
];
/**
* Enforce consistent line breaks after `:` indicator.
*
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html)
*/
type BlockMappingColonIndicatorNewlineRuleConfig =
RuleConfig<BlockMappingColonIndicatorNewlineOptions>;
/**
* Enforce consistent line breaks after `:` indicator.
*
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html)
*/
interface BlockMappingColonIndicatorNewlineRule {
/**
* Enforce consistent line breaks after `:` indicator.
*
* @see [block-mapping-colon-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-colon-indicator-newline.html)
*/
'yml/block-mapping-colon-indicator-newline': BlockMappingColonIndicatorNewlineRuleConfig;
}
/**
* Option.
*/
type BlockMappingQuestionIndicatorNewlineOption = 'always' | 'never';
/**
* Options.
*/
type BlockMappingQuestionIndicatorNewlineOptions = [
BlockMappingQuestionIndicatorNewlineOption?,
];
/**
* Enforce consistent line breaks after `?` indicator.
*
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html)
*/
type BlockMappingQuestionIndicatorNewlineRuleConfig =
RuleConfig<BlockMappingQuestionIndicatorNewlineOptions>;
/**
* Enforce consistent line breaks after `?` indicator.
*
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html)
*/
interface BlockMappingQuestionIndicatorNewlineRule {
/**
* Enforce consistent line breaks after `?` indicator.
*
* @see [block-mapping-question-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-mapping-question-indicator-newline.html)
*/
'yml/block-mapping-question-indicator-newline': BlockMappingQuestionIndicatorNewlineRuleConfig;
}
/**
* Option.
*/
type BlockSequenceOption =
| ('always' | 'never')
| {
singleline?: 'always' | 'never' | 'ignore';
multiline?: 'always' | 'never' | 'ignore';
};
/**
* Options.
*/
type BlockSequenceOptions = [BlockSequenceOption?];
/**
* Require or disallow block style sequences.
*
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html)
*/
type BlockSequenceRuleConfig = RuleConfig<BlockSequenceOptions>;
/**
* Require or disallow block style sequences.
*
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html)
*/
interface BlockSequenceRule {
/**
* Require or disallow block style sequences.
*
* @see [block-sequence](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence.html)
*/
'yml/block-sequence': BlockSequenceRuleConfig;
}
/**
* Config.
*/
interface BlockSequenceHyphenIndicatorNewlineConfig {
nestedHyphen?: 'always' | 'never';
blockMapping?: 'always' | 'never';
}
/**
* Option.
*/
type BlockSequenceHyphenIndicatorNewlineOption = 'always' | 'never';
/**
* Options.
*/
type BlockSequenceHyphenIndicatorNewlineOptions = [
BlockSequenceHyphenIndicatorNewlineOption?,
BlockSequenceHyphenIndicatorNewlineConfig?,
];
/**
* Enforce consistent line breaks after `-` indicator.
*
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html)
*/
type BlockSequenceHyphenIndicatorNewlineRuleConfig =
RuleConfig<BlockSequenceHyphenIndicatorNewlineOptions>;
/**
* Enforce consistent line breaks after `-` indicator.
*
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html)
*/
interface BlockSequenceHyphenIndicatorNewlineRule {
/**
* Enforce consistent line breaks after `-` indicator.
*
* @see [block-sequence-hyphen-indicator-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/block-sequence-hyphen-indicator-newline.html)
*/
'yml/block-sequence-hyphen-indicator-newline': BlockSequenceHyphenIndicatorNewlineRuleConfig;
}
/**
* Option.
*/
interface FileExtensionOption {
extension?: 'yaml' | 'yml';
caseSensitive?: boolean;
}
/**
* Options.
*/
type FileExtensionOptions = [FileExtensionOption?];
/**
* Enforce YAML file extension.
*
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html)
*/
type FileExtensionRuleConfig = RuleConfig<FileExtensionOptions>;
/**
* Enforce YAML file extension.
*
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html)
*/
interface FileExtensionRule {
/**
* Enforce YAML file extension.
*
* @see [file-extension](https://ota-meshi.github.io/eslint-plugin-yml/rules/file-extension.html)
*/
'yml/file-extension': FileExtensionRuleConfig;
}
/**
* Option.
*/
type FlowMappingCurlyNewlineOption =
| ('always' | 'never')
| {
multiline?: boolean;
minProperties?: number;
consistent?: boolean;
};
/**
* Options.
*/
type FlowMappingCurlyNewlineOptions = [FlowMappingCurlyNewlineOption?];
/**
* Enforce consistent line breaks inside braces.
*
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html)
*/
type FlowMappingCurlyNewlineRuleConfig =
RuleConfig<FlowMappingCurlyNewlineOptions>;
/**
* Enforce consistent line breaks inside braces.
*
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html)
*/
interface FlowMappingCurlyNewlineRule {
/**
* Enforce consistent line breaks inside braces.
*
* @see [flow-mapping-curly-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-newline.html)
*/
'yml/flow-mapping-curly-newline': FlowMappingCurlyNewlineRuleConfig;
}
/**
* Config.
*/
interface FlowMappingCurlySpacingConfig {
arraysInObjects?: boolean;
objectsInObjects?: boolean;
}
/**
* Option.
*/
type FlowMappingCurlySpacingOption = 'always' | 'never';
/**
* Options.
*/
type FlowMappingCurlySpacingOptions = [
FlowMappingCurlySpacingOption?,
FlowMappingCurlySpacingConfig?,
];
/**
* Enforce consistent spacing inside braces.
*
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html)
*/
type FlowMappingCurlySpacingRuleConfig =
RuleConfig<FlowMappingCurlySpacingOptions>;
/**
* Enforce consistent spacing inside braces.
*
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html)
*/
interface FlowMappingCurlySpacingRule {
/**
* Enforce consistent spacing inside braces.
*
* @see [flow-mapping-curly-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-mapping-curly-spacing.html)
*/
'yml/flow-mapping-curly-spacing': FlowMappingCurlySpacingRuleConfig;
}
/**
* Option.
*/
type FlowSequenceBracketNewlineOption =
| ('always' | 'never' | 'consistent')
| {
multiline?: boolean;
minItems?: number | null;
};
/**
* Options.
*/
type FlowSequenceBracketNewlineOptions = [
FlowSequenceBracketNewlineOption?,
];
/**
* Enforce linebreaks after opening and before closing flow sequence brackets.
*
* @see [flow-sequence-bracket-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html)
*/
type FlowSequenceBracketNewlineRuleConfig =
RuleConfig<FlowSequenceBracketNewlineOptions>;
/**
* Enforce linebreaks after opening and before closing flow sequence brackets.
*
* @see [flow-sequence-bracket-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html)
*/
interface FlowSequenceBracketNewlineRule {
/**
* Enforce linebreaks after opening and before closing flow sequence brackets.
*
* @see [flow-sequence-bracket-newline](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-newline.html)
*/
'yml/flow-sequence-bracket-newline': FlowSequenceBracketNewlineRuleConfig;
}
/**
* Config.
*/
interface FlowSequenceBracketSpacingConfig {
singleValue?: boolean;
objectsInArrays?: boolean;
arraysInArrays?: boolean;
}
/**
* Option.
*/
type FlowSequenceBracketSpacingOption = 'always' | 'never';
/**
* Options.
*/
type FlowSequenceBracketSpacingOptions = [
FlowSequenceBracketSpacingOption?,
FlowSequenceBracketSpacingConfig?,
];
/**
* Enforce consistent spacing inside flow sequence brackets.
*
* @see [flow-sequence-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html)
*/
type FlowSequenceBracketSpacingRuleConfig =
RuleConfig<FlowSequenceBracketSpacingOptions>;
/**
* Enforce consistent spacing inside flow sequence brackets.
*
* @see [flow-sequence-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html)
*/
interface FlowSequenceBracketSpacingRule {
/**
* Enforce consistent spacing inside flow sequence brackets.
*
* @see [flow-sequence-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/flow-sequence-bracket-spacing.html)
*/
'yml/flow-sequence-bracket-spacing': FlowSequenceBracketSpacingRuleConfig;
}
/**
* Config.
*/
interface IndentConfig {
indentBlockSequences?: boolean;
indicatorValueIndent?: number;
}
/**
* Option.
*/
type IndentOption = number;
/**
* Options.
*/
type IndentOptions = [IndentOption?, IndentConfig?];
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html)
*/
type IndentRuleConfig = RuleConfig<IndentOptions>;
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html)
*/
interface IndentRule {
/**
* Enforce consistent indentation.
*
* @see [indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/indent.html)
*/
'yml/indent': IndentRuleConfig;
}
/**
* Option.
*/
interface KeyNameCasingOption {
camelCase?: boolean;
PascalCase?: boolean;
SCREAMING_SNAKE_CASE?: boolean;
'kebab-case'?: boolean;
snake_case?: boolean;
ignores?: string[];
}
/**
* Options.
*/
type KeyNameCasingOptions = [KeyNameCasingOption?];
/**
* Enforce naming convention to key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html)
*/
type KeyNameCasingRuleConfig = RuleConfig<KeyNameCasingOptions>;
/**
* Enforce naming convention to key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html)
*/
interface KeyNameCasingRule {
/**
* Enforce naming convention to key names.
*
* @see [key-name-casing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-name-casing.html)
*/
'yml/key-name-casing': KeyNameCasingRuleConfig;
}
/**
* Option.
*/
type KeySpacingOption =
| {
align?:
| ('colon' | 'value')
| {
on?: 'colon' | 'value';
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
align?:
| ('colon' | 'value')
| {
on?: 'colon' | 'value';
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
}
| {
singleLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
multiLine?: {
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
align?: {
on?: 'colon' | 'value';
mode?: 'strict' | 'minimum';
beforeColon?: boolean;
afterColon?: boolean;
};
};
/**
* Options.
*/
type KeySpacingOptions = [KeySpacingOption?];
/**
* Enforce consistent spacing between keys and values in mapping pairs.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html)
*/
type KeySpacingRuleConfig = RuleConfig<KeySpacingOptions>;
/**
* Enforce consistent spacing between keys and values in mapping pairs.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html)
*/
interface KeySpacingRule {
/**
* Enforce consistent spacing between keys and values in mapping pairs.
*
* @see [key-spacing](https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html)
*/
'yml/key-spacing': KeySpacingRuleConfig;
}
/**
* Disallow empty document.
*
* @see [no-empty-document](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html)
*/
type NoEmptyDocumentRuleConfig = RuleConfig<[]>;
/**
* Disallow empty document.
*
* @see [no-empty-document](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html)
*/
interface NoEmptyDocumentRule {
/**
* Disallow empty document.
*
* @see [no-empty-document](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-document.html)
*/
'yml/no-empty-document': NoEmptyDocumentRuleConfig;
}
/**
* Disallow empty mapping keys.
*
* @see [no-empty-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html)
*/
type NoEmptyKeyRuleConfig = RuleConfig<[]>;
/**
* Disallow empty mapping keys.
*
* @see [no-empty-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html)
*/
interface NoEmptyKeyRule {
/**
* Disallow empty mapping keys.
*
* @see [no-empty-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-key.html)
*/
'yml/no-empty-key': NoEmptyKeyRuleConfig;
}
/**
* Disallow empty mapping values.
*
* @see [no-empty-mapping-value](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html)
*/
type NoEmptyMappingValueRuleConfig = RuleConfig<[]>;
/**
* Disallow empty mapping values.
*
* @see [no-empty-mapping-value](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html)
*/
interface NoEmptyMappingValueRule {
/**
* Disallow empty mapping values.
*
* @see [no-empty-mapping-value](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-mapping-value.html)
*/
'yml/no-empty-mapping-value': NoEmptyMappingValueRuleConfig;
}
/**
* Disallow empty sequence entries.
*
* @see [no-empty-sequence-entry](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html)
*/
type NoEmptySequenceEntryRuleConfig = RuleConfig<[]>;
/**
* Disallow empty sequence entries.
*
* @see [no-empty-sequence-entry](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html)
*/
interface NoEmptySequenceEntryRule {
/**
* Disallow empty sequence entries.
*
* @see [no-empty-sequence-entry](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-empty-sequence-entry.html)
*/
'yml/no-empty-sequence-entry': NoEmptySequenceEntryRuleConfig;
}
/**
* Option.
*/
interface NoIrregularWhitespaceOption {
skipComments?: boolean;
skipQuotedScalars?: boolean;
}
/**
* Options.
*/
type NoIrregularWhitespaceOptions = [NoIrregularWhitespaceOption?];
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html)
*/
type NoIrregularWhitespaceRuleConfig =
RuleConfig<NoIrregularWhitespaceOptions>;
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html)
*/
interface NoIrregularWhitespaceRule {
/**
* Disallow irregular whitespace.
*
* @see [no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-irregular-whitespace.html)
*/
'yml/no-irregular-whitespace': NoIrregularWhitespaceRuleConfig;
}
/**
* Option.
*/
interface NoMultipleEmptyLinesOption {
max: number;
maxEOF?: number;
maxBOF?: number;
}
/**
* Options.
*/
type NoMultipleEmptyLinesOptions = [NoMultipleEmptyLinesOption?];
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html)
*/
type NoMultipleEmptyLinesRuleConfig =
RuleConfig<NoMultipleEmptyLinesOptions>;
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html)
*/
interface NoMultipleEmptyLinesRule {
/**
* Disallow multiple empty lines.
*
* @see [no-multiple-empty-lines](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-multiple-empty-lines.html)
*/
'yml/no-multiple-empty-lines': NoMultipleEmptyLinesRuleConfig;
}
/**
* Disallow tabs for indentation.
*
* @see [no-tab-indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html)
*/
type NoTabIndentRuleConfig = RuleConfig<[]>;
/**
* Disallow tabs for indentation.
*
* @see [no-tab-indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html)
*/
interface NoTabIndentRule {
/**
* Disallow tabs for indentation.
*
* @see [no-tab-indent](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-tab-indent.html)
*/
'yml/no-tab-indent': NoTabIndentRuleConfig;
}
/**
* Disallow trailing zeros for floats.
*
* @see [no-trailing-zeros](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html)
*/
type NoTrailingZerosRuleConfig = RuleConfig<[]>;
/**
* Disallow trailing zeros for floats.
*
* @see [no-trailing-zeros](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html)
*/
interface NoTrailingZerosRule {
/**
* Disallow trailing zeros for floats.
*
* @see [no-trailing-zeros](https://ota-meshi.github.io/eslint-plugin-yml/rules/no-trailing-zeros.html)
*/
'yml/no-trailing-zeros': NoTrailingZerosRuleConfig;
}
/**
* Config.
*/
interface PlainScalarConfig {
ignorePatterns?: string[];
}
/**
* Option.
*/
type PlainScalarOption = 'always' | 'never';
/**
* Options.
*/
type PlainScalarOptions = [PlainScalarOption?, PlainScalarConfig?];
/**
* Require or disallow plain style scalar.
*
* @see [plain-scalar](https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html)
*/
type PlainScalarRuleConfig = RuleConfig<PlainScalarOptions>;
/**
* Require or disallow plain style scalar.
*
* @see [plain-scalar](https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html)
*/
interface PlainScalarRule {
/**
* Require or disallow plain style scalar.
*
* @see [plain-scalar](https://ota-meshi.github.io/eslint-plugin-yml/rules/plain-scalar.html)
*/
'yml/plain-scalar': PlainScalarRuleConfig;
}
/**
* Option.
*/
interface QuotesOption {
prefer?: 'double' | 'single';
avoidEscape?: boolean;
}
/**
* Options.
*/
type QuotesOptions = [QuotesOption?];
/**
* Enforce the consistent use of either double, or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html)
*/
type QuotesRuleConfig = RuleConfig<QuotesOptions>;
/**
* Enforce the consistent use of either double, or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html)
*/
interface QuotesRule {
/**
* Enforce the consistent use of either double, or single quotes.
*
* @see [quotes](https://ota-meshi.github.io/eslint-plugin-yml/rules/quotes.html)
*/
'yml/quotes': QuotesRuleConfig;
}
/**
* Disallow mapping keys other than strings.
*
* @see [require-string-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html)
*/
type RequireStringKeyRuleConfig = RuleConfig<[]>;
/**
* Disallow mapping keys other than strings.
*
* @see [require-string-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html)
*/
interface RequireStringKeyRule {
/**
* Disallow mapping keys other than strings.
*
* @see [require-string-key](https://ota-meshi.github.io/eslint-plugin-yml/rules/require-string-key.html)
*/
'yml/require-string-key': RequireStringKeyRuleConfig;
}
/**
* Option.
*/
type SortKeysOption =
| [
{
pathPattern: string;
hasProperties?: string[];
order:
| (
| string
| {
keyPattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minKeys?: number;
allowLineSeparatedGroups?: boolean;
},
...{
pathPattern: string;
hasProperties?: string[];
order:
| (
| string
| {
keyPattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minKeys?: number;
allowLineSeparatedGroups?: boolean;
}[],
]
| []
| ['asc' | 'desc']
| [
'asc' | 'desc',
{
caseSensitive?: boolean;
natural?: boolean;
minKeys?: number;
allowLineSeparatedGroups?: boolean;
},
];
/**
* Options.
*/
type SortKeysOptions = SortKeysOption;
/**
* Require mapping keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html)
*/
type SortKeysRuleConfig = RuleConfig<SortKeysOptions>;
/**
* Require mapping keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html)
*/
interface SortKeysRule {
/**
* Require mapping keys to be sorted.
*
* @see [sort-keys](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-keys.html)
*/
'yml/sort-keys': SortKeysRuleConfig;
}
/**
* Option.
*/
/**
* @minItems 1
*/
type SortSequenceValuesOption = [
{
pathPattern: string;
order:
| (
| string
| {
valuePattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minValues?: number;
},
...{
pathPattern: string;
order:
| (
| string
| {
valuePattern?: string;
order?: {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
}
)[]
| {
type?: 'asc' | 'desc';
caseSensitive?: boolean;
natural?: boolean;
};
minValues?: number;
}[],
];
/**
* Options.
*/
type SortSequenceValuesOptions = SortSequenceValuesOption;
/**
* Require sequence values to be sorted.
*
* @see [sort-sequence-values](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html)
*/
type SortSequenceValuesRuleConfig =
RuleConfig<SortSequenceValuesOptions>;
/**
* Require sequence values to be sorted.
*
* @see [sort-sequence-values](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html)
*/
interface SortSequenceValuesRule {
/**
* Require sequence values to be sorted.
*
* @see [sort-sequence-values](https://ota-meshi.github.io/eslint-plugin-yml/rules/sort-sequence-values.html)
*/
'yml/sort-sequence-values': SortSequenceValuesRuleConfig;
}
/**
* Config.
*/
interface SpacedCommentConfig {
exceptions?: string[];
markers?: string[];
}
/**
* Option.
*/
type SpacedCommentOption = 'always' | 'never';
/**
* Options.
*/
type SpacedCommentOptions = [SpacedCommentOption?, SpacedCommentConfig?];
/**
* Enforce consistent spacing after the `#` in a comment.
*
* @see [spaced-comment](https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html)
*/
type SpacedCommentRuleConfig = RuleConfig<SpacedCommentOptions>;
/**
* Enforce consistent spacing after the `#` in a comment.
*
* @see [spaced-comment](https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html)
*/
interface SpacedCommentRule {
/**
* Enforce consistent spacing after the `#` in a comment.
*
* @see [spaced-comment](https://ota-meshi.github.io/eslint-plugin-yml/rules/spaced-comment.html)
*/
'yml/spaced-comment': SpacedCommentRuleConfig;
}
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html)
*/
type VueCustomBlockNoParsingErrorRuleConfig = RuleConfig<[]>;
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html)
*/
interface VueCustomBlockNoParsingErrorRule {
/**
* Disallow parsing errors in Vue custom blocks.
*
* @see [vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-yml/rules/vue-custom-block/no-parsing-error.html)
*/
'yml/vue-custom-block/no-parsing-error': VueCustomBlockNoParsingErrorRuleConfig;
}
/**
* All Yml rules.
*/
type YmlRules = BlockMappingColonIndicatorNewlineRule &
BlockMappingQuestionIndicatorNewlineRule &
BlockMappingRule &
BlockSequenceHyphenIndicatorNewlineRule &
BlockSequenceRule &
FileExtensionRule &
FlowMappingCurlyNewlineRule &
FlowMappingCurlySpacingRule &
FlowSequenceBracketNewlineRule &
FlowSequenceBracketSpacingRule &
IndentRule &
KeyNameCasingRule &
KeySpacingRule &
NoEmptyDocumentRule &
NoEmptyKeyRule &
NoEmptyMappingValueRule &
NoEmptySequenceEntryRule &
NoIrregularWhitespaceRule &
NoMultipleEmptyLinesRule &
NoTabIndentRule &
NoTrailingZerosRule &
PlainScalarRule &
QuotesRule &
RequireStringKeyRule &
SortKeysRule &
SortSequenceValuesRule &
SpacedCommentRule &
VueCustomBlockNoParsingErrorRule;
type BuiltinRules = MergeIntersection<
DeprecationRules &
EslintRules &
EslintCommentsRules &
GraphQLRules &
ImportRules &
JSDocRules &
JsoncRules &
JsxA11yRules &
NodeRules &
NRules &
PromiseRules &
ReactHooksRules &
ReactRules &
SonarJSRules &
SpellcheckRules &
TestingLibraryRules &
TypeScriptRules &
UnicornRules &
VitestRules &
VueRules &
VueI18nRules &
VuePugRules &
YmlRules
>;
/**
* Rules.
*
* @see [Rules](https://eslint.org/docs/user-guide/configuring/rules)
*/
type Rules = Partial<BuiltinRules & Record<string, RuleConfig>>;
/**
* An environment provides predefined global variables.
*
* @see [Environments](https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments)
*/
interface Environments extends Partial<Record<string, boolean>> {
/**
* Browser global variables.
*/
browser?: boolean;
/**
* Node.js global variables and Node.js scoping.
*/
node?: boolean;
/**
* CommonJS global variables and CommonJS scoping (use this for browser-only code that uses Browserify/WebPack).
*/
commonjs?: boolean;
/**
* Globals common to both Node.js and Browser.
*/
'shared-node-browser'?: boolean;
/**
* Enable all ECMAScript 6 features except for modules (this automatically sets the `ecmaVersion` parser option to 6).
*/
es6?: boolean;
/**
* Adds all ECMAScript 2016 globals and automatically sets the `ecmaVersion` parser option to 7.
*/
es2016?: boolean;
/**
* Adds all ECMAScript 2017 globals and automatically sets the `ecmaVersion` parser option to 8.
*/
es2017?: boolean;
/**
* Adds all ECMAScript 2018 globals and automatically sets the `ecmaVersion` parser option to 9.
*/
es2018?: boolean;
/**
* Adds all ECMAScript 2019 globals and automatically sets the `ecmaVersion` parser option to 10.
*/
es2019?: boolean;
/**
* Adds all ECMAScript 2020 globals and automatically sets the `ecmaVersion` parser option to 11.
*/
es2020?: boolean;
/**
* Adds all ECMAScript 2021 globals and automatically sets the `ecmaVersion` parser option to 12.
*/
es2021?: boolean;
/**
* Adds all ECMAScript 2022 globals and automatically sets the `ecmaVersion` parser option to 13.
*/
es2022?: boolean;
/**
* Adds all ECMAScript 2023 globals and automatically sets the `ecmaVersion` parser option to 14.
*/
es2023?: boolean;
/**
* Web workers global variables.
*/
worker?: boolean;
/**
* Defines `require()` and `define()` as global variables as per the amd spec.
*/
amd?: boolean;
/**
* Adds all of the Mocha testing global variables.
*/
mocha?: boolean;
/**
* Adds all of the Jasmine testing global variables for version 1.3 and 2.0.
*/
jasmine?: boolean;
/**
* Jest global variables.
*/
jest?: boolean;
/**
* PhantomJS global variables.
*/
phantomjs?: boolean;
/**
* Protractor global variables.
*/
protractor?: boolean;
/**
* QUnit global variables.
*/
qunit?: boolean;
/**
* jQuery global variables.
*/
jquery?: boolean;
/**
* Prototype.js global variables.
*/
prototypejs?: boolean;
/**
* ShellJS global variables.
*/
shelljs?: boolean;
/**
* Meteor global variables.
*/
meteor?: boolean;
/**
* MongoDB global variables.
*/
mongo?: boolean;
/**
* AppleScript global variables.
*/
applescript?: boolean;
/**
* Java 8 Nashorn global variables.
*/
nashorn?: boolean;
/**
* Service Worker global variables.
*/
serviceworker?: boolean;
/**
* Atom test helper globals.
*/
atomtest?: boolean;
/**
* Ember test helper globals.
*/
embertest?: boolean;
/**
* WebExtensions globals.
*/
webextensions?: boolean;
/**
* GreaseMonkey globals.
*/
greasemonkey?: boolean;
}
/**
* Eslint extends.
*/
type EslintExtends = 'eslint:recommended' | 'eslint:all';
/**
* Eslint EslintComments extends.
*
* @see [Eslint EslintComments extends](https://mysticatea.github.io/eslint-plugin-eslint-comments/#%F0%9F%93%96-usage)
*/
type EslintCommentsExtends = 'plugin:eslint-comments/recommended';
/**
* Eslint GraphQL extends.
*
* @see [Eslint GraphQL extends](https://the-guild.dev/graphql/eslint/docs/configs)
*/
type GraphqlExtends =
| 'plugin:@graphql-eslint/operations-all'
| 'plugin:@graphql-eslint/operations-recommended'
| 'plugin:@graphql-eslint/relay'
| 'plugin:@graphql-eslint/schema-all'
| 'plugin:@graphql-eslint/schema-recommended';
/**
* Eslint import extends.
*
* @see [Eslint import extends](https://github.com/benmosher/eslint-plugin-import#installation)
*/
type ImportExtends =
| 'plugin:import/errors'
| 'plugin:import/warnings'
| 'plugin:import/typescript';
/**
* Eslint JSDoc extends.
*
* @see [Eslint JSDoc extends](https://github.com/gajus/eslint-plugin-jsdoc#configuration)
*/
type JsdocExtends = 'plugin:jsdoc/recommended';
/**
* Eslint Jsonc extends.
*
* @see [Eslint Jsonc extends](https://github.com/ota-meshi/eslint-plugin-jsonc#configuration)
*/
type JsoncExtends =
| 'plugin:jsdoc/base'
| 'plugin:jsdoc/recommended'
| 'plugin:jsonc/recommended-with-json'
| 'plugin:jsonc/recommended-with-jsonc'
| 'plugin:jsonc/recommended-with-json5'
| 'plugin:jsonc/prettier'
| 'plugin:jsonc/all';
/**
* Eslint MDX extends.
*
* @see [Eslint MDX extends](https://github.com/mdx-js/eslint-mdx/tree/master/packages/eslint-plugin-mdx)
*/
type MdxExtends =
| 'plugin:mdx/base'
| 'plugin:mdx/code-blocks'
| 'plugin:mdx/overrides'
| 'plugin:mdx/recommended';
/**
* Eslint N (Node) extends.
*
* @see [Eslint N extends](https://github.com/eslint-community/eslint-plugin-n#-configs)
*/
type NExtends =
| 'plugin:n/recommended'
| 'plugin:n/recommended-module'
| 'plugin:n/recommended-script';
/**
* Eslint Node extends.
*
* @see [Eslint Node extends](https://github.com/mysticatea/eslint-plugin-node#-configs)
*/
type NodeExtends =
| 'plugin:node/recommended'
| 'plugin:node/recommended-module'
| 'plugin:node/recommended-script';
/**
* Eslint Prettier extends.
*
* @see [Eslint Prettier extends](https://github.com/prettier/eslint-plugin-prettier#recommended-configuration)
*/
type PrettierExtends = 'plugin:prettier/recommended' | 'prettier';
/**
* Eslint promise extends.
*
* @see [Eslint promise extends](https://github.com/eslint-community/eslint-plugin-promise#usage)
*/
type PromiseExtends = 'plugin:promise/recommended';
/**
* Eslint React extends.
*
* @see [Eslint React extends](https://github.com/jsx-eslint/eslint-plugin-react)
*/
type ReactExtends =
| 'plugin:react/all'
| 'plugin:react/jsx-runtime'
| 'plugin:react/recommended';
/**
* Eslint ReactHooks extends.
*
* @see [Eslint ReactHooks extends](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)
*/
type ReactHooksExtends = 'plugin:react-hooks/recommended';
/**
* Eslint Sonarjs extends.
*
* @see [Eslint Sonarjs extends](https://github.com/SonarSource/eslint-plugin-sonarjs#available-configurations)
*/
type SonarjsExtends = 'plugin:sonarjs/recommended';
/**
* Eslint TestingLibrary extends.
*
* @see [Eslint TestingLibrary extends](https://github.com/testing-library/eslint-plugin-testing-library)
*/
type TestingLibraryExtends =
| 'plugin:testing-library/angular'
| 'plugin:testing-library/dom'
| 'plugin:testing-library/marko'
| 'plugin:testing-library/react'
| 'plugin:testing-library/vue';
/**
* Eslint Unicorn extends.
*
* @see [Eslint Unicorn extends](https://github.com/sindresorhus/eslint-plugin-unicorn)
*/
type UnicornExtends =
| 'plugin:unicorn/recommended'
| 'plugin:unicorn/all';
/**
* Eslint Vitest extends.
*
* @see [Eslint Vitest extends](https://eslint.vuejs.org/user-guide/#usage)
*/
type VitestExtends = 'plugin:vitest/all' | 'plugin:vitest/recommended';
/**
* Eslint Vue extends.
*
* @see [Eslint Vue extends](https://eslint.vuejs.org/user-guide/#usage)
*/
type VueExtends =
| 'plugin:vue/base'
| 'plugin:vue/vue3-essential'
| 'plugin:vue/vue3-strongly-recommended'
| 'plugin:vue/vue3-recommended'
| 'plugin:vue/essential'
| 'plugin:vue/strongly-recommended'
| 'plugin:vue/recommended';
/**
* Eslint Vue Pug extends.
*
* @see [Eslint Vue Pug extends](https://github.com/rashfael/eslint-plugin-vue-pug#usage)
*/
type VuePugExtends =
| 'plugin:vue-pug/base'
| 'plugin:vue-pug/vue3-essential'
| 'plugin:vue-pug/vue3-strongly-recommended'
| 'plugin:vue-pug/vue3-recommended'
| 'plugin:vue-pug/essential'
| 'plugin:vue-pug/strongly-recommended'
| 'plugin:vue-pug/recommended';
/**
* Eslint Intlify VueI18n extends.
*
* @see [Eslint Intlify VueI18n extends](https://eslint-plugin-vue-i18n.intlify.dev/started.html)
*/
type IntlifyVueI18nExtends = 'plugin:@intlify/vue-i18n/recommended';
/**
* Typescript eslint extends.
*
* @see [Typescript eslint extends](https://typescript-eslint.io/linting/configs#recommended-configurations)
*/
type TypescriptEslintExtends =
| 'plugin:@typescript-eslint/all'
| 'plugin:@typescript-eslint/base'
| 'plugin:@typescript-eslint/disable-type-checked'
| 'plugin:@typescript-eslint/eslint-recommended'
| 'plugin:@typescript-eslint/recommended-requiring-type-checking' // this requiring-type-checking is deprecated and only for @typescript-eslint/eslint-plugin@v5
| 'plugin:@typescript-eslint/recommended-type-checked'
| 'plugin:@typescript-eslint/recommended'
| 'plugin:@typescript-eslint/strict-type-checked'
| 'plugin:@typescript-eslint/strict'
| 'plugin:@typescript-eslint/stylistic-type-checked'
| 'plugin:@typescript-eslint/stylistic';
/**
* All known extends.
*/
type KnownExtends = LiteralUnion<
| EslintCommentsExtends
| EslintExtends
| GraphqlExtends
| ImportExtends
| IntlifyVueI18nExtends
| JsdocExtends
| JsoncExtends
| MdxExtends
| NExtends
| NodeExtends
| PrettierExtends
| PromiseExtends
| ReactExtends
| ReactHooksExtends
| SonarjsExtends
| TestingLibraryExtends
| TypescriptEslintExtends
| UnicornExtends
| VitestExtends
| VueExtends
| VuePugExtends
>;
/**
* Extending Configuration Files.
*
* @see [Extends](https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files)
*/
type Extends = KnownExtends | KnownExtends[];
/** Plugin. */
type Plugin = LiteralUnion<
| '@graphql-eslint'
| '@typescript-eslint'
| 'deprecation'
| 'import'
| 'inclusive-language'
| 'jsdoc'
| 'jsx-a11y'
| 'mdx'
| 'prettier'
| 'promise'
| 'react-hooks'
| 'react'
| 'sonarjs'
| 'spellcheck'
| 'testing-library'
| 'unicorn'
| 'vitest'
| 'vue'
>;
/**
* Import settings.
*/
interface ImportSettings {
/**
* A list of file extensions that will be parsed as modules and inspected for `export`s.
*
* @see [import/extensions](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importextensions)
*/
'import/extensions'?: string[];
/**
* If you require more granular extension definitions.
*
* @see [import/resolver](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importresolver)
*/
'import/resolver'?: string | Record<string, unknown>;
/**
* A list of regex strings that, if matched by a path, will not report the matching module if no `exports` are found.
*
* @see [import/ignore](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importignore)
*/
'import/ignore'?: string[];
/**
* An array of additional modules to consider as "core" modules--modules that should be considered resolved but have no path on the filesystem.
*
* @see [import/core-modules](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importcore-modules)
*/
'import/core-modules'?: string[];
/**
* An array of folders. Resolved modules only from those folders will be considered as "external".
*
* @default ["node_modules"]
*
* @see [import/external-module-folders](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importexternal-module-folders)
*/
'import/external-module-folders'?: string[];
/**
* A map from parsers to file extension arrays.
*
* @see [import/parsers](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importparsers)
*/
'import/parsers'?: Partial<Record<Parser, string[]>>;
/**
* Settings for cache behavior.
*
* @see [import/cache](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importcache)
*/
'import/cache'?: { lifetime?: number } & Record<string, unknown>;
/**
* A regex for packages should be treated as internal.
*
* Useful when you are utilizing a monorepo setup or developing a set of packages that depend on each other.
*
* @see [import/internal-regex](https://github.com/benmosher/eslint-plugin-import/blob/master/README.md#importinternal-regex)
*/
'import/internal-regex'?: string;
}
/**
* JSDoc settings.
*/
interface JSDocSetting extends Partial<Record<string, unknown>> {
/**
* Disables all rules for the comment block on which a `@private` tag (or `@access private`) occurs.
*
* Defaults to `false`.
*
* Note: This has no effect with the rule `check-access` (whose purpose is to check access modifiers) or `empty-tags` (which checks `@private` itself).
*
* @see [mode](https://github.com/gajus/eslint-plugin-jsdoc#allow-tags-private-or-internal-to-disable-rules-for-that-comment-block)
*/
ignorePrivate?: boolean;
/**
* Disables all rules for the comment block on which a `@internal` tag occurs.
*
* Defaults to `false`.
*
* Note: This has no effect with the rule `empty-tags` (which checks `@internal` itself).
*
* @see [mode](https://github.com/gajus/eslint-plugin-jsdoc#allow-tags-private-or-internal-to-disable-rules-for-that-comment-block)
*/
ignoreInternal?: boolean;
/**
* Set to `typescript`, `closure`, or `jsdoc` (the default unless the `@typescript-eslint` parser is in use in which case `typescript` will be the default).
*
* @see [mode](https://github.com/gajus/eslint-plugin-jsdoc#mode)
*/
mode?: 'typescript' | 'closure' | 'jsdoc';
/**
* Configure a preferred alias name for a JSDoc tag.
*
* @see [Alias Preference](https://github.com/gajus/eslint-plugin-jsdoc#alias-preference)
*/
tagNamePreference?: Record<
string,
string | { message: string; replacement?: string } | false
>;
overrideReplacesDocs?: boolean;
augmentsExtendsReplacesDocs?: boolean;
implementsReplacesDocs?: boolean;
preferredTypes?: unknown;
}
/**
* JSDoc settings.
*/
interface JSDocSettings {
/**
* JSDoc settings.
*
* @see [JSDoc settings](https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-settings)
*/
jsdoc?: JSDocSetting;
}
/**
* JSX A11y settings.
*
* @see [JSX A11y settings](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
*/
interface JsxA11ySettings extends Partial<Record<string, unknown>> {
'jsx-a11y'?: {
components?: Record<string, string>;
};
}
/**
* MDX settings.
*/
type MdxSettings = ESLintMdxSettings;
/**
* Node settings.
*/
interface NodeSetting extends Partial<Record<string, unknown>> {
allowModules?: string[];
resolvePaths?: string[];
tryExtensions?: string[];
}
/**
* Node settings.
*/
interface NodeSettings {
/**
* Node settings.
*/
node?: NodeSetting;
}
/**
* React settings.
*
* @see [React settings](https://github.com/jsx-eslint/eslint-plugin-react)
*/
interface ReactSettings extends Partial<Record<string, unknown>> {
react?: {
/**
* Regex for Component Factory to use.
*
* @default 'createReactClass'
*/
createClass?: LiteralUnion<'createReactClass'>;
/**
* Pragma to use.
*
* @default 'React'
*/
pragma?: LiteralUnion<'React'>;
/**
* Fragment to use (may be a property of <pragma>).
*
* @default 'Fragment'
*/
fragment?: LiteralUnion<'Fragment'>;
/**
* React version. "detect" automatically picks the version you have installed.
*
* You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
*
* It will default to "latest" and warn if missing, and to "detect" in the future.
*
* @default 'latest'
*/
version?: LiteralUnion<'latest' | 'detect'>;
/**
* Flow version.
*/
flowVersion?: string;
};
/**
* The names of any function used to wrap propTypes, e.g. `forbidExtraProps`.
*
* If this isn't set, any propTypes wrapped in a function will be skipped.
*/
propWrapperFunctions?: Array<
| string
| {
property: string;
object?: string;
/**
* For rules that check exact prop wrappers.
*/
exact?: boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[k: string]: any;
}
>;
/**
* The name of any function used to wrap components, e.g. Mobx `observer` function.
*
* If this isn't set, components wrapped by these functions will be skipped.
*/
componentWrapperFunctions?: Array<
| string
| {
property: string;
object?: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[k: string]: any;
}
>;
/**
* Components used as alternatives to <form> for forms, eg. <Form endpoint={ url } />.
*/
formComponents?: Array<
| string
| {
name: string;
formAttribute: string;
}
>;
/**
* Components used as alternatives to <a> for linking, eg. <Link to={ url } />.
*/
linkComponents?: Array<
| string
| {
name: string;
linkAttribute: string;
}
>;
}
/**
* Settings.
*/
interface Settings
extends ImportSettings,
JSDocSettings,
JsxA11ySettings,
MdxSettings,
NodeSettings,
ReactSettings,
Partial<Record<string, unknown>> {}
/**
* OverrideConfigData.
*/
interface Override {
/**
* The glob patterns for target files.
*/
// https://github.com/eslint/eslint/blob/762a8727fb3b5619cff900826053b643ca5f1162/lib/shared/types.js#L61
files: string[] | string;
/**
* The glob patterns for excluded files.
*/
// https://github.com/eslint/eslint/blob/762a8727fb3b5619cff900826053b643ca5f1162/lib/shared/types.js#L59
excludedFiles?: string | string[];
/**
* An environment provides predefined global variables.
*
* @see [Environments](https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments)
*/
env?: Environments;
/**
* Extending Configuration Files.
*
* @see [Extends](https://eslint.org/docs/user-guide/configuring/configuration-files#extending-configuration-files)
*/
extends?: Extends;
/**
* Specifying Globals.
*
* @see [Globals](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-globals)
*/
globals?: Record<
string,
'readonly' | 'writable' | false | 'readable' | true | 'writeable' | 'off'
>;
/**
* Parser.
*
* @see [Working with Custom Parsers](https://eslint.org/docs/developer-guide/working-with-custom-parsers)
* @see [Specifying Parser](https://eslint.org/docs/user-guide/configuring/plugins#specifying-parser)
*/
parser?: Parser;
/**
* Parser Options.
*
* @see [Working with Custom Parsers](https://eslint.org/docs/developer-guide/working-with-custom-parsers)
* @see [Specifying Parser Options](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options)
*/
parserOptions?: ParserOptions;
/**
* Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
*
* @see [Configuring Plugins](https://eslint.org/docs/user-guide/configuring/plugins#configuring-plugins)
*/
plugins?: Plugin[];
/**
* Specifying Processor.
*
* @see [processor](https://eslint.org/docs/user-guide/configuring/plugins#specifying-processor)
*/
processor?: string;
/**
* Rules.
*
* @see [Rules](https://eslint.org/docs/user-guide/configuring/rules)
*/
rules?: Rules;
/**
* Settings.
*
* @see [Settings](https://eslint.org/docs/user-guide/configuring/configuration-files#adding-shared-settings)
*/
settings?: Settings;
}
/**
* Overrides.
*/
type Overrides = Override[];
/**
* ESLint Configuration.
*
* @see [ESLint Configuration](https://eslint.org/docs/latest/user-guide/configuring/)
*/
interface ESLintConfig<
Rules extends Record<string, RuleConfig> = BuiltinRules,
Strict extends boolean = false,
> {
/**
* @see [Using Configuration Files](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-configuration-files)
*/
root?: boolean;
/**
* Tell ESLint to ignore specific files and directories.
*
* @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code)
*/
ignorePatterns?: string[];
/**
* An environment provides predefined global variables.
*
* @see [Environments](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-environments)
*/
env?: Environments;
/**
* Extending Configuration Files.
*
* @see [Extends](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#extending-configuration-files)
*/
extends?: Extends;
/**
* Specifying Globals.
*
* @see [Globals](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-globals)
*/
globals?: Record<
string,
'readonly' | 'writable' | false | 'readable' | true | 'writeable' | 'off'
>;
/**
* Parser.
*
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/developer-guide/working-with-custom-parsers)
* @see [Specifying Parser](https://eslint.org/docs/latest/user-guide/configuring/plugins#configure-a-parser)
*/
parser?: Parser;
/**
* Parser Options.
*
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/developer-guide/working-with-custom-parsers)
* @see [Specifying Parser Options](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options)
*/
parserOptions?: ParserOptions;
/**
* Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
*
* @see [Configuring Plugins](https://eslint.org/docs/latest/user-guide/configuring/plugins#configure-plugins)
*/
plugins?: Plugin[];
/**
* Specifying Processor.
*
* @see [processor](https://eslint.org/docs/latest/user-guide/configuring/plugins#specify-a-processor)
*/
processor?: string;
/**
* Rules.
*
* @see [Rules](https://eslint.org/docs/latest/user-guide/configuring/rules)
*/
rules?: Strict extends true
? Partial<Rules>
: Partial<Rules & Record<string, RuleConfig>>;
/**
* Overrides.
*
* @see [How do overrides work](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#how-do-overrides-work)
*/
overrides?: Overrides;
/**
* Settings.
*
* @see [Settings](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#adding-shared-settings)
*/
settings?: Settings;
/**
* Disabling Inline Comments.
*
* @see [Disabling Inline Comments](https://eslint.org/docs/latest/user-guide/configuring/rules#disabling-inline-comments)
*/
noInlineConfig?: boolean;
/**
* Report unused `ESLint-disable` comments.
*
* @see [Report unused `ESLint-disable` comments](https://eslint.org/docs/latest/user-guide/configuring/rules#report-unused-eslint-disable-comments)
*/
reportUnusedDisableDirectives?: boolean;
}
type ParserModule =
| {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
parse(text: string, options?: any): any;
}
| {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
parseForESLint(text: string, options?: any): any;
};
/**
* An object containing settings related to how JavaScript is configured for linting
*/
interface LanguageOptions {
/**
* The version of ECMAScript to support. May be any year (i.e., `2022`) or version (i.e., `5`). Set to `"latest"` for the most recent supported version.
*
* @default "latest"
* @see [Configuring the JavaScript version](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-the-javascript-version)
*/
ecmaVersion?: EcmaVersion;
/**
* The type of JavaScript source code. Possible values are `"script"` for traditional script files, `"module"` for ECMAScript modules (ESM), and `"commonjs"` for CommonJS files.
*
* (default: `"module"` for .js and .mjs files; `"commonjs"` for .cjs files)
*
* @see [Configuring the JavaScript source type](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-the-javascript-source-type)
*/
sourceType?: SourceType | 'commonjs';
/**
* An object specifying additional objects that should be added to the global scope during linting.
*
* @see [Configuring global variables](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-global-variables)
*/
globals?: Record<
string,
'readonly' | 'writable' | false | 'readable' | true | 'writeable' | 'off'
>;
/**
* Either an object containing a `parse()` method or a string indicating the name of a parser inside of a plugin (i.e., `"pluginName/parserName"`).
*
* @default "@/espree"
*
* @see [Configuring a custom parser and its options](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-a-custom-parser-and-its-options)
*/
parser?: Parser | ParserModule;
/**
* An object specifying additional options that are passed directly to the `parser()` method on the parser. The available options are parser-dependent.
*
* @see [Configuring a custom parser and its options](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-a-custom-parser-and-its-options)
*/
parserOptions?: ParserOptions;
}
/**
* An object containing settings related to the linting process.
*/
interface LinterOptions {
/**
* A boolean value indicating if inline configuration is allowed.
*
* @see [Disabling inline configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#disabling-inline-configuration)
*/
noInlineConfig?: boolean;
/**
* A boolean value indicating if unused disable directives should be tracked and reported.
*
* @see [Reporting unused disable directives](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#reporting-unused-disable-directives)
*/
reportUnusedDisableDirectives?: boolean;
}
/**
* Flat ESLint Configuration.
*
* @see [Configuration Files (New)](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new)
*/
interface FlatESLintConfigItem<
Rules extends Record<string, RuleConfig> = BuiltinRules,
Strict extends boolean = false,
> {
/**
* An array of glob patterns indicating the files that the configuration object should apply to. If not specified, the configuration object applies to all files.
*
* @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#excluding-files-with-ignores)
*/
files?: string[];
/**
* An array of glob patterns indicating the files that the configuration object should not apply to. If not specified, the configuration object applies to all files matched by files.
*
* @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#excluding-files-with-ignores)
*/
ignores?: string[];
/**
* An object containing settings related to how JavaScript is configured for linting.
*
* @see [Configuring language options](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-language-options)
*/
languageOptions?: LanguageOptions;
/**
* An object containing settings related to the linting process.
*/
linterOptions?: LinterOptions;
/**
* Either an object containing `preprocess()` and `postprocess()` methods or a string indicating the name of a processor inside of a plugin (i.e., `"pluginName/processorName"`).
*
* @see [Using processors](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-processors)
*/
processor?: string | Linter.Processor;
/**
* An object containing a name-value mapping of plugin names to plugin objects. When `files` is specified, these plugins are only available to the matching files.
*
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
*/
plugins?: Record<string, ESLint.Plugin>;
/**
* An object containing the configured rules. When `files` or `ignores` are specified, these rule configurations are only available to the matching files.
*
* @see [Configuring rules](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-rules)
*/
rules?: Strict extends true
? Partial<Rules>
: Partial<Rules & Record<string, RuleConfig>>;
/**
* An object containing name-value pairs of information that should be available to all rules.
*
* @see [Configuring shared settings](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-shared-settings)
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
settings?: Record<string, any>;
}
/**
* Predefined configurations.
*
* @see [Using predefined configurations](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-predefined-configurations)
*
* @deprecated The predefined string configurations are deprecated and will be replaced by the @eslint/js package.
*/
type PredefinedConfig = 'eslint:recommended' | 'eslint:all';
type FlatESLintConfig = FlatESLintConfigItem | PredefinedConfig;
/**
* Define an ESLint config.
*
* @param config ESLint config.
* @returns ESLint config.
*/
declare function defineConfig<Rules extends Record<any, RuleConfig> = BuiltinRules, Strict extends boolean = false>(config: ESLintConfig<Rules, Strict>): ESLintConfig;
/**
* Define an item of Flat ESLint config.
*
* @see [Configuration Files (New)](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new)
*
* @param config an item of Flat ESLint config.
* @returns an item of Flat ESLint config.
*/
declare function defineFlatConfig<Rules extends Record<string, RuleConfig> = BuiltinRules, Strict extends boolean = false>(config: FlatESLintConfig): FlatESLintConfig;
/**
* Define a flat ESLint config.
*
* @see [Configuration Files (New)](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new)
*
* @param config Flat ESLint config.
* @returns Flat ESLint config.
*/
declare function defineFlatConfig(config: ReadonlyArray<FlatESLintConfig>): FlatESLintConfig[];
export { BuiltinRules, DebugLevel, DeprecationRules, ESLintConfig, EcmaFeatures, EcmaVersion, Environments, EslintCommentsRules, EslintRules, Extends, FlatESLintConfig, FlatESLintConfigItem, GraphQLRules, ImportRules, JSDocRules, JsoncRules, JsxA11yRules, KnownExtends, LanguageOptions, Lib, LinterOptions, MergeIntersection, NRules, NodeRules, Override, Overrides, Parser, ParserModule, ParserOptions, Plugin, PredefinedConfig, Prefix, Prepend, PromiseRules, ReactHooksRules, ReactRules, RenamePrefix, RuleConfig, RuleEntry, RuleLevel, RuleLevelAndOptions, RuleSeverity, Rules, Settings, Severity, SonarJSRules, SourceType, SpellcheckRules, TestingLibraryRules, TypeScriptRules, UnicornRules, Unprefix, VitestRules, VueI18nRules, VuePugRules, VueRules, YmlRules, defineConfig, defineFlatConfig };