@types/eslint
Advanced tools
Comparing version 8.44.7 to 8.44.8
@@ -877,10 +877,44 @@ /// <reference path="helpers.d.ts" /> | ||
export namespace Linter { | ||
/** | ||
* The numeric severity level for a rule. | ||
* | ||
* - `0` means off. | ||
* - `1` means warn. | ||
* - `2` means error. | ||
* | ||
* @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) | ||
*/ | ||
type Severity = 0 | 1 | 2; | ||
/** | ||
* The human readable severity level for a rule. | ||
* | ||
* @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) | ||
*/ | ||
type StringSeverity = "off" | "warn" | "error"; | ||
/** | ||
* The numeric or human readable severity level for a rule. | ||
* | ||
* @see [Rule Severities](https://eslint.org/docs/latest/use/configure/rules#rule-severities) | ||
*/ | ||
type RuleLevel = Severity | StringSeverity; | ||
/** | ||
* An array containing the rule severity level, followed by the rule options. | ||
* | ||
* @see [Rules](https://eslint.org/docs/user-guide/configuring/rules) | ||
*/ | ||
type RuleLevelAndOptions<Options extends any[] = any[]> = Prepend<Partial<Options>, RuleLevel>; | ||
/** | ||
* The severity level for the rule or an array containing the rule severity level, followed by the rule options. | ||
* | ||
* @see [Rules](https://eslint.org/docs/user-guide/configuring/rules) | ||
*/ | ||
type RuleEntry<Options extends any[] = any[]> = RuleLevel | RuleLevelAndOptions<Options>; | ||
/** | ||
* The rules config object is a key/value map of rule names and their severity and options. | ||
*/ | ||
interface RulesRecord { | ||
@@ -890,2 +924,5 @@ [rule: string]: RuleEntry; | ||
/** | ||
* A configuration object that may have a `rules` block. | ||
*/ | ||
interface HasRules<Rules extends RulesRecord = RulesRecord> { | ||
@@ -895,2 +932,7 @@ rules?: Partial<Rules> | undefined; | ||
/** | ||
* ESLint configuration. | ||
* | ||
* @see [ESLint Configuration](https://eslint.org/docs/latest/user-guide/configuring/) | ||
*/ | ||
interface BaseConfig<Rules extends RulesRecord = RulesRecord, OverrideRules extends RulesRecord = Rules> | ||
@@ -900,20 +942,103 @@ extends HasRules<Rules> | ||
$schema?: string | undefined; | ||
/** | ||
* An environment provides predefined global variables. | ||
* | ||
* @see [Environments](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-environments) | ||
*/ | ||
env?: { [name: string]: boolean } | undefined; | ||
/** | ||
* Extending configuration files. | ||
* | ||
* @see [Extends](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#extending-configuration-files) | ||
*/ | ||
extends?: string | string[] | undefined; | ||
/** | ||
* Specifying globals. | ||
* | ||
* @see [Globals](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-globals) | ||
*/ | ||
globals?: { [name: string]: boolean | "off" | "readonly" | "readable" | "writable" | "writeable" } | undefined; | ||
/** | ||
* Disable processing of inline comments. | ||
* | ||
* @see [Disabling Inline Comments](https://eslint.org/docs/latest/user-guide/configuring/rules#disabling-inline-comments) | ||
*/ | ||
noInlineConfig?: boolean | undefined; | ||
/** | ||
* Overrides can be used to use a differing configuration for matching sub-directories and files. | ||
* | ||
* @see [How do overrides work](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#how-do-overrides-work) | ||
*/ | ||
overrides?: Array<ConfigOverride<OverrideRules>> | undefined; | ||
/** | ||
* Parser. | ||
* | ||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/developer-guide/working-with-custom-parsers) | ||
* @see [Specifying Parser](https://eslint.org/docs/latest/user-guide/configuring/plugins#configure-a-parser) | ||
*/ | ||
parser?: string | undefined; | ||
/** | ||
* Parser options. | ||
* | ||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/developer-guide/working-with-custom-parsers) | ||
* @see [Specifying Parser Options](https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options) | ||
*/ | ||
parserOptions?: ParserOptions | undefined; | ||
/** | ||
* Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use. | ||
* | ||
* @see [Configuring Plugins](https://eslint.org/docs/latest/user-guide/configuring/plugins#configure-plugins) | ||
*/ | ||
plugins?: string[] | undefined; | ||
/** | ||
* Specifying processor. | ||
* | ||
* @see [processor](https://eslint.org/docs/latest/user-guide/configuring/plugins#specify-a-processor) | ||
*/ | ||
processor?: string | undefined; | ||
/** | ||
* Report unused `ESLint-disable` comments as warning. | ||
* | ||
* @see [Report unused `ESLint-disable` comments](https://eslint.org/docs/latest/user-guide/configuring/rules#report-unused-eslint-disable-comments) | ||
*/ | ||
reportUnusedDisableDirectives?: boolean | undefined; | ||
/** | ||
* Settings. | ||
* | ||
* @see [Settings](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#adding-shared-settings) | ||
*/ | ||
settings?: { [name: string]: any } | undefined; | ||
} | ||
/** | ||
* The overwrites that apply more differing configuration to specific files or directories. | ||
*/ | ||
interface ConfigOverride<Rules extends RulesRecord = RulesRecord> extends BaseConfig<Rules> { | ||
/** | ||
* The glob patterns for excluded files. | ||
*/ | ||
excludedFiles?: string | string[] | undefined; | ||
/** | ||
* The glob patterns for target files. | ||
*/ | ||
files: string | string[]; | ||
} | ||
/** | ||
* ESLint configuration. | ||
* | ||
* @see [ESLint Configuration](https://eslint.org/docs/latest/user-guide/configuring/) | ||
*/ | ||
// https://github.com/eslint/eslint/blob/v6.8.0/conf/config-schema.js | ||
@@ -923,7 +1048,36 @@ interface Config<Rules extends RulesRecord = RulesRecord, OverrideRules extends RulesRecord = Rules> | ||
{ | ||
/** | ||
* Tell ESLint to ignore specific files and directories. | ||
* | ||
* @see [Ignore Patterns](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code) | ||
*/ | ||
ignorePatterns?: string | string[] | undefined; | ||
/** | ||
* @see [Using Configuration Files](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#using-configuration-files) | ||
*/ | ||
root?: boolean | undefined; | ||
} | ||
/** | ||
* Parser options. | ||
* | ||
* @see [Specifying Parser Options](https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options) | ||
*/ | ||
interface ParserOptions { | ||
/** | ||
* Accepts any valid ECMAScript version number or `'latest'`: | ||
* | ||
* - A version: es3, es5, es6, es7, es8, es9, es10, es11, es12, es13, es14, ..., or | ||
* - A year: es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022, es2023, ..., or | ||
* - `'latest'` | ||
* | ||
* When it's a version or a year, the value must be a number - so do not include the `es` prefix. | ||
* | ||
* Specifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default | ||
* | ||
* @default 2018 | ||
* | ||
* @see https://typescript-eslint.io/architecture/parser/#ecmaversion | ||
*/ | ||
ecmaVersion?: | ||
@@ -954,3 +1108,18 @@ | 3 | ||
| undefined; | ||
/** | ||
* Set to "script" (default) or "module" if your code is in ECMAScript modules. | ||
* | ||
* @default 'script' | ||
* | ||
* @see https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options | ||
*/ | ||
sourceType?: "script" | "module" | undefined; | ||
/** | ||
* An object indicating which additional language features you'd like to use. | ||
* | ||
* @see https://eslint.org/docs/latest/user-guide/configuring/language-options#specifying-parser-options | ||
* @see https://typescript-eslint.io/architecture/parser#ecmafeatures | ||
*/ | ||
ecmaFeatures?: { | ||
@@ -1053,2 +1222,3 @@ globalReturn?: boolean | undefined; | ||
files?: Array<FlatConfigFileSpec | FlatConfigFileSpec[]>; | ||
/** | ||
@@ -1060,2 +1230,3 @@ * An array of glob patterns indicating the files that the configuration | ||
ignores?: FlatConfigFileSpec[]; | ||
/** | ||
@@ -1072,2 +1243,3 @@ * An object containing settings related to how JavaScript is configured for | ||
ecmaVersion?: ParserOptions["ecmaVersion"]; | ||
/** | ||
@@ -1080,2 +1252,3 @@ * The type of JavaScript source code. Possible values are "script" for | ||
sourceType?: "script" | "module" | "commonjs"; | ||
/** | ||
@@ -1086,2 +1259,3 @@ * An object specifying additional objects that should be added to the | ||
globals?: ESLint.Environment["globals"]; | ||
/** | ||
@@ -1092,2 +1266,3 @@ * An object containing a parse() or parseForESLint() method. | ||
parser?: ParserModule; | ||
/** | ||
@@ -1099,2 +1274,3 @@ * An object specifying additional options that are passed directly to the | ||
}; | ||
/** | ||
@@ -1105,7 +1281,8 @@ * An object containing settings related to the linting process | ||
/** | ||
* A Boolean value indicating if inline configuration is allowed. | ||
* A boolean value indicating if inline configuration is allowed. | ||
*/ | ||
noInlineConfig?: boolean; | ||
/** | ||
* A Boolean value indicating if unused disable directives should be | ||
* A boolean value indicating if unused disable directives should be | ||
* tracked and reported. | ||
@@ -1115,2 +1292,3 @@ */ | ||
}; | ||
/** | ||
@@ -1122,2 +1300,3 @@ * Either an object containing preprocess() and postprocess() methods or a | ||
processor?: string | Processor; | ||
/** | ||
@@ -1128,2 +1307,3 @@ * An object containing a name-value mapping of plugin names to plugin objects. | ||
plugins?: Record<string, ESLint.Plugin>; | ||
/** | ||
@@ -1134,2 +1314,3 @@ * An object containing the configured rules. When files or ignores are specified, | ||
rules?: RulesRecord; | ||
/** | ||
@@ -1136,0 +1317,0 @@ * An object containing name-value pairs of information that should be |
{ | ||
"name": "@types/eslint", | ||
"version": "8.44.7", | ||
"version": "8.44.8", | ||
"description": "TypeScript definitions for eslint", | ||
@@ -63,4 +63,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint", | ||
}, | ||
"typesPublisherContentHash": "facea692714088a94ef6a014a4a7fc3cb11893272d6f0cdea27862748165784a", | ||
"typeScriptVersion": "4.5" | ||
"typesPublisherContentHash": "44bd32a5a3f42ae64eebe679c666f41132e6db4a5fdfd5ce128c6746524195d0", | ||
"typeScriptVersion": "4.6" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 06 Nov 2023 22:41:05 GMT | ||
* Last updated: Thu, 30 Nov 2023 01:30:56 GMT | ||
* Dependencies: [@types/estree](https://npmjs.com/package/@types/estree), [@types/json-schema](https://npmjs.com/package/@types/json-schema) | ||
@@ -14,0 +14,0 @@ |
185006
5475