Repository: antfu/eslint-typegen Branch: main Commit: b1b47bdc86ff Files: 26 Total size: 248.5 KB Directory structure: gitextract_bxds5anp/ ├── .github/ │ ├── FUNDING.yml │ └── workflows/ │ ├── ci.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .vscode/ │ └── settings.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── eslint.config.js ├── package.json ├── pnpm-workspace.yaml ├── src/ │ ├── core.ts │ └── index.ts ├── test/ │ ├── index.test.ts │ ├── input/ │ │ ├── invalid-json-schema-plugin.ts │ │ └── plugin-with-schema-ids.ts │ └── output/ │ ├── core-rules.d.ts │ ├── flat-config-vue.d.ts │ ├── invalid-json-schema-plugin.d.ts │ ├── jsx-a11y.d.ts │ ├── no-rule-meta.d.ts │ ├── plugin-with-schema-ids.d.ts │ └── plugins.d.ts ├── tsconfig.json └── tsdown.config.ts ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/FUNDING.yml ================================================ github: [antfu] ================================================ FILE: .github/workflows/ci.yml ================================================ name: CI on: push: branches: - main pull_request: branches: - main jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install pnpm uses: pnpm/action-setup@v2 - name: Set node uses: actions/setup-node@v3 with: node-version: lts/* - name: Setup run: npm i -g @antfu/ni - name: Install run: nci - name: Lint run: nr lint - name: Typecheck run: nr typecheck test: runs-on: ${{ matrix.os }} strategy: matrix: node: [lts/*] os: [ubuntu-latest, windows-latest, macos-latest] fail-fast: false steps: - uses: actions/checkout@v3 - name: Install pnpm uses: pnpm/action-setup@v2 - name: Set node ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - name: Setup run: npm i -g @antfu/ni - name: Install run: nci - name: Build run: nr build - name: Test run: nr test ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: push: tags: - 'v*' jobs: release: uses: sxzz/workflows/.github/workflows/release.yml@v1 with: publish: true permissions: contents: write id-token: write ================================================ FILE: .gitignore ================================================ .cache .DS_Store .idea *.log *.tgz coverage dist lib-cov logs node_modules temp eslint-typegen.d.ts ================================================ FILE: .npmrc ================================================ ignore-workspace-root-check=true shell-emulator=true ================================================ FILE: .vscode/settings.json ================================================ { // Enable the ESlint flat config support "eslint.experimental.useFlatConfig": true, // Disable the default formatter, use eslint instead "prettier.enable": false, "editor.formatOnSave": false, // Auto fix "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.organizeImports": "never" }, // Silent the stylistic rules in you IDE, but still auto fix them "eslint.rules.customizations": [ { "rule": "style/*", "severity": "off" }, { "rule": "*-indent", "severity": "off" }, { "rule": "*-spacing", "severity": "off" }, { "rule": "*-spaces", "severity": "off" }, { "rule": "*-order", "severity": "off" }, { "rule": "*-dangle", "severity": "off" }, { "rule": "*-newline", "severity": "off" }, { "rule": "*quotes", "severity": "off" }, { "rule": "*semi", "severity": "off" } ], // Enable eslint for all supported languages "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "html", "markdown", "json", "jsonc", "yaml" ] } ================================================ FILE: CONTRIBUTING.md ================================================ Please refer to https://github.com/antfu/contribute ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2022 Anthony Fu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # eslint-typegen [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![bundle][bundle-src]][bundle-href] [![JSDocs][jsdocs-src]][jsdocs-href] [![License][license-src]][license-href] Generate types from ESLint rule schemas automatically, with auto-completion and type-checking for rule options. ![](https://github.com/antfu/eslint-typegen/assets/11247099/642ffdc0-c662-4f3b-9237-16d776be1c3e) > Btw, if you are using [`@antfu/eslint-config`](https://github.com/antfu/eslint-config), you may NOT need to setup this, as the types for rules [are already shipped with the package](https://github.com/antfu/eslint-config/blob/95963ac345d27cd06a4eeb5ebc16e1848cb2fd81/scripts/typegen.ts#L29-L33). ## Usage ```bash npm i eslint-typegen ``` In your `eslint.config.mjs`, wrap the export with `typegen` function: ```ts // @ts-check /// import typegen from 'eslint-typegen' export default typegen( [ // ...your normal eslint flat config ] ) ``` Run ESLint once, an `eslint-typegen.d.ts` file will be generated to augment ESLint's `Linter.RulesRecord` types, to provide you with auto-completion and type-checking for your ESLint rules configuration based on the ESLint plugins you are using. > It will caluclate the hash of the plugins meta from your flat config, and only regenerate the types when they changes. If you want to force regenerate the types, you can delete the `eslint-typegen.d.ts` file and run ESLint again. ## Low-level API You can find low-level APIs in the `eslint-typegen/core` modules. ```ts import fs from 'node:fs/promises' import pluginTs from '@typescript-eslint/eslint-plugin' import pluginN from 'eslint-plugin-n' import { pluginsToRulesDTS } from 'eslint-typegen/core' const dts = await pluginsToRulesDTS({ '@typescript-eslint': pluginTs, 'n': pluginN, }) await fs.writeFile('eslint-typegen.d.ts', dts) ``` This can be useful if you want to have more control over the generation process, or even bundle the types with your config package. For example, [here](https://github.com/antfu/eslint-config/blob/95963ac345d27cd06a4eeb5ebc16e1848cb2fd81/scripts/typegen.ts#L29-L33) is how [`@antfu/eslint-config`](https://github.com/antfu/eslint-config) does. ## How it works Thanks to that [ESLint requires rules to provide the JSONSchema for options](https://eslint.org/docs/latest/extend/custom-rules#options-schemas), we could leverage that to generate types with [`json-schema-to-typescript`](https://github.com/bcherny/json-schema-to-typescript). With the new flat config allowing you to execute the code with fully resolved configs, we managed to sneak in the type generation process on the fly. ## Credits The initial idea comes from [@Shinigami92](https://github.com/Shinigami92) via his work on [`eslint-define-config`](https://github.com/eslint-types/eslint-define-config), thanks to him! ## Sponsors

## License [MIT](./LICENSE) License © 2023-PRESENT [Anthony Fu](https://github.com/antfu) [npm-version-src]: https://img.shields.io/npm/v/eslint-typegen?style=flat&colorA=080f12&colorB=1fa669 [npm-version-href]: https://npmjs.com/package/eslint-typegen [npm-downloads-src]: https://img.shields.io/npm/dm/eslint-typegen?style=flat&colorA=080f12&colorB=1fa669 [npm-downloads-href]: https://npmjs.com/package/eslint-typegen [bundle-src]: https://img.shields.io/bundlephobia/minzip/eslint-typegen?style=flat&colorA=080f12&colorB=1fa669&label=minzip [bundle-href]: https://bundlephobia.com/result?p=eslint-typegen [license-src]: https://img.shields.io/github/license/antfu/eslint-typegen.svg?style=flat&colorA=080f12&colorB=1fa669 [license-href]: https://github.com/antfu/eslint-typegen/blob/main/LICENSE [jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669 [jsdocs-href]: https://www.jsdocs.io/package/eslint-typegen ================================================ FILE: eslint.config.js ================================================ // @ts-check /// import antfu from '@antfu/eslint-config' // eslint-disable-next-line antfu/no-import-dist import typegen from './dist/index.mjs' export default typegen(await antfu({ vue: true, typescript: true, pnpm: true, }), ) ================================================ FILE: package.json ================================================ { "name": "eslint-typegen", "type": "module", "version": "2.3.1", "packageManager": "pnpm@10.30.0", "description": "Generate types from ESLint rule schemas automatically, with auto-completion and type-checking for rule options.", "author": "Anthony Fu ", "license": "MIT", "funding": "https://github.com/sponsors/antfu", "homepage": "https://github.com/antfu/eslint-typegen#readme", "repository": { "type": "git", "url": "git+https://github.com/antfu/eslint-typegen.git" }, "bugs": "https://github.com/antfu/eslint-typegen/issues", "keywords": [ "eslint" ], "sideEffects": false, "exports": { ".": "./dist/index.mjs", "./core": "./dist/core.mjs", "./package.json": "./package.json" }, "types": "./dist/index.d.mts", "files": [ "dist" ], "scripts": { "build": "tsdown", "dev": "tsdown --watch", "lint": "nr build && eslint .", "prepublishOnly": "nr build", "release": "bumpp", "start": "tsx src/index.ts", "test": "vitest", "typecheck": "tsc --noEmit", "prepare": "simple-git-hooks" }, "peerDependencies": { "eslint": "^9.0.0 || ^10.0.0" }, "dependencies": { "json-schema-to-typescript-lite": "catalog:prod", "ohash": "catalog:prod" }, "devDependencies": { "@antfu/eslint-config": "catalog:dev", "@antfu/ni": "catalog:dev", "@types/json-schema": "catalog:dev", "@types/node": "catalog:dev", "@typescript-eslint/eslint-plugin": "catalog:test", "bumpp": "catalog:dev", "eslint": "catalog:dev", "eslint-plugin-antfu": "catalog:test", "eslint-plugin-import-x": "catalog:test", "eslint-plugin-jsx-a11y": "catalog:test", "eslint-plugin-you-dont-need-lodash-underscore": "catalog:test", "lint-staged": "catalog:dev", "pnpm": "catalog:dev", "simple-git-hooks": "catalog:dev", "tsdown": "catalog:dev", "tsx": "catalog:dev", "typescript": "catalog:dev", "vite": "catalog:dev", "vitest": "catalog:test" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" }, "lint-staged": { "*": "eslint --fix" } } ================================================ FILE: pnpm-workspace.yaml ================================================ shellEmulator: true trustPolicy: no-downgrade packages: - playground - docs - packages/* - examples/* catalogs: dev: '@antfu/eslint-config': ^7.4.3 '@antfu/ni': ^28.2.0 '@types/json-schema': ^7.0.15 '@types/node': ^25.2.3 bumpp: ^10.4.1 eslint: ^10.0.0 lint-staged: ^16.2.7 pnpm: ^10.30.0 simple-git-hooks: ^2.13.1 tsdown: ^0.20.3 tsx: ^4.21.0 typescript: ^5.9.3 vite: ^7.3.1 prod: json-schema-to-typescript-lite: ^15.0.0 ohash: ^2.0.11 test: '@typescript-eslint/eslint-plugin': ^8.56.0 eslint-plugin-antfu: ^3.2.2 eslint-plugin-import-x: ^4.16.1 eslint-plugin-jsx-a11y: ^6.10.2 eslint-plugin-you-dont-need-lodash-underscore: ^6.14.0 vitest: ^4.0.18 onlyBuiltDependencies: - esbuild - simple-git-hooks - unrs-resolver ================================================ FILE: src/core.ts ================================================ import type { ESLint, Linter, Rule } from 'eslint' import type { JSONSchema4 } from 'json-schema' import type { Options as CompileOptions } from 'json-schema-to-typescript-lite' import { compile as compileSchema, normalizeIdentifier } from 'json-schema-to-typescript-lite' export interface RulesTypeGenOptions { /** * Insert type imports for the generated types. * * @default true */ includeTypeImports?: boolean /** * Include comments to disable ESLint and Prettier. * * @default true */ includeIgnoreComments?: boolean /** * Augment the interface to ESLint's `Linter.RulesRecord`. * * @default true */ includeAugmentation?: boolean /** * Augment the `DefaultConfigNamesMap` interface for `eslint-flat-config-utils` * For auto-completion of config names etc. * * @see https://github.com/antfu/eslint-flat-config-utils * @default false */ augmentFlatConfigUtils?: boolean /** * The name of the exported type. * * @default 'RuleOptions' */ exportTypeName?: string /** * Options for json-schema-to-typescript */ compileOptions?: Partial } export interface FlatConfigsToPluginsOptions { filterConfig?: (config: Linter.Config) => boolean filterPlugin?: (name: string, plugin: ESLint.Plugin) => boolean } export interface FlatConfigsToRulesOptions extends RulesTypeGenOptions, FlatConfigsToPluginsOptions { } export async function flatConfigsToPlugins( configs: Linter.Config[], options: FlatConfigsToPluginsOptions = {}, ): Promise> { const plugins: Record = {} for (const config of configs) { if (!config.plugins) continue if (options.filterConfig?.(config) === false) continue for (const [name, plugin] of Object.entries(config.plugins)) { if (options.filterPlugin?.(name, plugin) === false) continue plugins[name] = plugin } } return plugins } /** * Generate types for rules from an array of ESLint configurations. */ export async function flatConfigsToRulesDTS( configs: Linter.Config[], options: FlatConfigsToRulesOptions = {}, ) { return pluginsToRulesDTS( await flatConfigsToPlugins(configs, options), options, ) } /** * Generate types for rule from an object of ESLint plugins. */ export async function pluginsToRulesDTS( plugins: Record, options: RulesTypeGenOptions & { configNames?: string[] } = {}, ) { const { includeTypeImports = true, includeIgnoreComments = true, includeAugmentation = true, augmentFlatConfigUtils = false, exportTypeName = 'RuleOptions', compileOptions = {}, configNames = [], } = options const rules: [name: string, rule: Rule.RuleModule][] = [] for (const [pluginName, plugin] of Object.entries(plugins)) { for (const [ruleName, rule] of Object.entries(plugin.rules || {})) { if (rule?.meta == null || typeof rule.meta === 'object') { rules.push([ pluginName ? `${pluginName}/${ruleName}` : ruleName, rule, ]) } } } rules.sort(([a], [b]) => a.localeCompare(b)) const resolved = await Promise.all(rules .map(([name, rule]) => compileRule(name, rule, compileOptions))) const exports = [ ...(includeIgnoreComments ? [ '/* eslint-disable */', '/* prettier-ignore */', ] : []), ...(includeTypeImports ? [ 'import type { Linter } from \'eslint\'', ] : []), ...(includeAugmentation ? [ '', `declare module 'eslint' {`, ` namespace Linter {`, ` interface RulesRecord extends ${exportTypeName} {}`, ` }`, `}`, ] : []), ...(augmentFlatConfigUtils && configNames.length ? [ '', '// @ts-ignore - In case the package is not installed', `declare module 'eslint-flat-config-utils' {`, ` interface DefaultConfigNamesMap {`, ...configNames.map(name => ` '${name}'?: true,`), ` }`, `}`, ] : []), '', `export interface ${exportTypeName} {`, ...resolved.flatMap(({ typeName, name, jsdoc }) => [ jsdoc?.length ? ` /**\n${jsdoc.map(i => ` * ${i}`).join('\n').replaceAll(/\*\//g, '*\\/')}\n */` : undefined, ` '${name}'?: Linter.RuleEntry<${typeName}>`, ]).filter(Boolean), `}`, ] const typeDeclarations = resolved.flatMap(({ typeDeclarations }) => typeDeclarations).join('\n') return [ ...exports, '', '/* ======= Declarations ======= */', typeDeclarations, ].join('\n') } export async function compileRule( ruleName: string, rule: Rule.RuleModule, compileOptions: Partial = {}, ) { const meta = rule.meta ?? {} let schemas = meta.schema as JSONSchema4[] ?? [] if (!Array.isArray(schemas)) schemas = [schemas] const id = normalizeIdentifier(ruleName) const jsdoc: string[] = [] if (meta.docs?.description) jsdoc.push(meta.docs.description) if (meta.docs?.url) jsdoc.push(`@see ${meta.docs.url}`) if (meta.deprecated) jsdoc.push('@deprecated') if (!meta.schema || !schemas.length) { return { jsdoc, name: ruleName, typeName: '[]', typeDeclarations: [], } } let lines: string[] = [] const schema: JSONSchema4 = Array.isArray(meta.schema) ? { type: 'array', items: meta.schema, definitions: meta.schema?.[0]?.definitions } : meta.schema let overriddenRootSchemaId: string | undefined let isRootSchema = true try { const compiled = await compileSchema(schema, id, { unreachableDefinitions: false, strictIndexSignatures: true, customName(schema, keyName) { const canOverrideRootSchemaId = isRootSchema isRootSchema = false const resolved = schema.title || schema.$id || keyName if (resolved === id) return id if (!resolved) return undefined! const normalizedName = `_${normalizeIdentifier(`${id}_${resolved}`)}` if (canOverrideRootSchemaId) overriddenRootSchemaId = normalizedName return normalizedName }, ...compileOptions, }) lines.push( compiled .replace(/\/\*[\s\S]*?\*\//g, ''), ) } catch (error) { console.warn(`Failed to compile schema ${ruleName} for rule ${ruleName}. Falling back to unknown.`) console.error(error) lines.push(`export type ${id} = unknown\n`) } lines = lines .join('\n') .split('\n') .map(line => line.replace(/^(export )/, '')) .filter(Boolean) lines.unshift(`// ----- ${ruleName} -----`) return { name: ruleName, jsdoc, typeName: overriddenRootSchemaId ?? id, typeDeclarations: lines, } } ================================================ FILE: src/index.ts ================================================ import type { Linter } from 'eslint' import type { FlatConfigsToRulesOptions } from './core' import { existsSync } from 'node:fs' import fs from 'node:fs/promises' import { hash as makeHash } from 'ohash' import { version } from '../package.json' import { flatConfigsToPlugins, pluginsToRulesDTS } from './core' export interface TypeGenOptions extends FlatConfigsToRulesOptions { /** * Include core rules in the generated types. * * @default true */ includeCoreRules?: boolean /** * Path to the generated types file. */ dtsPath?: string } /** * Wrap with resolved flat configs to generates types for rules. */ export default async function typegen( configs: Promise | Linter.Config[], options: TypeGenOptions = {}, ): Promise { const { includeCoreRules = true, dtsPath = 'eslint-typegen.d.ts', } = options const resolved = await configs let configsInput = resolved if (includeCoreRules) { const { builtinRules } = await import('eslint/use-at-your-own-risk') configsInput = [ { plugins: { '': { rules: Object.fromEntries(builtinRules.entries()) }, }, }, ...configsInput, ] } const plugins = await flatConfigsToPlugins(configsInput, options) const configNames = configsInput.flatMap(c => c.name).filter(Boolean) as string[] const hashSource = [ // version of eslint-typegen version, // plugins name and version ...Object.entries(plugins) .map(([n, p]) => [p.meta?.name, p.meta?.version].filter(Boolean).join('@') || p.name || n) .sort(), // config names ...configNames, ].join(' ') const hash = makeHash(hashSource) const previousHash = existsSync(dtsPath) ? (await fs.readFile(dtsPath, 'utf-8')).match(/\/\* eslint-typegen-hash: (\S*) \*\//)?.[1]?.trim() : undefined if (previousHash !== hash) { const dts = [ '/* This file is generated by eslint-typegen, for augmenting rules types in ESLint */', '/* You might want to include this file in tsconfig.json but excluded from git */', `/* eslint-typegen-hash: ${hash} */`, '', await pluginsToRulesDTS(plugins, { ...options, configNames, }), ].join('\n') fs.writeFile(dtsPath, dts, 'utf-8') } return resolved } ================================================ FILE: test/index.test.ts ================================================ import { vue } from '@antfu/eslint-config' import { expect, it } from 'vitest' import { flatConfigsToRulesDTS, pluginsToRulesDTS } from '../src/core' import { invalidJsonSchemaPlugin } from './input/invalid-json-schema-plugin' import { pluginWithSchemaIds } from './input/plugin-with-schema-ids' it('pluginsToRuleOptions', async () => { await expect(await pluginsToRulesDTS({ // @ts-expect-error missing types import: await import('eslint-plugin-import-x').then(m => m.default), antfu: await import('eslint-plugin-antfu').then(m => m.default), })) .toMatchFileSnapshot('./output/plugins.d.ts') }) it('pluginsToRuleOptions ts expect no warnings', async () => { await pluginsToRulesDTS({ // @ts-expect-error missing types ts: await import('@typescript-eslint/eslint-plugin').then(m => m.default), }) }) it('core rules', async () => { const { builtinRules } = await import('eslint/use-at-your-own-risk') await expect(await pluginsToRulesDTS({ '': { rules: Object.fromEntries(builtinRules.entries()) }, })) .toMatchFileSnapshot('./output/core-rules.d.ts') }) it('invalid JSON schema plugin', async () => { await expect(await pluginsToRulesDTS({ 'invalid-json-schema-plugin': invalidJsonSchemaPlugin, })) .toMatchFileSnapshot('./output/invalid-json-schema-plugin.d.ts') }) it('json schema with ids', async () => { await expect(await pluginsToRulesDTS({ plugin: pluginWithSchemaIds, })) .toMatchFileSnapshot('./output/plugin-with-schema-ids.d.ts') }) it('flatConfigsToRuleOptions', async () => { await expect(await flatConfigsToRulesDTS(await vue() as any)) .toMatchFileSnapshot('./output/flat-config-vue.d.ts') }) it('jsx-a11y', async () => { await expect(await pluginsToRulesDTS({ // @ts-expect-error missing types 'jsx-a11y': await import('eslint-plugin-jsx-a11y').then(m => m.default), })) .toMatchFileSnapshot('./output/jsx-a11y.d.ts') }) it('no rule `meta`', async () => { await expect(await pluginsToRulesDTS({ // @ts-expect-error missing types 'you-dont-need-lodash-underscore': await import('eslint-plugin-you-dont-need-lodash-underscore').then(m => m.default), })) .toMatchFileSnapshot('./output/no-rule-meta.d.ts') }) ================================================ FILE: test/input/invalid-json-schema-plugin.ts ================================================ import type { ESLint, Rule } from 'eslint' export const invalidJsonSchemaPlugin: ESLint.Plugin = { rules: { 'invalid-json-schema-rule': { create: () => null as unknown as Rule.RuleListener, meta: { docs: { description: 'This rules points to a non-existing schema', }, schema: { allOf: [ { $ref: '#/definitions/some-definition-that-does-not-exist', }, ], type: 'object', }, }, }, }, } ================================================ FILE: test/input/plugin-with-schema-ids.ts ================================================ import type { ESLint, Rule } from 'eslint' export const pluginWithSchemaIds: ESLint.Plugin = { rules: { 'schema-with-id-at-root': { create: () => null as unknown as Rule.RuleListener, meta: { schema: { id: 'schemaId', type: 'object', additionalProperties: false, properties: { a: { id: 'aId', type: 'string', }, b: { id: 'bId', additionalProperties: false, type: 'object', properties: { b1: { type: 'string', }, }, }, c: { additionalProperties: false, type: 'object', properties: { c1: { type: 'string', id: 'c1Id', }, }, }, d: { additionalProperties: false, type: 'object', properties: { da: { type: 'string', }, }, }, }, }, }, }, }, } ================================================ FILE: test/output/core-rules.d.ts ================================================ /* eslint-disable */ /* prettier-ignore */ import type { Linter } from 'eslint' declare module 'eslint' { namespace Linter { interface RulesRecord extends RuleOptions {} } } export interface RuleOptions { /** * Enforce getter and setter pairs in objects and classes * @see https://eslint.org/docs/latest/rules/accessor-pairs */ 'accessor-pairs'?: Linter.RuleEntry /** * Enforce linebreaks after opening and before closing array brackets * @see https://eslint.org/docs/latest/rules/array-bracket-newline * @deprecated */ 'array-bracket-newline'?: Linter.RuleEntry /** * Enforce consistent spacing inside array brackets * @see https://eslint.org/docs/latest/rules/array-bracket-spacing * @deprecated */ 'array-bracket-spacing'?: Linter.RuleEntry /** * Enforce `return` statements in callbacks of array methods * @see https://eslint.org/docs/latest/rules/array-callback-return */ 'array-callback-return'?: Linter.RuleEntry /** * Enforce line breaks after each array element * @see https://eslint.org/docs/latest/rules/array-element-newline * @deprecated */ 'array-element-newline'?: Linter.RuleEntry /** * Require braces around arrow function bodies * @see https://eslint.org/docs/latest/rules/arrow-body-style */ 'arrow-body-style'?: Linter.RuleEntry /** * Require parentheses around arrow function arguments * @see https://eslint.org/docs/latest/rules/arrow-parens * @deprecated */ 'arrow-parens'?: Linter.RuleEntry /** * Enforce consistent spacing before and after the arrow in arrow functions * @see https://eslint.org/docs/latest/rules/arrow-spacing * @deprecated */ 'arrow-spacing'?: Linter.RuleEntry /** * Enforce the use of variables within the scope they are defined * @see https://eslint.org/docs/latest/rules/block-scoped-var */ 'block-scoped-var'?: Linter.RuleEntry<[]> /** * Disallow or enforce spaces inside of blocks after opening block and before closing block * @see https://eslint.org/docs/latest/rules/block-spacing * @deprecated */ 'block-spacing'?: Linter.RuleEntry /** * Enforce consistent brace style for blocks * @see https://eslint.org/docs/latest/rules/brace-style * @deprecated */ 'brace-style'?: Linter.RuleEntry /** * Require `return` statements after callbacks * @see https://eslint.org/docs/latest/rules/callback-return * @deprecated */ 'callback-return'?: Linter.RuleEntry /** * Enforce camelcase naming convention * @see https://eslint.org/docs/latest/rules/camelcase */ 'camelcase'?: Linter.RuleEntry /** * Enforce or disallow capitalization of the first letter of a comment * @see https://eslint.org/docs/latest/rules/capitalized-comments */ 'capitalized-comments'?: Linter.RuleEntry /** * Enforce that class methods utilize `this` * @see https://eslint.org/docs/latest/rules/class-methods-use-this */ 'class-methods-use-this'?: Linter.RuleEntry /** * Require or disallow trailing commas * @see https://eslint.org/docs/latest/rules/comma-dangle * @deprecated */ 'comma-dangle'?: Linter.RuleEntry /** * Enforce consistent spacing before and after commas * @see https://eslint.org/docs/latest/rules/comma-spacing * @deprecated */ 'comma-spacing'?: Linter.RuleEntry /** * Enforce consistent comma style * @see https://eslint.org/docs/latest/rules/comma-style * @deprecated */ 'comma-style'?: Linter.RuleEntry /** * Enforce a maximum cyclomatic complexity allowed in a program * @see https://eslint.org/docs/latest/rules/complexity */ 'complexity'?: Linter.RuleEntry /** * Enforce consistent spacing inside computed property brackets * @see https://eslint.org/docs/latest/rules/computed-property-spacing * @deprecated */ 'computed-property-spacing'?: Linter.RuleEntry /** * Require `return` statements to either always or never specify values * @see https://eslint.org/docs/latest/rules/consistent-return */ 'consistent-return'?: Linter.RuleEntry /** * Enforce consistent naming when capturing the current execution context * @see https://eslint.org/docs/latest/rules/consistent-this */ 'consistent-this'?: Linter.RuleEntry /** * Require `super()` calls in constructors * @see https://eslint.org/docs/latest/rules/constructor-super */ 'constructor-super'?: Linter.RuleEntry<[]> /** * Enforce consistent brace style for all control statements * @see https://eslint.org/docs/latest/rules/curly */ 'curly'?: Linter.RuleEntry /** * Require `default` cases in `switch` statements * @see https://eslint.org/docs/latest/rules/default-case */ 'default-case'?: Linter.RuleEntry /** * Enforce `default` clauses in `switch` statements to be last * @see https://eslint.org/docs/latest/rules/default-case-last */ 'default-case-last'?: Linter.RuleEntry<[]> /** * Enforce default parameters to be last * @see https://eslint.org/docs/latest/rules/default-param-last */ 'default-param-last'?: Linter.RuleEntry<[]> /** * Enforce consistent newlines before and after dots * @see https://eslint.org/docs/latest/rules/dot-location * @deprecated */ 'dot-location'?: Linter.RuleEntry /** * Enforce dot notation whenever possible * @see https://eslint.org/docs/latest/rules/dot-notation */ 'dot-notation'?: Linter.RuleEntry /** * Require or disallow newline at the end of files * @see https://eslint.org/docs/latest/rules/eol-last * @deprecated */ 'eol-last'?: Linter.RuleEntry /** * Require the use of `===` and `!==` * @see https://eslint.org/docs/latest/rules/eqeqeq */ 'eqeqeq'?: Linter.RuleEntry /** * Enforce `for` loop update clause moving the counter in the right direction * @see https://eslint.org/docs/latest/rules/for-direction */ 'for-direction'?: Linter.RuleEntry<[]> /** * Require or disallow spacing between function identifiers and their invocations * @see https://eslint.org/docs/latest/rules/func-call-spacing * @deprecated */ 'func-call-spacing'?: Linter.RuleEntry /** * Require function names to match the name of the variable or property to which they are assigned * @see https://eslint.org/docs/latest/rules/func-name-matching */ 'func-name-matching'?: Linter.RuleEntry /** * Require or disallow named `function` expressions * @see https://eslint.org/docs/latest/rules/func-names */ 'func-names'?: Linter.RuleEntry /** * Enforce the consistent use of either `function` declarations or expressions assigned to variables * @see https://eslint.org/docs/latest/rules/func-style */ 'func-style'?: Linter.RuleEntry /** * Enforce line breaks between arguments of a function call * @see https://eslint.org/docs/latest/rules/function-call-argument-newline * @deprecated */ 'function-call-argument-newline'?: Linter.RuleEntry /** * Enforce consistent line breaks inside function parentheses * @see https://eslint.org/docs/latest/rules/function-paren-newline * @deprecated */ 'function-paren-newline'?: Linter.RuleEntry /** * Enforce consistent spacing around `*` operators in generator functions * @see https://eslint.org/docs/latest/rules/generator-star-spacing * @deprecated */ 'generator-star-spacing'?: Linter.RuleEntry /** * Enforce `return` statements in getters * @see https://eslint.org/docs/latest/rules/getter-return */ 'getter-return'?: Linter.RuleEntry /** * Require `require()` calls to be placed at top-level module scope * @see https://eslint.org/docs/latest/rules/global-require * @deprecated */ 'global-require'?: Linter.RuleEntry<[]> /** * Require grouped accessor pairs in object literals and classes * @see https://eslint.org/docs/latest/rules/grouped-accessor-pairs */ 'grouped-accessor-pairs'?: Linter.RuleEntry /** * Require `for-in` loops to include an `if` statement * @see https://eslint.org/docs/latest/rules/guard-for-in */ 'guard-for-in'?: Linter.RuleEntry<[]> /** * Require error handling in callbacks * @see https://eslint.org/docs/latest/rules/handle-callback-err * @deprecated */ 'handle-callback-err'?: Linter.RuleEntry /** * Disallow specified identifiers * @see https://eslint.org/docs/latest/rules/id-blacklist * @deprecated */ 'id-blacklist'?: Linter.RuleEntry /** * Disallow specified identifiers * @see https://eslint.org/docs/latest/rules/id-denylist */ 'id-denylist'?: Linter.RuleEntry /** * Enforce minimum and maximum identifier lengths * @see https://eslint.org/docs/latest/rules/id-length */ 'id-length'?: Linter.RuleEntry /** * Require identifiers to match a specified regular expression * @see https://eslint.org/docs/latest/rules/id-match */ 'id-match'?: Linter.RuleEntry /** * Enforce the location of arrow function bodies * @see https://eslint.org/docs/latest/rules/implicit-arrow-linebreak * @deprecated */ 'implicit-arrow-linebreak'?: Linter.RuleEntry /** * Enforce consistent indentation * @see https://eslint.org/docs/latest/rules/indent * @deprecated */ 'indent'?: Linter.RuleEntry /** * Enforce consistent indentation * @see https://eslint.org/docs/latest/rules/indent-legacy * @deprecated */ 'indent-legacy'?: Linter.RuleEntry /** * Require or disallow initialization in variable declarations * @see https://eslint.org/docs/latest/rules/init-declarations */ 'init-declarations'?: Linter.RuleEntry /** * Enforce the consistent use of either double or single quotes in JSX attributes * @see https://eslint.org/docs/latest/rules/jsx-quotes * @deprecated */ 'jsx-quotes'?: Linter.RuleEntry /** * Enforce consistent spacing between keys and values in object literal properties * @see https://eslint.org/docs/latest/rules/key-spacing * @deprecated */ 'key-spacing'?: Linter.RuleEntry /** * Enforce consistent spacing before and after keywords * @see https://eslint.org/docs/latest/rules/keyword-spacing * @deprecated */ 'keyword-spacing'?: Linter.RuleEntry /** * Enforce position of line comments * @see https://eslint.org/docs/latest/rules/line-comment-position * @deprecated */ 'line-comment-position'?: Linter.RuleEntry /** * Enforce consistent linebreak style * @see https://eslint.org/docs/latest/rules/linebreak-style * @deprecated */ 'linebreak-style'?: Linter.RuleEntry /** * Require empty lines around comments * @see https://eslint.org/docs/latest/rules/lines-around-comment * @deprecated */ 'lines-around-comment'?: Linter.RuleEntry /** * Require or disallow newlines around directives * @see https://eslint.org/docs/latest/rules/lines-around-directive * @deprecated */ 'lines-around-directive'?: Linter.RuleEntry /** * Require or disallow an empty line between class members * @see https://eslint.org/docs/latest/rules/lines-between-class-members * @deprecated */ 'lines-between-class-members'?: Linter.RuleEntry /** * Require or disallow logical assignment operator shorthand * @see https://eslint.org/docs/latest/rules/logical-assignment-operators */ 'logical-assignment-operators'?: Linter.RuleEntry /** * Enforce a maximum number of classes per file * @see https://eslint.org/docs/latest/rules/max-classes-per-file */ 'max-classes-per-file'?: Linter.RuleEntry /** * Enforce a maximum depth that blocks can be nested * @see https://eslint.org/docs/latest/rules/max-depth */ 'max-depth'?: Linter.RuleEntry /** * Enforce a maximum line length * @see https://eslint.org/docs/latest/rules/max-len * @deprecated */ 'max-len'?: Linter.RuleEntry /** * Enforce a maximum number of lines per file * @see https://eslint.org/docs/latest/rules/max-lines */ 'max-lines'?: Linter.RuleEntry /** * Enforce a maximum number of lines of code in a function * @see https://eslint.org/docs/latest/rules/max-lines-per-function */ 'max-lines-per-function'?: Linter.RuleEntry /** * Enforce a maximum depth that callbacks can be nested * @see https://eslint.org/docs/latest/rules/max-nested-callbacks */ 'max-nested-callbacks'?: Linter.RuleEntry /** * Enforce a maximum number of parameters in function definitions * @see https://eslint.org/docs/latest/rules/max-params */ 'max-params'?: Linter.RuleEntry /** * Enforce a maximum number of statements allowed in function blocks * @see https://eslint.org/docs/latest/rules/max-statements */ 'max-statements'?: Linter.RuleEntry /** * Enforce a maximum number of statements allowed per line * @see https://eslint.org/docs/latest/rules/max-statements-per-line * @deprecated */ 'max-statements-per-line'?: Linter.RuleEntry /** * Enforce a particular style for multiline comments * @see https://eslint.org/docs/latest/rules/multiline-comment-style * @deprecated */ 'multiline-comment-style'?: Linter.RuleEntry /** * Enforce newlines between operands of ternary expressions * @see https://eslint.org/docs/latest/rules/multiline-ternary * @deprecated */ 'multiline-ternary'?: Linter.RuleEntry /** * Require constructor names to begin with a capital letter * @see https://eslint.org/docs/latest/rules/new-cap */ 'new-cap'?: Linter.RuleEntry /** * Enforce or disallow parentheses when invoking a constructor with no arguments * @see https://eslint.org/docs/latest/rules/new-parens * @deprecated */ 'new-parens'?: Linter.RuleEntry /** * Require or disallow an empty line after variable declarations * @see https://eslint.org/docs/latest/rules/newline-after-var * @deprecated */ 'newline-after-var'?: Linter.RuleEntry /** * Require an empty line before `return` statements * @see https://eslint.org/docs/latest/rules/newline-before-return * @deprecated */ 'newline-before-return'?: Linter.RuleEntry<[]> /** * Require a newline after each call in a method chain * @see https://eslint.org/docs/latest/rules/newline-per-chained-call * @deprecated */ 'newline-per-chained-call'?: Linter.RuleEntry /** * Disallow the use of `alert`, `confirm`, and `prompt` * @see https://eslint.org/docs/latest/rules/no-alert */ 'no-alert'?: Linter.RuleEntry<[]> /** * Disallow `Array` constructors * @see https://eslint.org/docs/latest/rules/no-array-constructor */ 'no-array-constructor'?: Linter.RuleEntry<[]> /** * Disallow using an async function as a Promise executor * @see https://eslint.org/docs/latest/rules/no-async-promise-executor */ 'no-async-promise-executor'?: Linter.RuleEntry<[]> /** * Disallow `await` inside of loops * @see https://eslint.org/docs/latest/rules/no-await-in-loop */ 'no-await-in-loop'?: Linter.RuleEntry<[]> /** * Disallow bitwise operators * @see https://eslint.org/docs/latest/rules/no-bitwise */ 'no-bitwise'?: Linter.RuleEntry /** * Disallow use of the `Buffer()` constructor * @see https://eslint.org/docs/latest/rules/no-buffer-constructor * @deprecated */ 'no-buffer-constructor'?: Linter.RuleEntry<[]> /** * Disallow the use of `arguments.caller` or `arguments.callee` * @see https://eslint.org/docs/latest/rules/no-caller */ 'no-caller'?: Linter.RuleEntry<[]> /** * Disallow lexical declarations in case clauses * @see https://eslint.org/docs/latest/rules/no-case-declarations */ 'no-case-declarations'?: Linter.RuleEntry<[]> /** * Disallow `catch` clause parameters from shadowing variables in the outer scope * @see https://eslint.org/docs/latest/rules/no-catch-shadow * @deprecated */ 'no-catch-shadow'?: Linter.RuleEntry<[]> /** * Disallow reassigning class members * @see https://eslint.org/docs/latest/rules/no-class-assign */ 'no-class-assign'?: Linter.RuleEntry<[]> /** * Disallow comparing against `-0` * @see https://eslint.org/docs/latest/rules/no-compare-neg-zero */ 'no-compare-neg-zero'?: Linter.RuleEntry<[]> /** * Disallow assignment operators in conditional expressions * @see https://eslint.org/docs/latest/rules/no-cond-assign */ 'no-cond-assign'?: Linter.RuleEntry /** * Disallow arrow functions where they could be confused with comparisons * @see https://eslint.org/docs/latest/rules/no-confusing-arrow * @deprecated */ 'no-confusing-arrow'?: Linter.RuleEntry /** * Disallow the use of `console` * @see https://eslint.org/docs/latest/rules/no-console */ 'no-console'?: Linter.RuleEntry /** * Disallow reassigning `const`, `using`, and `await using` variables * @see https://eslint.org/docs/latest/rules/no-const-assign */ 'no-const-assign'?: Linter.RuleEntry<[]> /** * Disallow expressions where the operation doesn't affect the value * @see https://eslint.org/docs/latest/rules/no-constant-binary-expression */ 'no-constant-binary-expression'?: Linter.RuleEntry<[]> /** * Disallow constant expressions in conditions * @see https://eslint.org/docs/latest/rules/no-constant-condition */ 'no-constant-condition'?: Linter.RuleEntry /** * Disallow returning value from constructor * @see https://eslint.org/docs/latest/rules/no-constructor-return */ 'no-constructor-return'?: Linter.RuleEntry<[]> /** * Disallow `continue` statements * @see https://eslint.org/docs/latest/rules/no-continue */ 'no-continue'?: Linter.RuleEntry<[]> /** * Disallow control characters in regular expressions * @see https://eslint.org/docs/latest/rules/no-control-regex */ 'no-control-regex'?: Linter.RuleEntry<[]> /** * Disallow the use of `debugger` * @see https://eslint.org/docs/latest/rules/no-debugger */ 'no-debugger'?: Linter.RuleEntry<[]> /** * Disallow deleting variables * @see https://eslint.org/docs/latest/rules/no-delete-var */ 'no-delete-var'?: Linter.RuleEntry<[]> /** * Disallow equal signs explicitly at the beginning of regular expressions * @see https://eslint.org/docs/latest/rules/no-div-regex */ 'no-div-regex'?: Linter.RuleEntry<[]> /** * Disallow duplicate arguments in `function` definitions * @see https://eslint.org/docs/latest/rules/no-dupe-args */ 'no-dupe-args'?: Linter.RuleEntry<[]> /** * Disallow duplicate class members * @see https://eslint.org/docs/latest/rules/no-dupe-class-members */ 'no-dupe-class-members'?: Linter.RuleEntry<[]> /** * Disallow duplicate conditions in if-else-if chains * @see https://eslint.org/docs/latest/rules/no-dupe-else-if */ 'no-dupe-else-if'?: Linter.RuleEntry<[]> /** * Disallow duplicate keys in object literals * @see https://eslint.org/docs/latest/rules/no-dupe-keys */ 'no-dupe-keys'?: Linter.RuleEntry<[]> /** * Disallow duplicate case labels * @see https://eslint.org/docs/latest/rules/no-duplicate-case */ 'no-duplicate-case'?: Linter.RuleEntry<[]> /** * Disallow duplicate module imports * @see https://eslint.org/docs/latest/rules/no-duplicate-imports */ 'no-duplicate-imports'?: Linter.RuleEntry /** * Disallow `else` blocks after `return` statements in `if` statements * @see https://eslint.org/docs/latest/rules/no-else-return */ 'no-else-return'?: Linter.RuleEntry /** * Disallow empty block statements * @see https://eslint.org/docs/latest/rules/no-empty */ 'no-empty'?: Linter.RuleEntry /** * Disallow empty character classes in regular expressions * @see https://eslint.org/docs/latest/rules/no-empty-character-class */ 'no-empty-character-class'?: Linter.RuleEntry<[]> /** * Disallow empty functions * @see https://eslint.org/docs/latest/rules/no-empty-function */ 'no-empty-function'?: Linter.RuleEntry /** * Disallow empty destructuring patterns * @see https://eslint.org/docs/latest/rules/no-empty-pattern */ 'no-empty-pattern'?: Linter.RuleEntry /** * Disallow empty static blocks * @see https://eslint.org/docs/latest/rules/no-empty-static-block */ 'no-empty-static-block'?: Linter.RuleEntry<[]> /** * Disallow `null` comparisons without type-checking operators * @see https://eslint.org/docs/latest/rules/no-eq-null */ 'no-eq-null'?: Linter.RuleEntry<[]> /** * Disallow the use of `eval()` * @see https://eslint.org/docs/latest/rules/no-eval */ 'no-eval'?: Linter.RuleEntry /** * Disallow reassigning exceptions in `catch` clauses * @see https://eslint.org/docs/latest/rules/no-ex-assign */ 'no-ex-assign'?: Linter.RuleEntry<[]> /** * Disallow extending native types * @see https://eslint.org/docs/latest/rules/no-extend-native */ 'no-extend-native'?: Linter.RuleEntry /** * Disallow unnecessary calls to `.bind()` * @see https://eslint.org/docs/latest/rules/no-extra-bind */ 'no-extra-bind'?: Linter.RuleEntry<[]> /** * Disallow unnecessary boolean casts * @see https://eslint.org/docs/latest/rules/no-extra-boolean-cast */ 'no-extra-boolean-cast'?: Linter.RuleEntry /** * Disallow unnecessary labels * @see https://eslint.org/docs/latest/rules/no-extra-label */ 'no-extra-label'?: Linter.RuleEntry<[]> /** * Disallow unnecessary parentheses * @see https://eslint.org/docs/latest/rules/no-extra-parens * @deprecated */ 'no-extra-parens'?: Linter.RuleEntry /** * Disallow unnecessary semicolons * @see https://eslint.org/docs/latest/rules/no-extra-semi * @deprecated */ 'no-extra-semi'?: Linter.RuleEntry<[]> /** * Disallow fallthrough of `case` statements * @see https://eslint.org/docs/latest/rules/no-fallthrough */ 'no-fallthrough'?: Linter.RuleEntry /** * Disallow leading or trailing decimal points in numeric literals * @see https://eslint.org/docs/latest/rules/no-floating-decimal * @deprecated */ 'no-floating-decimal'?: Linter.RuleEntry<[]> /** * Disallow reassigning `function` declarations * @see https://eslint.org/docs/latest/rules/no-func-assign */ 'no-func-assign'?: Linter.RuleEntry<[]> /** * Disallow assignments to native objects or read-only global variables * @see https://eslint.org/docs/latest/rules/no-global-assign */ 'no-global-assign'?: Linter.RuleEntry /** * Disallow shorthand type conversions * @see https://eslint.org/docs/latest/rules/no-implicit-coercion */ 'no-implicit-coercion'?: Linter.RuleEntry /** * Disallow declarations in the global scope * @see https://eslint.org/docs/latest/rules/no-implicit-globals */ 'no-implicit-globals'?: Linter.RuleEntry /** * Disallow the use of `eval()`-like methods * @see https://eslint.org/docs/latest/rules/no-implied-eval */ 'no-implied-eval'?: Linter.RuleEntry<[]> /** * Disallow assigning to imported bindings * @see https://eslint.org/docs/latest/rules/no-import-assign */ 'no-import-assign'?: Linter.RuleEntry<[]> /** * Disallow inline comments after code * @see https://eslint.org/docs/latest/rules/no-inline-comments */ 'no-inline-comments'?: Linter.RuleEntry /** * Disallow variable or `function` declarations in nested blocks * @see https://eslint.org/docs/latest/rules/no-inner-declarations */ 'no-inner-declarations'?: Linter.RuleEntry /** * Disallow invalid regular expression strings in `RegExp` constructors * @see https://eslint.org/docs/latest/rules/no-invalid-regexp */ 'no-invalid-regexp'?: Linter.RuleEntry /** * Disallow use of `this` in contexts where the value of `this` is `undefined` * @see https://eslint.org/docs/latest/rules/no-invalid-this */ 'no-invalid-this'?: Linter.RuleEntry /** * Disallow irregular whitespace * @see https://eslint.org/docs/latest/rules/no-irregular-whitespace */ 'no-irregular-whitespace'?: Linter.RuleEntry /** * Disallow the use of the `__iterator__` property * @see https://eslint.org/docs/latest/rules/no-iterator */ 'no-iterator'?: Linter.RuleEntry<[]> /** * Disallow labels that share a name with a variable * @see https://eslint.org/docs/latest/rules/no-label-var */ 'no-label-var'?: Linter.RuleEntry<[]> /** * Disallow labeled statements * @see https://eslint.org/docs/latest/rules/no-labels */ 'no-labels'?: Linter.RuleEntry /** * Disallow unnecessary nested blocks * @see https://eslint.org/docs/latest/rules/no-lone-blocks */ 'no-lone-blocks'?: Linter.RuleEntry<[]> /** * Disallow `if` statements as the only statement in `else` blocks * @see https://eslint.org/docs/latest/rules/no-lonely-if */ 'no-lonely-if'?: Linter.RuleEntry<[]> /** * Disallow function declarations that contain unsafe references inside loop statements * @see https://eslint.org/docs/latest/rules/no-loop-func */ 'no-loop-func'?: Linter.RuleEntry<[]> /** * Disallow literal numbers that lose precision * @see https://eslint.org/docs/latest/rules/no-loss-of-precision */ 'no-loss-of-precision'?: Linter.RuleEntry<[]> /** * Disallow magic numbers * @see https://eslint.org/docs/latest/rules/no-magic-numbers */ 'no-magic-numbers'?: Linter.RuleEntry /** * Disallow characters which are made with multiple code points in character class syntax * @see https://eslint.org/docs/latest/rules/no-misleading-character-class */ 'no-misleading-character-class'?: Linter.RuleEntry /** * Disallow mixed binary operators * @see https://eslint.org/docs/latest/rules/no-mixed-operators * @deprecated */ 'no-mixed-operators'?: Linter.RuleEntry /** * Disallow `require` calls to be mixed with regular variable declarations * @see https://eslint.org/docs/latest/rules/no-mixed-requires * @deprecated */ 'no-mixed-requires'?: Linter.RuleEntry /** * Disallow mixed spaces and tabs for indentation * @see https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs * @deprecated */ 'no-mixed-spaces-and-tabs'?: Linter.RuleEntry /** * Disallow use of chained assignment expressions * @see https://eslint.org/docs/latest/rules/no-multi-assign */ 'no-multi-assign'?: Linter.RuleEntry /** * Disallow multiple spaces * @see https://eslint.org/docs/latest/rules/no-multi-spaces * @deprecated */ 'no-multi-spaces'?: Linter.RuleEntry /** * Disallow multiline strings * @see https://eslint.org/docs/latest/rules/no-multi-str */ 'no-multi-str'?: Linter.RuleEntry<[]> /** * Disallow multiple empty lines * @see https://eslint.org/docs/latest/rules/no-multiple-empty-lines * @deprecated */ 'no-multiple-empty-lines'?: Linter.RuleEntry /** * Disallow assignments to native objects or read-only global variables * @see https://eslint.org/docs/latest/rules/no-native-reassign * @deprecated */ 'no-native-reassign'?: Linter.RuleEntry /** * Disallow negated conditions * @see https://eslint.org/docs/latest/rules/no-negated-condition */ 'no-negated-condition'?: Linter.RuleEntry<[]> /** * Disallow negating the left operand in `in` expressions * @see https://eslint.org/docs/latest/rules/no-negated-in-lhs * @deprecated */ 'no-negated-in-lhs'?: Linter.RuleEntry<[]> /** * Disallow nested ternary expressions * @see https://eslint.org/docs/latest/rules/no-nested-ternary */ 'no-nested-ternary'?: Linter.RuleEntry<[]> /** * Disallow `new` operators outside of assignments or comparisons * @see https://eslint.org/docs/latest/rules/no-new */ 'no-new'?: Linter.RuleEntry<[]> /** * Disallow `new` operators with the `Function` object * @see https://eslint.org/docs/latest/rules/no-new-func */ 'no-new-func'?: Linter.RuleEntry<[]> /** * Disallow `new` operators with global non-constructor functions * @see https://eslint.org/docs/latest/rules/no-new-native-nonconstructor */ 'no-new-native-nonconstructor'?: Linter.RuleEntry<[]> /** * Disallow `Object` constructors * @see https://eslint.org/docs/latest/rules/no-new-object * @deprecated */ 'no-new-object'?: Linter.RuleEntry<[]> /** * Disallow `new` operators with calls to `require` * @see https://eslint.org/docs/latest/rules/no-new-require * @deprecated */ 'no-new-require'?: Linter.RuleEntry<[]> /** * Disallow `new` operators with the `Symbol` object * @see https://eslint.org/docs/latest/rules/no-new-symbol * @deprecated */ 'no-new-symbol'?: Linter.RuleEntry<[]> /** * Disallow `new` operators with the `String`, `Number`, and `Boolean` objects * @see https://eslint.org/docs/latest/rules/no-new-wrappers */ 'no-new-wrappers'?: Linter.RuleEntry<[]> /** * Disallow `\8` and `\9` escape sequences in string literals * @see https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape */ 'no-nonoctal-decimal-escape'?: Linter.RuleEntry<[]> /** * Disallow calling global object properties as functions * @see https://eslint.org/docs/latest/rules/no-obj-calls */ 'no-obj-calls'?: Linter.RuleEntry<[]> /** * Disallow calls to the `Object` constructor without an argument * @see https://eslint.org/docs/latest/rules/no-object-constructor */ 'no-object-constructor'?: Linter.RuleEntry<[]> /** * Disallow octal literals * @see https://eslint.org/docs/latest/rules/no-octal */ 'no-octal'?: Linter.RuleEntry<[]> /** * Disallow octal escape sequences in string literals * @see https://eslint.org/docs/latest/rules/no-octal-escape */ 'no-octal-escape'?: Linter.RuleEntry<[]> /** * Disallow reassigning function parameters * @see https://eslint.org/docs/latest/rules/no-param-reassign */ 'no-param-reassign'?: Linter.RuleEntry /** * Disallow string concatenation with `__dirname` and `__filename` * @see https://eslint.org/docs/latest/rules/no-path-concat * @deprecated */ 'no-path-concat'?: Linter.RuleEntry<[]> /** * Disallow the unary operators `++` and `--` * @see https://eslint.org/docs/latest/rules/no-plusplus */ 'no-plusplus'?: Linter.RuleEntry /** * Disallow the use of `process.env` * @see https://eslint.org/docs/latest/rules/no-process-env * @deprecated */ 'no-process-env'?: Linter.RuleEntry<[]> /** * Disallow the use of `process.exit()` * @see https://eslint.org/docs/latest/rules/no-process-exit * @deprecated */ 'no-process-exit'?: Linter.RuleEntry<[]> /** * Disallow returning values from Promise executor functions * @see https://eslint.org/docs/latest/rules/no-promise-executor-return */ 'no-promise-executor-return'?: Linter.RuleEntry /** * Disallow the use of the `__proto__` property * @see https://eslint.org/docs/latest/rules/no-proto */ 'no-proto'?: Linter.RuleEntry<[]> /** * Disallow calling some `Object.prototype` methods directly on objects * @see https://eslint.org/docs/latest/rules/no-prototype-builtins */ 'no-prototype-builtins'?: Linter.RuleEntry<[]> /** * Disallow variable redeclaration * @see https://eslint.org/docs/latest/rules/no-redeclare */ 'no-redeclare'?: Linter.RuleEntry /** * Disallow multiple spaces in regular expressions * @see https://eslint.org/docs/latest/rules/no-regex-spaces */ 'no-regex-spaces'?: Linter.RuleEntry<[]> /** * Disallow specified names in exports * @see https://eslint.org/docs/latest/rules/no-restricted-exports */ 'no-restricted-exports'?: Linter.RuleEntry /** * Disallow specified global variables * @see https://eslint.org/docs/latest/rules/no-restricted-globals */ 'no-restricted-globals'?: Linter.RuleEntry /** * Disallow specified modules when loaded by `import` * @see https://eslint.org/docs/latest/rules/no-restricted-imports */ 'no-restricted-imports'?: Linter.RuleEntry /** * Disallow specified modules when loaded by `require` * @see https://eslint.org/docs/latest/rules/no-restricted-modules * @deprecated */ 'no-restricted-modules'?: Linter.RuleEntry /** * Disallow certain properties on certain objects * @see https://eslint.org/docs/latest/rules/no-restricted-properties */ 'no-restricted-properties'?: Linter.RuleEntry /** * Disallow specified syntax * @see https://eslint.org/docs/latest/rules/no-restricted-syntax */ 'no-restricted-syntax'?: Linter.RuleEntry /** * Disallow assignment operators in `return` statements * @see https://eslint.org/docs/latest/rules/no-return-assign */ 'no-return-assign'?: Linter.RuleEntry /** * Disallow unnecessary `return await` * @see https://eslint.org/docs/latest/rules/no-return-await * @deprecated */ 'no-return-await'?: Linter.RuleEntry<[]> /** * Disallow `javascript:` URLs * @see https://eslint.org/docs/latest/rules/no-script-url */ 'no-script-url'?: Linter.RuleEntry<[]> /** * Disallow assignments where both sides are exactly the same * @see https://eslint.org/docs/latest/rules/no-self-assign */ 'no-self-assign'?: Linter.RuleEntry /** * Disallow comparisons where both sides are exactly the same * @see https://eslint.org/docs/latest/rules/no-self-compare */ 'no-self-compare'?: Linter.RuleEntry<[]> /** * Disallow comma operators * @see https://eslint.org/docs/latest/rules/no-sequences */ 'no-sequences'?: Linter.RuleEntry /** * Disallow returning values from setters * @see https://eslint.org/docs/latest/rules/no-setter-return */ 'no-setter-return'?: Linter.RuleEntry<[]> /** * Disallow variable declarations from shadowing variables declared in the outer scope * @see https://eslint.org/docs/latest/rules/no-shadow */ 'no-shadow'?: Linter.RuleEntry /** * Disallow identifiers from shadowing restricted names * @see https://eslint.org/docs/latest/rules/no-shadow-restricted-names */ 'no-shadow-restricted-names'?: Linter.RuleEntry /** * Disallow spacing between function identifiers and their applications (deprecated) * @see https://eslint.org/docs/latest/rules/no-spaced-func * @deprecated */ 'no-spaced-func'?: Linter.RuleEntry<[]> /** * Disallow sparse arrays * @see https://eslint.org/docs/latest/rules/no-sparse-arrays */ 'no-sparse-arrays'?: Linter.RuleEntry<[]> /** * Disallow synchronous methods * @see https://eslint.org/docs/latest/rules/no-sync * @deprecated */ 'no-sync'?: Linter.RuleEntry /** * Disallow all tabs * @see https://eslint.org/docs/latest/rules/no-tabs * @deprecated */ 'no-tabs'?: Linter.RuleEntry /** * Disallow template literal placeholder syntax in regular strings * @see https://eslint.org/docs/latest/rules/no-template-curly-in-string */ 'no-template-curly-in-string'?: Linter.RuleEntry<[]> /** * Disallow ternary operators * @see https://eslint.org/docs/latest/rules/no-ternary */ 'no-ternary'?: Linter.RuleEntry<[]> /** * Disallow `this`/`super` before calling `super()` in constructors * @see https://eslint.org/docs/latest/rules/no-this-before-super */ 'no-this-before-super'?: Linter.RuleEntry<[]> /** * Disallow throwing literals as exceptions * @see https://eslint.org/docs/latest/rules/no-throw-literal */ 'no-throw-literal'?: Linter.RuleEntry<[]> /** * Disallow trailing whitespace at the end of lines * @see https://eslint.org/docs/latest/rules/no-trailing-spaces * @deprecated */ 'no-trailing-spaces'?: Linter.RuleEntry /** * Disallow `let` or `var` variables that are read but never assigned * @see https://eslint.org/docs/latest/rules/no-unassigned-vars */ 'no-unassigned-vars'?: Linter.RuleEntry<[]> /** * Disallow the use of undeclared variables unless mentioned in `/*global *\/` comments * @see https://eslint.org/docs/latest/rules/no-undef */ 'no-undef'?: Linter.RuleEntry /** * Disallow initializing variables to `undefined` * @see https://eslint.org/docs/latest/rules/no-undef-init */ 'no-undef-init'?: Linter.RuleEntry<[]> /** * Disallow the use of `undefined` as an identifier * @see https://eslint.org/docs/latest/rules/no-undefined */ 'no-undefined'?: Linter.RuleEntry<[]> /** * Disallow dangling underscores in identifiers * @see https://eslint.org/docs/latest/rules/no-underscore-dangle */ 'no-underscore-dangle'?: Linter.RuleEntry /** * Disallow confusing multiline expressions * @see https://eslint.org/docs/latest/rules/no-unexpected-multiline */ 'no-unexpected-multiline'?: Linter.RuleEntry<[]> /** * Disallow unmodified loop conditions * @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition */ 'no-unmodified-loop-condition'?: Linter.RuleEntry<[]> /** * Disallow ternary operators when simpler alternatives exist * @see https://eslint.org/docs/latest/rules/no-unneeded-ternary */ 'no-unneeded-ternary'?: Linter.RuleEntry /** * Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements * @see https://eslint.org/docs/latest/rules/no-unreachable */ 'no-unreachable'?: Linter.RuleEntry<[]> /** * Disallow loops with a body that allows only one iteration * @see https://eslint.org/docs/latest/rules/no-unreachable-loop */ 'no-unreachable-loop'?: Linter.RuleEntry /** * Disallow control flow statements in `finally` blocks * @see https://eslint.org/docs/latest/rules/no-unsafe-finally */ 'no-unsafe-finally'?: Linter.RuleEntry<[]> /** * Disallow negating the left operand of relational operators * @see https://eslint.org/docs/latest/rules/no-unsafe-negation */ 'no-unsafe-negation'?: Linter.RuleEntry /** * Disallow use of optional chaining in contexts where the `undefined` value is not allowed * @see https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining */ 'no-unsafe-optional-chaining'?: Linter.RuleEntry /** * Disallow unused expressions * @see https://eslint.org/docs/latest/rules/no-unused-expressions */ 'no-unused-expressions'?: Linter.RuleEntry /** * Disallow unused labels * @see https://eslint.org/docs/latest/rules/no-unused-labels */ 'no-unused-labels'?: Linter.RuleEntry<[]> /** * Disallow unused private class members * @see https://eslint.org/docs/latest/rules/no-unused-private-class-members */ 'no-unused-private-class-members'?: Linter.RuleEntry<[]> /** * Disallow unused variables * @see https://eslint.org/docs/latest/rules/no-unused-vars */ 'no-unused-vars'?: Linter.RuleEntry /** * Disallow the use of variables before they are defined * @see https://eslint.org/docs/latest/rules/no-use-before-define */ 'no-use-before-define'?: Linter.RuleEntry /** * Disallow variable assignments when the value is not used * @see https://eslint.org/docs/latest/rules/no-useless-assignment */ 'no-useless-assignment'?: Linter.RuleEntry<[]> /** * Disallow useless backreferences in regular expressions * @see https://eslint.org/docs/latest/rules/no-useless-backreference */ 'no-useless-backreference'?: Linter.RuleEntry<[]> /** * Disallow unnecessary calls to `.call()` and `.apply()` * @see https://eslint.org/docs/latest/rules/no-useless-call */ 'no-useless-call'?: Linter.RuleEntry<[]> /** * Disallow unnecessary `catch` clauses * @see https://eslint.org/docs/latest/rules/no-useless-catch */ 'no-useless-catch'?: Linter.RuleEntry<[]> /** * Disallow unnecessary computed property keys in objects and classes * @see https://eslint.org/docs/latest/rules/no-useless-computed-key */ 'no-useless-computed-key'?: Linter.RuleEntry /** * Disallow unnecessary concatenation of literals or template literals * @see https://eslint.org/docs/latest/rules/no-useless-concat */ 'no-useless-concat'?: Linter.RuleEntry<[]> /** * Disallow unnecessary constructors * @see https://eslint.org/docs/latest/rules/no-useless-constructor */ 'no-useless-constructor'?: Linter.RuleEntry<[]> /** * Disallow unnecessary escape characters * @see https://eslint.org/docs/latest/rules/no-useless-escape */ 'no-useless-escape'?: Linter.RuleEntry /** * Disallow renaming import, export, and destructured assignments to the same name * @see https://eslint.org/docs/latest/rules/no-useless-rename */ 'no-useless-rename'?: Linter.RuleEntry /** * Disallow redundant return statements * @see https://eslint.org/docs/latest/rules/no-useless-return */ 'no-useless-return'?: Linter.RuleEntry<[]> /** * Require `let` or `const` instead of `var` * @see https://eslint.org/docs/latest/rules/no-var */ 'no-var'?: Linter.RuleEntry<[]> /** * Disallow `void` operators * @see https://eslint.org/docs/latest/rules/no-void */ 'no-void'?: Linter.RuleEntry /** * Disallow specified warning terms in comments * @see https://eslint.org/docs/latest/rules/no-warning-comments */ 'no-warning-comments'?: Linter.RuleEntry /** * Disallow whitespace before properties * @see https://eslint.org/docs/latest/rules/no-whitespace-before-property * @deprecated */ 'no-whitespace-before-property'?: Linter.RuleEntry<[]> /** * Disallow `with` statements * @see https://eslint.org/docs/latest/rules/no-with */ 'no-with'?: Linter.RuleEntry<[]> /** * Enforce the location of single-line statements * @see https://eslint.org/docs/latest/rules/nonblock-statement-body-position * @deprecated */ 'nonblock-statement-body-position'?: Linter.RuleEntry /** * Enforce consistent line breaks after opening and before closing braces * @see https://eslint.org/docs/latest/rules/object-curly-newline * @deprecated */ 'object-curly-newline'?: Linter.RuleEntry /** * Enforce consistent spacing inside braces * @see https://eslint.org/docs/latest/rules/object-curly-spacing * @deprecated */ 'object-curly-spacing'?: Linter.RuleEntry /** * Enforce placing object properties on separate lines * @see https://eslint.org/docs/latest/rules/object-property-newline * @deprecated */ 'object-property-newline'?: Linter.RuleEntry /** * Require or disallow method and property shorthand syntax for object literals * @see https://eslint.org/docs/latest/rules/object-shorthand */ 'object-shorthand'?: Linter.RuleEntry /** * Enforce variables to be declared either together or separately in functions * @see https://eslint.org/docs/latest/rules/one-var */ 'one-var'?: Linter.RuleEntry /** * Require or disallow newlines around variable declarations * @see https://eslint.org/docs/latest/rules/one-var-declaration-per-line * @deprecated */ 'one-var-declaration-per-line'?: Linter.RuleEntry /** * Require or disallow assignment operator shorthand where possible * @see https://eslint.org/docs/latest/rules/operator-assignment */ 'operator-assignment'?: Linter.RuleEntry /** * Enforce consistent linebreak style for operators * @see https://eslint.org/docs/latest/rules/operator-linebreak * @deprecated */ 'operator-linebreak'?: Linter.RuleEntry /** * Require or disallow padding within blocks * @see https://eslint.org/docs/latest/rules/padded-blocks * @deprecated */ 'padded-blocks'?: Linter.RuleEntry /** * Require or disallow padding lines between statements * @see https://eslint.org/docs/latest/rules/padding-line-between-statements * @deprecated */ 'padding-line-between-statements'?: Linter.RuleEntry /** * Require using arrow functions for callbacks * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback */ 'prefer-arrow-callback'?: Linter.RuleEntry /** * Require `const` declarations for variables that are never reassigned after declared * @see https://eslint.org/docs/latest/rules/prefer-const */ 'prefer-const'?: Linter.RuleEntry /** * Require destructuring from arrays and/or objects * @see https://eslint.org/docs/latest/rules/prefer-destructuring */ 'prefer-destructuring'?: Linter.RuleEntry /** * Disallow the use of `Math.pow` in favor of the `**` operator * @see https://eslint.org/docs/latest/rules/prefer-exponentiation-operator */ 'prefer-exponentiation-operator'?: Linter.RuleEntry<[]> /** * Enforce using named capture group in regular expression * @see https://eslint.org/docs/latest/rules/prefer-named-capture-group */ 'prefer-named-capture-group'?: Linter.RuleEntry<[]> /** * Disallow `parseInt()` and `Number.parseInt()` in favor of binary, octal, and hexadecimal literals * @see https://eslint.org/docs/latest/rules/prefer-numeric-literals */ 'prefer-numeric-literals'?: Linter.RuleEntry<[]> /** * Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()` * @see https://eslint.org/docs/latest/rules/prefer-object-has-own */ 'prefer-object-has-own'?: Linter.RuleEntry<[]> /** * Disallow using `Object.assign` with an object literal as the first argument and prefer the use of object spread instead * @see https://eslint.org/docs/latest/rules/prefer-object-spread */ 'prefer-object-spread'?: Linter.RuleEntry<[]> /** * Require using Error objects as Promise rejection reasons * @see https://eslint.org/docs/latest/rules/prefer-promise-reject-errors */ 'prefer-promise-reject-errors'?: Linter.RuleEntry /** * Require `Reflect` methods where applicable * @see https://eslint.org/docs/latest/rules/prefer-reflect * @deprecated */ 'prefer-reflect'?: Linter.RuleEntry /** * Disallow use of the `RegExp` constructor in favor of regular expression literals * @see https://eslint.org/docs/latest/rules/prefer-regex-literals */ 'prefer-regex-literals'?: Linter.RuleEntry /** * Require rest parameters instead of `arguments` * @see https://eslint.org/docs/latest/rules/prefer-rest-params */ 'prefer-rest-params'?: Linter.RuleEntry<[]> /** * Require spread operators instead of `.apply()` * @see https://eslint.org/docs/latest/rules/prefer-spread */ 'prefer-spread'?: Linter.RuleEntry<[]> /** * Require template literals instead of string concatenation * @see https://eslint.org/docs/latest/rules/prefer-template */ 'prefer-template'?: Linter.RuleEntry<[]> /** * Disallow losing originally caught error when re-throwing custom errors * @see https://eslint.org/docs/latest/rules/preserve-caught-error */ 'preserve-caught-error'?: Linter.RuleEntry /** * Require quotes around object literal property names * @see https://eslint.org/docs/latest/rules/quote-props * @deprecated */ 'quote-props'?: Linter.RuleEntry /** * Enforce the consistent use of either backticks, double, or single quotes * @see https://eslint.org/docs/latest/rules/quotes * @deprecated */ 'quotes'?: Linter.RuleEntry /** * Enforce the use of the radix argument when using `parseInt()` * @see https://eslint.org/docs/latest/rules/radix */ 'radix'?: Linter.RuleEntry /** * Disallow assignments that can lead to race conditions due to usage of `await` or `yield` * @see https://eslint.org/docs/latest/rules/require-atomic-updates */ 'require-atomic-updates'?: Linter.RuleEntry /** * Disallow async functions which have no `await` expression * @see https://eslint.org/docs/latest/rules/require-await */ 'require-await'?: Linter.RuleEntry<[]> /** * Enforce the use of `u` or `v` flag on regular expressions * @see https://eslint.org/docs/latest/rules/require-unicode-regexp */ 'require-unicode-regexp'?: Linter.RuleEntry /** * Require generator functions to contain `yield` * @see https://eslint.org/docs/latest/rules/require-yield */ 'require-yield'?: Linter.RuleEntry<[]> /** * Enforce spacing between rest and spread operators and their expressions * @see https://eslint.org/docs/latest/rules/rest-spread-spacing * @deprecated */ 'rest-spread-spacing'?: Linter.RuleEntry /** * Require or disallow semicolons instead of ASI * @see https://eslint.org/docs/latest/rules/semi * @deprecated */ 'semi'?: Linter.RuleEntry /** * Enforce consistent spacing before and after semicolons * @see https://eslint.org/docs/latest/rules/semi-spacing * @deprecated */ 'semi-spacing'?: Linter.RuleEntry /** * Enforce location of semicolons * @see https://eslint.org/docs/latest/rules/semi-style * @deprecated */ 'semi-style'?: Linter.RuleEntry /** * Enforce sorted `import` declarations within modules * @see https://eslint.org/docs/latest/rules/sort-imports */ 'sort-imports'?: Linter.RuleEntry /** * Require object keys to be sorted * @see https://eslint.org/docs/latest/rules/sort-keys */ 'sort-keys'?: Linter.RuleEntry /** * Require variables within the same declaration block to be sorted * @see https://eslint.org/docs/latest/rules/sort-vars */ 'sort-vars'?: Linter.RuleEntry /** * Enforce consistent spacing before blocks * @see https://eslint.org/docs/latest/rules/space-before-blocks * @deprecated */ 'space-before-blocks'?: Linter.RuleEntry /** * Enforce consistent spacing before `function` definition opening parenthesis * @see https://eslint.org/docs/latest/rules/space-before-function-paren * @deprecated */ 'space-before-function-paren'?: Linter.RuleEntry /** * Enforce consistent spacing inside parentheses * @see https://eslint.org/docs/latest/rules/space-in-parens * @deprecated */ 'space-in-parens'?: Linter.RuleEntry /** * Require spacing around infix operators * @see https://eslint.org/docs/latest/rules/space-infix-ops * @deprecated */ 'space-infix-ops'?: Linter.RuleEntry /** * Enforce consistent spacing before or after unary operators * @see https://eslint.org/docs/latest/rules/space-unary-ops * @deprecated */ 'space-unary-ops'?: Linter.RuleEntry /** * Enforce consistent spacing after the `//` or `/*` in a comment * @see https://eslint.org/docs/latest/rules/spaced-comment * @deprecated */ 'spaced-comment'?: Linter.RuleEntry /** * Require or disallow strict mode directives * @see https://eslint.org/docs/latest/rules/strict */ 'strict'?: Linter.RuleEntry /** * Enforce spacing around colons of switch statements * @see https://eslint.org/docs/latest/rules/switch-colon-spacing * @deprecated */ 'switch-colon-spacing'?: Linter.RuleEntry /** * Require symbol descriptions * @see https://eslint.org/docs/latest/rules/symbol-description */ 'symbol-description'?: Linter.RuleEntry<[]> /** * Require or disallow spacing around embedded expressions of template strings * @see https://eslint.org/docs/latest/rules/template-curly-spacing * @deprecated */ 'template-curly-spacing'?: Linter.RuleEntry /** * Require or disallow spacing between template tags and their literals * @see https://eslint.org/docs/latest/rules/template-tag-spacing * @deprecated */ 'template-tag-spacing'?: Linter.RuleEntry /** * Require or disallow Unicode byte order mark (BOM) * @see https://eslint.org/docs/latest/rules/unicode-bom */ 'unicode-bom'?: Linter.RuleEntry /** * Require calls to `isNaN()` when checking for `NaN` * @see https://eslint.org/docs/latest/rules/use-isnan */ 'use-isnan'?: Linter.RuleEntry /** * Enforce comparing `typeof` expressions against valid strings * @see https://eslint.org/docs/latest/rules/valid-typeof */ 'valid-typeof'?: Linter.RuleEntry /** * Require `var` declarations be placed at the top of their containing scope * @see https://eslint.org/docs/latest/rules/vars-on-top */ 'vars-on-top'?: Linter.RuleEntry<[]> /** * Require parentheses around immediate `function` invocations * @see https://eslint.org/docs/latest/rules/wrap-iife * @deprecated */ 'wrap-iife'?: Linter.RuleEntry /** * Require parenthesis around regex literals * @see https://eslint.org/docs/latest/rules/wrap-regex * @deprecated */ 'wrap-regex'?: Linter.RuleEntry<[]> /** * Require or disallow spacing around the `*` in `yield*` expressions * @see https://eslint.org/docs/latest/rules/yield-star-spacing * @deprecated */ 'yield-star-spacing'?: Linter.RuleEntry /** * Require or disallow "Yoda" conditions * @see https://eslint.org/docs/latest/rules/yoda */ 'yoda'?: Linter.RuleEntry } /* ======= Declarations ======= */ // ----- accessor-pairs ----- type AccessorPairs = []|[{ getWithoutSet?: boolean setWithoutGet?: boolean enforceForClassMembers?: boolean enforceForTSTypes?: boolean }] // ----- array-bracket-newline ----- type ArrayBracketNewline = []|[(("always" | "never" | "consistent") | { multiline?: boolean minItems?: (number | null) })] // ----- array-bracket-spacing ----- type ArrayBracketSpacing = []|[("always" | "never")]|[("always" | "never"), { singleValue?: boolean objectsInArrays?: boolean arraysInArrays?: boolean }] // ----- array-callback-return ----- type ArrayCallbackReturn = []|[{ allowImplicit?: boolean checkForEach?: boolean allowVoid?: boolean }] // ----- array-element-newline ----- type ArrayElementNewline = []|[(_ArrayElementNewlineBasicConfig | { ArrayExpression?: _ArrayElementNewlineBasicConfig ArrayPattern?: _ArrayElementNewlineBasicConfig })] type _ArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | { multiline?: boolean minItems?: (number | null) }) // ----- arrow-body-style ----- type ArrowBodyStyle = ([]|[("always" | "never")] | []|["as-needed"]|["as-needed", { requireReturnForObjectLiteral?: boolean }]) // ----- arrow-parens ----- type ArrowParens = []|[("always" | "as-needed")]|[("always" | "as-needed"), { requireForBlockBody?: boolean }] // ----- arrow-spacing ----- type ArrowSpacing = []|[{ before?: boolean after?: boolean }] // ----- block-spacing ----- type BlockSpacing = []|[("always" | "never")] // ----- brace-style ----- type BraceStyle = []|[("1tbs" | "stroustrup" | "allman")]|[("1tbs" | "stroustrup" | "allman"), { allowSingleLine?: boolean }] // ----- callback-return ----- type CallbackReturn = []|[string[]] // ----- camelcase ----- type Camelcase = []|[{ ignoreDestructuring?: boolean ignoreImports?: boolean ignoreGlobals?: boolean properties?: ("always" | "never") allow?: string[] }] // ----- capitalized-comments ----- type CapitalizedComments = []|[("always" | "never")]|[("always" | "never"), ({ ignorePattern?: string ignoreInlineComments?: boolean ignoreConsecutiveComments?: boolean } | { line?: { ignorePattern?: string ignoreInlineComments?: boolean ignoreConsecutiveComments?: boolean } block?: { ignorePattern?: string ignoreInlineComments?: boolean ignoreConsecutiveComments?: boolean } })] // ----- class-methods-use-this ----- type ClassMethodsUseThis = []|[{ exceptMethods?: string[] enforceForClassFields?: boolean ignoreOverrideMethods?: boolean ignoreClassesWithImplements?: ("all" | "public-fields") }] // ----- comma-dangle ----- type CommaDangle = []|[(_CommaDangleValue | { arrays?: _CommaDangleValueWithIgnore objects?: _CommaDangleValueWithIgnore imports?: _CommaDangleValueWithIgnore exports?: _CommaDangleValueWithIgnore functions?: _CommaDangleValueWithIgnore })] type _CommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline") type _CommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline") // ----- comma-spacing ----- type CommaSpacing = []|[{ before?: boolean after?: boolean }] // ----- comma-style ----- type CommaStyle = []|[("first" | "last")]|[("first" | "last"), { exceptions?: { [k: string]: boolean | undefined } }] // ----- complexity ----- type Complexity = []|[(number | { maximum?: number max?: number variant?: ("classic" | "modified") })] // ----- computed-property-spacing ----- type ComputedPropertySpacing = []|[("always" | "never")]|[("always" | "never"), { enforceForClassMembers?: boolean }] // ----- consistent-return ----- type ConsistentReturn = []|[{ treatUndefinedAsUnspecified?: boolean }] // ----- consistent-this ----- type ConsistentThis = string[] // ----- curly ----- type Curly = ([]|["all"] | []|[("multi" | "multi-line" | "multi-or-nest")]|[("multi" | "multi-line" | "multi-or-nest"), "consistent"]) // ----- default-case ----- type DefaultCase = []|[{ commentPattern?: string }] // ----- dot-location ----- type DotLocation = []|[("object" | "property")] // ----- dot-notation ----- type DotNotation = []|[{ allowKeywords?: boolean allowPattern?: string }] // ----- eol-last ----- type EolLast = []|[("always" | "never" | "unix" | "windows")] // ----- eqeqeq ----- type Eqeqeq = ([]|["always"]|["always", { null?: ("always" | "never" | "ignore") }] | []|[("smart" | "allow-null")]) // ----- func-call-spacing ----- type FuncCallSpacing = ([]|["never"] | []|["always"]|["always", { allowNewlines?: boolean }]) // ----- func-name-matching ----- type FuncNameMatching = ([]|[("always" | "never")]|[("always" | "never"), { considerPropertyDescriptor?: boolean includeCommonJSModuleExports?: boolean }] | []|[{ considerPropertyDescriptor?: boolean includeCommonJSModuleExports?: boolean }]) // ----- func-names ----- type FuncNames = []|[_FuncNamesValue]|[_FuncNamesValue, { generators?: _FuncNamesValue }] type _FuncNamesValue = ("always" | "as-needed" | "never") // ----- func-style ----- type FuncStyle = []|[("declaration" | "expression")]|[("declaration" | "expression"), { allowArrowFunctions?: boolean allowTypeAnnotation?: boolean overrides?: { namedExports?: ("declaration" | "expression" | "ignore") } }] // ----- function-call-argument-newline ----- type FunctionCallArgumentNewline = []|[("always" | "never" | "consistent")] // ----- function-paren-newline ----- type FunctionParenNewline = []|[(("always" | "never" | "consistent" | "multiline" | "multiline-arguments") | { minItems?: number })] // ----- generator-star-spacing ----- type GeneratorStarSpacing = []|[(("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 }) })] // ----- getter-return ----- type GetterReturn = []|[{ allowImplicit?: boolean }] // ----- grouped-accessor-pairs ----- type GroupedAccessorPairs = []|[("anyOrder" | "getBeforeSet" | "setBeforeGet")]|[("anyOrder" | "getBeforeSet" | "setBeforeGet"), { enforceForTSTypes?: boolean }] // ----- handle-callback-err ----- type HandleCallbackErr = []|[string] // ----- id-blacklist ----- type IdBlacklist = string[] // ----- id-denylist ----- type IdDenylist = string[] // ----- id-length ----- type IdLength = []|[{ min?: number max?: number exceptions?: string[] exceptionPatterns?: string[] properties?: ("always" | "never") }] // ----- id-match ----- type IdMatch = []|[string]|[string, { properties?: boolean classFields?: boolean onlyDeclarations?: boolean ignoreDestructuring?: boolean }] // ----- implicit-arrow-linebreak ----- type ImplicitArrowLinebreak = []|[("beside" | "below")] // ----- indent ----- type Indent = []|[("tab" | number)]|[("tab" | number), { 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 }] // ----- indent-legacy ----- type IndentLegacy = []|[("tab" | number)]|[("tab" | number), { SwitchCase?: number VariableDeclarator?: (number | { var?: number let?: number const?: number [k: string]: unknown | undefined }) outerIIFEBody?: number MemberExpression?: number FunctionDeclaration?: { parameters?: (number | "first") body?: number [k: string]: unknown | undefined } FunctionExpression?: { parameters?: (number | "first") body?: number [k: string]: unknown | undefined } CallExpression?: { parameters?: (number | "first") [k: string]: unknown | undefined } ArrayExpression?: (number | "first") ObjectExpression?: (number | "first") }] // ----- init-declarations ----- type InitDeclarations = ([]|["always"] | []|["never"]|["never", { ignoreForLoopInit?: boolean }]) // ----- jsx-quotes ----- type JsxQuotes = []|[("prefer-single" | "prefer-double")] // ----- key-spacing ----- type KeySpacing = []|[({ 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 } })] // ----- keyword-spacing ----- type KeywordSpacing = []|[{ 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 } } }] // ----- line-comment-position ----- type LineCommentPosition = []|[(("above" | "beside") | { position?: ("above" | "beside") ignorePattern?: string applyDefaultPatterns?: boolean applyDefaultIgnorePatterns?: boolean })] // ----- linebreak-style ----- type LinebreakStyle = []|[("unix" | "windows")] // ----- lines-around-comment ----- type LinesAroundComment = []|[{ 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 }] // ----- lines-around-directive ----- type LinesAroundDirective = []|[(("always" | "never") | { before?: ("always" | "never") after?: ("always" | "never") })] // ----- lines-between-class-members ----- type LinesBetweenClassMembers = []|[({ enforce: [{ blankLine: ("always" | "never") prev: ("method" | "field" | "*") next: ("method" | "field" | "*") }, ...({ blankLine: ("always" | "never") prev: ("method" | "field" | "*") next: ("method" | "field" | "*") })[]] } | ("always" | "never"))]|[({ enforce: [{ blankLine: ("always" | "never") prev: ("method" | "field" | "*") next: ("method" | "field" | "*") }, ...({ blankLine: ("always" | "never") prev: ("method" | "field" | "*") next: ("method" | "field" | "*") })[]] } | ("always" | "never")), { exceptAfterSingleLine?: boolean }] // ----- logical-assignment-operators ----- type LogicalAssignmentOperators = (([]|["always"]|["always", { enforceForIfStatements?: boolean }] | ["never"]) & unknown[]) // ----- max-classes-per-file ----- type MaxClassesPerFile = []|[(number | { ignoreExpressions?: boolean max?: number })] // ----- max-depth ----- type MaxDepth = []|[(number | { maximum?: number max?: number })] // ----- max-len ----- type MaxLen = []|[({ code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number)]|[({ code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number), ({ code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number)]|[({ code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number), ({ code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean } | number), { code?: number comments?: number tabWidth?: number ignorePattern?: string ignoreComments?: boolean ignoreStrings?: boolean ignoreUrls?: boolean ignoreTemplateLiterals?: boolean ignoreRegExpLiterals?: boolean ignoreTrailingComments?: boolean }] // ----- max-lines ----- type MaxLines = []|[(number | { max?: number skipComments?: boolean skipBlankLines?: boolean })] // ----- max-lines-per-function ----- type MaxLinesPerFunction = []|[({ max?: number skipComments?: boolean skipBlankLines?: boolean IIFEs?: boolean } | number)] // ----- max-nested-callbacks ----- type MaxNestedCallbacks = []|[(number | { maximum?: number max?: number })] // ----- max-params ----- type MaxParams = []|[(number | { maximum?: number max?: number countVoidThis?: boolean countThis?: ("never" | "except-void" | "always") })] // ----- max-statements ----- type MaxStatements = []|[(number | { maximum?: number max?: number })]|[(number | { maximum?: number max?: number }), { ignoreTopLevelFunctions?: boolean }] // ----- max-statements-per-line ----- type MaxStatementsPerLine = []|[{ max?: number }] // ----- multiline-comment-style ----- type MultilineCommentStyle = ([]|[("starred-block" | "bare-block")] | []|["separate-lines"]|["separate-lines", { checkJSDoc?: boolean }]) // ----- multiline-ternary ----- type MultilineTernary = []|[("always" | "always-multiline" | "never")] // ----- new-cap ----- type NewCap = []|[{ newIsCap?: boolean capIsNew?: boolean newIsCapExceptions?: string[] newIsCapExceptionPattern?: string capIsNewExceptions?: string[] capIsNewExceptionPattern?: string properties?: boolean }] // ----- new-parens ----- type NewParens = []|[("always" | "never")] // ----- newline-after-var ----- type NewlineAfterVar = []|[("never" | "always")] // ----- newline-per-chained-call ----- type NewlinePerChainedCall = []|[{ ignoreChainWithDepth?: number }] // ----- no-bitwise ----- type NoBitwise = []|[{ allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[] int32Hint?: boolean }] // ----- no-cond-assign ----- type NoCondAssign = []|[("except-parens" | "always")] // ----- no-confusing-arrow ----- type NoConfusingArrow = []|[{ allowParens?: boolean onlyOneSimpleParam?: boolean }] // ----- no-console ----- type NoConsole = []|[{ allow?: [string, ...(string)[]] }] // ----- no-constant-condition ----- type NoConstantCondition = []|[{ checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false) }] // ----- no-duplicate-imports ----- type NoDuplicateImports = []|[{ includeExports?: boolean allowSeparateTypeImports?: boolean }] // ----- no-else-return ----- type NoElseReturn = []|[{ allowElseIf?: boolean }] // ----- no-empty ----- type NoEmpty = []|[{ allowEmptyCatch?: boolean }] // ----- no-empty-function ----- type NoEmptyFunction = []|[{ allow?: ("functions" | "arrowFunctions" | "generatorFunctions" | "methods" | "generatorMethods" | "getters" | "setters" | "constructors" | "asyncFunctions" | "asyncMethods" | "privateConstructors" | "protectedConstructors" | "decoratedFunctions" | "overrideMethods")[] }] // ----- no-empty-pattern ----- type NoEmptyPattern = []|[{ allowObjectPatternsAsParameters?: boolean }] // ----- no-eval ----- type NoEval = []|[{ allowIndirect?: boolean }] // ----- no-extend-native ----- type NoExtendNative = []|[{ exceptions?: string[] }] // ----- no-extra-boolean-cast ----- type NoExtraBooleanCast = []|[({ enforceForInnerExpressions?: boolean } | { enforceForLogicalOperands?: boolean })] // ----- no-extra-parens ----- type NoExtraParens = ([]|["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 }]) // ----- no-fallthrough ----- type NoFallthrough = []|[{ commentPattern?: string allowEmptyCase?: boolean reportUnusedFallthroughComment?: boolean }] // ----- no-global-assign ----- type NoGlobalAssign = []|[{ exceptions?: string[] }] // ----- no-implicit-coercion ----- type NoImplicitCoercion = []|[{ boolean?: boolean number?: boolean string?: boolean disallowTemplateShorthand?: boolean allow?: ("~" | "!!" | "+" | "- -" | "-" | "*")[] }] // ----- no-implicit-globals ----- type NoImplicitGlobals = []|[{ lexicalBindings?: boolean }] // ----- no-inline-comments ----- type NoInlineComments = []|[{ ignorePattern?: string }] // ----- no-inner-declarations ----- type NoInnerDeclarations = []|[("functions" | "both")]|[("functions" | "both"), { blockScopedFunctions?: ("allow" | "disallow") }] // ----- no-invalid-regexp ----- type NoInvalidRegexp = []|[{ allowConstructorFlags?: string[] }] // ----- no-invalid-this ----- type NoInvalidThis = []|[{ capIsConstructor?: boolean }] // ----- no-irregular-whitespace ----- type NoIrregularWhitespace = []|[{ skipComments?: boolean skipStrings?: boolean skipTemplates?: boolean skipRegExps?: boolean skipJSXText?: boolean }] // ----- no-labels ----- type NoLabels = []|[{ allowLoop?: boolean allowSwitch?: boolean }] // ----- no-magic-numbers ----- type NoMagicNumbers = []|[{ detectObjects?: boolean enforceConst?: boolean ignore?: (number | string)[] ignoreArrayIndexes?: boolean ignoreDefaultValues?: boolean ignoreClassFieldInitialValues?: boolean ignoreEnums?: boolean ignoreNumericLiteralTypes?: boolean ignoreReadonlyClassProperties?: boolean ignoreTypeIndexes?: boolean }] // ----- no-misleading-character-class ----- type NoMisleadingCharacterClass = []|[{ allowEscape?: boolean }] // ----- no-mixed-operators ----- type NoMixedOperators = []|[{ groups?: [("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"), ...(("+" | "-" | "*" | "/" | "%" | "**" | "&" | "|" | "^" | "~" | "<<" | ">>" | ">>>" | "==" | "!=" | "===" | "!==" | ">" | ">=" | "<" | "<=" | "&&" | "||" | "in" | "instanceof" | "?:" | "??"))[]][] allowSamePrecedence?: boolean }] // ----- no-mixed-requires ----- type NoMixedRequires = []|[(boolean | { grouping?: boolean allowCall?: boolean })] // ----- no-mixed-spaces-and-tabs ----- type NoMixedSpacesAndTabs = []|[("smart-tabs" | true | false)] // ----- no-multi-assign ----- type NoMultiAssign = []|[{ ignoreNonDeclaration?: boolean }] // ----- no-multi-spaces ----- type NoMultiSpaces = []|[{ exceptions?: { [k: string]: boolean } ignoreEOLComments?: boolean }] // ----- no-multiple-empty-lines ----- type NoMultipleEmptyLines = []|[{ max: number maxEOF?: number maxBOF?: number }] // ----- no-native-reassign ----- type NoNativeReassign = []|[{ exceptions?: string[] }] // ----- no-param-reassign ----- type NoParamReassign = []|[({ props?: false } | { props?: true ignorePropertyModificationsFor?: string[] ignorePropertyModificationsForRegex?: string[] })] // ----- no-plusplus ----- type NoPlusplus = []|[{ allowForLoopAfterthoughts?: boolean }] // ----- no-promise-executor-return ----- type NoPromiseExecutorReturn = []|[{ allowVoid?: boolean }] // ----- no-redeclare ----- type NoRedeclare = []|[{ builtinGlobals?: boolean }] // ----- no-restricted-exports ----- type NoRestrictedExports = []|[({ restrictedNamedExports?: string[] restrictedNamedExportsPattern?: string } | { restrictedNamedExports?: string[] restrictedNamedExportsPattern?: string restrictDefaultExports?: { direct?: boolean named?: boolean defaultFrom?: boolean namedFrom?: boolean namespaceFrom?: boolean } })] // ----- no-restricted-globals ----- type NoRestrictedGlobals = ((string | { name: string message?: string })[] | []|[{ globals: (string | { name: string message?: string })[] checkGlobalObject?: boolean globalObjects?: string[] }]) // ----- no-restricted-imports ----- type NoRestrictedImports = ((string | { name: string message?: string importNames?: string[] allowImportNames?: string[] allowTypeImports?: boolean })[] | []|[{ paths?: (string | { name: string message?: string importNames?: string[] allowImportNames?: string[] allowTypeImports?: boolean })[] patterns?: (string[] | ({ [k: string]: unknown | undefined } | { [k: string]: unknown | undefined })[]) }]) // ----- no-restricted-modules ----- type NoRestrictedModules = ((string | { name: string message?: string })[] | { paths?: (string | { name: string message?: string })[] patterns?: string[] }[]) // ----- no-restricted-properties ----- type NoRestrictedProperties = ({ [k: string]: unknown | undefined } | { [k: string]: unknown | undefined })[] // ----- no-restricted-syntax ----- type NoRestrictedSyntax = (string | { selector: string message?: string })[] // ----- no-return-assign ----- type NoReturnAssign = []|[("except-parens" | "always")] // ----- no-self-assign ----- type NoSelfAssign = []|[{ props?: boolean }] // ----- no-sequences ----- type NoSequences = []|[{ allowInParentheses?: boolean }] // ----- no-shadow ----- type NoShadow = []|[{ builtinGlobals?: boolean hoist?: ("all" | "functions" | "never" | "types" | "functions-and-types") allow?: string[] ignoreOnInitialization?: boolean ignoreTypeValueShadow?: boolean ignoreFunctionTypeParameterNameValueShadow?: boolean }] // ----- no-shadow-restricted-names ----- type NoShadowRestrictedNames = []|[{ reportGlobalThis?: boolean }] // ----- no-sync ----- type NoSync = []|[{ allowAtRootLevel?: boolean }] // ----- no-tabs ----- type NoTabs = []|[{ allowIndentationTabs?: boolean }] // ----- no-trailing-spaces ----- type NoTrailingSpaces = []|[{ skipBlankLines?: boolean ignoreComments?: boolean }] // ----- no-undef ----- type NoUndef = []|[{ typeof?: boolean }] // ----- no-underscore-dangle ----- type NoUnderscoreDangle = []|[{ allow?: string[] allowAfterThis?: boolean allowAfterSuper?: boolean allowAfterThisConstructor?: boolean enforceInMethodNames?: boolean allowFunctionParams?: boolean enforceInClassFields?: boolean allowInArrayDestructuring?: boolean allowInObjectDestructuring?: boolean }] // ----- no-unneeded-ternary ----- type NoUnneededTernary = []|[{ defaultAssignment?: boolean }] // ----- no-unreachable-loop ----- type NoUnreachableLoop = []|[{ ignore?: ("WhileStatement" | "DoWhileStatement" | "ForStatement" | "ForInStatement" | "ForOfStatement")[] }] // ----- no-unsafe-negation ----- type NoUnsafeNegation = []|[{ enforceForOrderingRelations?: boolean }] // ----- no-unsafe-optional-chaining ----- type NoUnsafeOptionalChaining = []|[{ disallowArithmeticOperators?: boolean }] // ----- no-unused-expressions ----- type NoUnusedExpressions = []|[{ allowShortCircuit?: boolean allowTernary?: boolean allowTaggedTemplates?: boolean enforceForJSX?: boolean ignoreDirectives?: boolean }] // ----- no-unused-vars ----- type NoUnusedVars = []|[(("all" | "local") | { vars?: ("all" | "local") varsIgnorePattern?: string args?: ("all" | "after-used" | "none") ignoreRestSiblings?: boolean argsIgnorePattern?: string caughtErrors?: ("all" | "none") caughtErrorsIgnorePattern?: string destructuredArrayIgnorePattern?: string ignoreClassWithStaticInitBlock?: boolean ignoreUsingDeclarations?: boolean reportUsedIgnorePattern?: boolean })] // ----- no-use-before-define ----- type NoUseBeforeDefine = []|[("nofunc" | { functions?: boolean classes?: boolean variables?: boolean allowNamedExports?: boolean enums?: boolean typedefs?: boolean ignoreTypeReferences?: boolean })] // ----- no-useless-computed-key ----- type NoUselessComputedKey = []|[{ enforceForClassMembers?: boolean }] // ----- no-useless-escape ----- type NoUselessEscape = []|[{ allowRegexCharacters?: string[] }] // ----- no-useless-rename ----- type NoUselessRename = []|[{ ignoreDestructuring?: boolean ignoreImport?: boolean ignoreExport?: boolean }] // ----- no-void ----- type NoVoid = []|[{ allowAsStatement?: boolean }] // ----- no-warning-comments ----- type NoWarningComments = []|[{ terms?: string[] location?: ("start" | "anywhere") decoration?: [string, ...(string)[]] }] // ----- nonblock-statement-body-position ----- type NonblockStatementBodyPosition = []|[("beside" | "below" | "any")]|[("beside" | "below" | "any"), { overrides?: { if?: ("beside" | "below" | "any") else?: ("beside" | "below" | "any") while?: ("beside" | "below" | "any") do?: ("beside" | "below" | "any") for?: ("beside" | "below" | "any") } }] // ----- object-curly-newline ----- type ObjectCurlyNewline = []|[((("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 }) })] // ----- object-curly-spacing ----- type ObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), { arraysInObjects?: boolean objectsInObjects?: boolean }] // ----- object-property-newline ----- type ObjectPropertyNewline = []|[{ allowAllPropertiesOnSameLine?: boolean allowMultiplePropertiesPerLine?: boolean }] // ----- object-shorthand ----- type ObjectShorthand = ([]|[("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 }]) // ----- one-var ----- type OneVar = []|[(("always" | "never" | "consecutive") | { separateRequires?: boolean var?: ("always" | "never" | "consecutive") let?: ("always" | "never" | "consecutive") const?: ("always" | "never" | "consecutive") using?: ("always" | "never" | "consecutive") awaitUsing?: ("always" | "never" | "consecutive") } | { initialized?: ("always" | "never" | "consecutive") uninitialized?: ("always" | "never" | "consecutive") })] // ----- one-var-declaration-per-line ----- type OneVarDeclarationPerLine = []|[("always" | "initializations")] // ----- operator-assignment ----- type OperatorAssignment = []|[("always" | "never")] // ----- operator-linebreak ----- type OperatorLinebreak = []|[("after" | "before" | "none" | null)]|[("after" | "before" | "none" | null), { overrides?: { [k: string]: ("after" | "before" | "none" | "ignore") | undefined } }] // ----- padded-blocks ----- type PaddedBlocks = []|[(("always" | "never") | { blocks?: ("always" | "never") switches?: ("always" | "never") classes?: ("always" | "never") })]|[(("always" | "never") | { blocks?: ("always" | "never") switches?: ("always" | "never") classes?: ("always" | "never") }), { allowSingleLineBlocks?: boolean }] // ----- padding-line-between-statements ----- type _PaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always") type _PaddingLineBetweenStatementsStatementType = (("*" | "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 PaddingLineBetweenStatements = { blankLine: _PaddingLineBetweenStatementsPaddingType prev: _PaddingLineBetweenStatementsStatementType next: _PaddingLineBetweenStatementsStatementType }[] // ----- prefer-arrow-callback ----- type PreferArrowCallback = []|[{ allowNamedFunctions?: boolean allowUnboundThis?: boolean }] // ----- prefer-const ----- type PreferConst = []|[{ destructuring?: ("any" | "all") ignoreReadBeforeAssign?: boolean }] // ----- prefer-destructuring ----- type PreferDestructuring = []|[({ VariableDeclarator?: { array?: boolean object?: boolean } AssignmentExpression?: { array?: boolean object?: boolean } } | { array?: boolean object?: boolean })]|[({ VariableDeclarator?: { array?: boolean object?: boolean } AssignmentExpression?: { array?: boolean object?: boolean } } | { array?: boolean object?: boolean }), { enforceForRenamedProperties?: boolean }] // ----- prefer-promise-reject-errors ----- type PreferPromiseRejectErrors = []|[{ allowEmptyReject?: boolean }] // ----- prefer-reflect ----- type PreferReflect = []|[{ exceptions?: ("apply" | "call" | "delete" | "defineProperty" | "getOwnPropertyDescriptor" | "getPrototypeOf" | "setPrototypeOf" | "isExtensible" | "getOwnPropertyNames" | "preventExtensions")[] }] // ----- prefer-regex-literals ----- type PreferRegexLiterals = []|[{ disallowRedundantWrapping?: boolean }] // ----- preserve-caught-error ----- type PreserveCaughtError = []|[{ requireCatchParameter?: boolean }] // ----- quote-props ----- type QuoteProps = ([]|[("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 }]) // ----- quotes ----- type Quotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | { avoidEscape?: boolean allowTemplateLiterals?: boolean })] // ----- radix ----- type Radix = []|[("always" | "as-needed")] // ----- require-atomic-updates ----- type RequireAtomicUpdates = []|[{ allowProperties?: boolean }] // ----- require-unicode-regexp ----- type RequireUnicodeRegexp = []|[{ requireFlag?: ("u" | "v") }] // ----- rest-spread-spacing ----- type RestSpreadSpacing = []|[("always" | "never")] // ----- semi ----- type Semi = ([]|["never"]|["never", { beforeStatementContinuationChars?: ("always" | "any" | "never") }] | []|["always"]|["always", { omitLastInOneLineBlock?: boolean omitLastInOneLineClassBody?: boolean }]) // ----- semi-spacing ----- type SemiSpacing = []|[{ before?: boolean after?: boolean }] // ----- semi-style ----- type SemiStyle = []|[("last" | "first")] // ----- sort-imports ----- type SortImports = []|[{ ignoreCase?: boolean memberSyntaxSortOrder?: [("none" | "all" | "multiple" | "single"), ("none" | "all" | "multiple" | "single"), ("none" | "all" | "multiple" | "single"), ("none" | "all" | "multiple" | "single")] ignoreDeclarationSort?: boolean ignoreMemberSort?: boolean allowSeparatedGroups?: boolean }] // ----- sort-keys ----- type SortKeys = []|[("asc" | "desc")]|[("asc" | "desc"), { caseSensitive?: boolean natural?: boolean minKeys?: number allowLineSeparatedGroups?: boolean ignoreComputedKeys?: boolean }] // ----- sort-vars ----- type SortVars = []|[{ ignoreCase?: boolean }] // ----- space-before-blocks ----- type SpaceBeforeBlocks = []|[(("always" | "never") | { keywords?: ("always" | "never" | "off") functions?: ("always" | "never" | "off") classes?: ("always" | "never" | "off") })] // ----- space-before-function-paren ----- type SpaceBeforeFunctionParen = []|[(("always" | "never") | { anonymous?: ("always" | "never" | "ignore") named?: ("always" | "never" | "ignore") asyncArrow?: ("always" | "never" | "ignore") })] // ----- space-in-parens ----- type SpaceInParens = []|[("always" | "never")]|[("always" | "never"), { exceptions?: ("{}" | "[]" | "()" | "empty")[] }] // ----- space-infix-ops ----- type SpaceInfixOps = []|[{ int32Hint?: boolean }] // ----- space-unary-ops ----- type SpaceUnaryOps = []|[{ words?: boolean nonwords?: boolean overrides?: { [k: string]: boolean | undefined } }] // ----- spaced-comment ----- type SpacedComment = []|[("always" | "never")]|[("always" | "never"), { exceptions?: string[] markers?: string[] line?: { exceptions?: string[] markers?: string[] } block?: { exceptions?: string[] markers?: string[] balanced?: boolean } }] // ----- strict ----- type Strict = []|[("never" | "global" | "function" | "safe")] // ----- switch-colon-spacing ----- type SwitchColonSpacing = []|[{ before?: boolean after?: boolean }] // ----- template-curly-spacing ----- type TemplateCurlySpacing = []|[("always" | "never")] // ----- template-tag-spacing ----- type TemplateTagSpacing = []|[("always" | "never")] // ----- unicode-bom ----- type UnicodeBom = []|[("always" | "never")] // ----- use-isnan ----- type UseIsnan = []|[{ enforceForSwitchCase?: boolean enforceForIndexOf?: boolean }] // ----- valid-typeof ----- type ValidTypeof = []|[{ requireStringLiterals?: boolean }] // ----- wrap-iife ----- type WrapIife = []|[("outside" | "inside" | "any")]|[("outside" | "inside" | "any"), { functionPrototypeMethods?: boolean }] // ----- yield-star-spacing ----- type YieldStarSpacing = []|[(("before" | "after" | "both" | "neither") | { before?: boolean after?: boolean })] // ----- yoda ----- type Yoda = []|[("always" | "never")]|[("always" | "never"), { exceptRange?: boolean onlyEquality?: boolean }] ================================================ FILE: test/output/flat-config-vue.d.ts ================================================ /* eslint-disable */ /* prettier-ignore */ import type { Linter } from 'eslint' declare module 'eslint' { namespace Linter { interface RulesRecord extends RuleOptions {} } } export interface RuleOptions { /** * Enforce linebreaks after opening and before closing array brackets in `