Update Bot (j'ai plus le repo sur GitHub)
Qui c'est la conne qui a delete le repo sur GitHub? C'EST MOIIIII
This commit is contained in:
360
node_modules/@eslint/core/dist/cjs/types.d.cts
generated
vendored
360
node_modules/@eslint/core/dist/cjs/types.d.cts
generated
vendored
@@ -117,7 +117,7 @@ export interface RulesMeta<MessageIds extends string = string, RuleOptions = unk
|
||||
schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
|
||||
/**
|
||||
* Any default options to be recursively merged on top of any user-provided options.
|
||||
**/
|
||||
*/
|
||||
defaultOptions?: RuleOptions;
|
||||
/**
|
||||
* The messages that the rule can report.
|
||||
@@ -371,17 +371,12 @@ export interface RuleTextEdit {
|
||||
* @param fixer The text editor to apply the fix.
|
||||
* @returns The fix(es) for the violation.
|
||||
*/
|
||||
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
interface ViolationReportBase {
|
||||
/**
|
||||
* The type of node that the violation is for.
|
||||
* @deprecated May be removed in the future.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
export type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
export interface ViolationReportBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
data?: Record<string, unknown> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the violation.
|
||||
*/
|
||||
@@ -392,28 +387,28 @@ interface ViolationReportBase {
|
||||
*/
|
||||
suggest?: SuggestedEdit[] | null | undefined;
|
||||
}
|
||||
type ViolationMessage<MessageIds = string> = {
|
||||
export type ViolationMessage<MessageIds = string> = {
|
||||
message: string;
|
||||
} | {
|
||||
messageId: MessageIds;
|
||||
};
|
||||
type ViolationLocation<Node> = {
|
||||
export type ViolationLocation<Node> = {
|
||||
loc: SourceLocation | Position;
|
||||
} | {
|
||||
node: Node;
|
||||
};
|
||||
export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
|
||||
interface SuggestedEditBase {
|
||||
export interface SuggestedEditBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
data?: Record<string, unknown> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the suggestion.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
fix: RuleFixer;
|
||||
}
|
||||
type SuggestionMessage = {
|
||||
export type SuggestionMessage = {
|
||||
desc: string;
|
||||
} | {
|
||||
messageId: string;
|
||||
@@ -422,6 +417,49 @@ type SuggestionMessage = {
|
||||
* A suggested edit for a rule violation.
|
||||
*/
|
||||
export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
|
||||
/**
|
||||
* The normalized version of a lint suggestion.
|
||||
*/
|
||||
export interface LintSuggestion {
|
||||
/** A short description. */
|
||||
desc: string;
|
||||
/** Fix result info. */
|
||||
fix: RuleTextEdit;
|
||||
/** Id referencing a message for the description. */
|
||||
messageId?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* The normalized version of a lint violation message.
|
||||
*/
|
||||
export interface LintMessage {
|
||||
/** The 1-based column number. */
|
||||
column: number;
|
||||
/** The 1-based line number. */
|
||||
line: number;
|
||||
/** The 1-based column number of the end location. */
|
||||
endColumn?: number | undefined;
|
||||
/** The 1-based line number of the end location. */
|
||||
endLine?: number | undefined;
|
||||
/** The ID of the rule which makes this message. */
|
||||
ruleId: string | null;
|
||||
/** The reported message. */
|
||||
message: string;
|
||||
/** The ID of the message in the rule's meta. */
|
||||
messageId?: string | undefined;
|
||||
/**
|
||||
* Type of node.
|
||||
* @deprecated `nodeType` is deprecated and will be removed in the next major version.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
/** If `true` then this is a fatal error. */
|
||||
fatal?: true | undefined;
|
||||
/** The severity of this message. */
|
||||
severity: Exclude<SeverityLevel, 0>;
|
||||
/** Information for autofix. */
|
||||
fix?: RuleTextEdit | undefined;
|
||||
/** Information for suggestions. */
|
||||
suggestions?: LintSuggestion[] | undefined;
|
||||
}
|
||||
/**
|
||||
* Generic options for the `RuleDefinition` type.
|
||||
*/
|
||||
@@ -498,6 +536,19 @@ export type SeverityLevel = 0 | 1 | 2;
|
||||
* The severity of a rule in a configuration.
|
||||
*/
|
||||
export type Severity = SeverityName | SeverityLevel;
|
||||
/**
|
||||
* Represents the metadata for an object, such as a plugin or processor.
|
||||
*/
|
||||
export interface ObjectMetaProperties {
|
||||
/** @deprecated Use `meta.name` instead. */
|
||||
name?: string | undefined;
|
||||
/** @deprecated Use `meta.version` instead. */
|
||||
version?: string | undefined;
|
||||
meta?: {
|
||||
name?: string | undefined;
|
||||
version?: string | undefined;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Represents the configuration options for the core linter.
|
||||
*/
|
||||
@@ -532,6 +583,285 @@ export interface RulesConfig {
|
||||
export interface SettingsConfig {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
/**
|
||||
* The configuration for a set of files.
|
||||
*/
|
||||
export interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
|
||||
/**
|
||||
* A string to identify the configuration object. Used in error messages and
|
||||
* inspection tools.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Path to the directory where the configuration object should apply.
|
||||
* `files` and `ignores` patterns in the configuration object are
|
||||
* interpreted as relative to this path.
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* An array of glob patterns indicating the files that the configuration
|
||||
* object should apply to. If not specified, the configuration object applies
|
||||
* to all files
|
||||
*/
|
||||
files?: (string | string[])[];
|
||||
/**
|
||||
* An array of glob patterns indicating the files that the configuration
|
||||
* object should not apply to. If not specified, the configuration object
|
||||
* applies to all files matched by files
|
||||
*/
|
||||
ignores?: string[];
|
||||
/**
|
||||
* The name of the language used for linting. This is used to determine the
|
||||
* parser and other language-specific settings.
|
||||
* @since 9.7.0
|
||||
*/
|
||||
language?: string;
|
||||
/**
|
||||
* An object containing settings related to how the language is configured for
|
||||
* linting.
|
||||
*/
|
||||
languageOptions?: LanguageOptions;
|
||||
/**
|
||||
* An object containing settings related to the linting process
|
||||
*/
|
||||
linterOptions?: LinterOptionsConfig;
|
||||
/**
|
||||
* Either an object containing preprocess() and postprocess() methods or a
|
||||
* string indicating the name of a processor inside of a plugin
|
||||
* (i.e., "pluginName/processorName").
|
||||
*/
|
||||
processor?: string | Processor;
|
||||
/**
|
||||
* An object containing a name-value mapping of plugin names to plugin objects.
|
||||
* When files is specified, these plugins are only available to the matching files.
|
||||
*/
|
||||
plugins?: Record<string, Plugin>;
|
||||
/**
|
||||
* An object containing the configured rules. When files or ignores are specified,
|
||||
* these rule configurations are only available to the matching files.
|
||||
*/
|
||||
rules?: Partial<Rules>;
|
||||
/**
|
||||
* An object containing name-value pairs of information that should be
|
||||
* available to all rules.
|
||||
*/
|
||||
settings?: Record<string, unknown>;
|
||||
}
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export interface GlobalsConfig {
|
||||
[name: string]: GlobalAccess;
|
||||
}
|
||||
/**
|
||||
* The ECMAScript version of the code being linted.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
*/
|
||||
export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest";
|
||||
/**
|
||||
* The type of JavaScript source code.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
*/
|
||||
export type JavaScriptSourceType = "script" | "module" | "commonjs";
|
||||
/**
|
||||
* Parser options.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
* @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
|
||||
*/
|
||||
export interface JavaScriptParserOptionsConfig {
|
||||
/**
|
||||
* Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allowReserved?: boolean | undefined;
|
||||
/**
|
||||
* 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 5
|
||||
*/
|
||||
ecmaVersion?: EcmaVersion | undefined;
|
||||
/**
|
||||
* The type of JavaScript source code. Possible values are "script" for
|
||||
* traditional script files, "module" for ECMAScript modules (ESM), and
|
||||
* "commonjs" for CommonJS files.
|
||||
*
|
||||
* @default 'script'
|
||||
*
|
||||
* @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
|
||||
*/
|
||||
sourceType?: JavaScriptSourceType | undefined;
|
||||
/**
|
||||
* An object indicating which additional language features you'd like to use.
|
||||
*
|
||||
* @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
|
||||
*/
|
||||
ecmaFeatures?: {
|
||||
globalReturn?: boolean | undefined;
|
||||
impliedStrict?: boolean | undefined;
|
||||
jsx?: boolean | undefined;
|
||||
experimentalObjectRestSpread?: boolean | undefined;
|
||||
[key: string]: any;
|
||||
} | undefined;
|
||||
[key: string]: any;
|
||||
}
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export interface EnvironmentConfig {
|
||||
/** The definition of global variables. */
|
||||
globals?: GlobalsConfig | undefined;
|
||||
/** The parser options that will be enabled under this environment. */
|
||||
parserOptions?: JavaScriptParserOptionsConfig | undefined;
|
||||
}
|
||||
/**
|
||||
* A configuration object that may have a `rules` block.
|
||||
*/
|
||||
export interface HasRules<Rules extends RulesConfig = RulesConfig> {
|
||||
rules?: Partial<Rules> | undefined;
|
||||
}
|
||||
/**
|
||||
* ESLint legacy configuration.
|
||||
*
|
||||
* @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
|
||||
*/
|
||||
export interface BaseConfig<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends HasRules<Rules> {
|
||||
$schema?: string | undefined;
|
||||
/**
|
||||
* An environment provides predefined global variables.
|
||||
*
|
||||
* @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
|
||||
*/
|
||||
env?: {
|
||||
[name: string]: boolean;
|
||||
} | undefined;
|
||||
/**
|
||||
* Extending configuration files.
|
||||
*
|
||||
* @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
|
||||
*/
|
||||
extends?: string | string[] | undefined;
|
||||
/**
|
||||
* Specifying globals.
|
||||
*
|
||||
* @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
|
||||
*/
|
||||
globals?: GlobalsConfig | undefined;
|
||||
/**
|
||||
* Disable processing of inline comments.
|
||||
*
|
||||
* @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#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/use/configure/configuration-files-deprecated#how-do-overrides-work)
|
||||
*/
|
||||
overrides?: ConfigOverride<OverrideRules>[] | undefined;
|
||||
/**
|
||||
* Parser.
|
||||
*
|
||||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
|
||||
* @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
|
||||
*/
|
||||
parser?: string | undefined;
|
||||
/**
|
||||
* Parser options.
|
||||
*
|
||||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
|
||||
* @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
|
||||
*/
|
||||
parserOptions?: JavaScriptParserOptionsConfig | undefined;
|
||||
/**
|
||||
* Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
|
||||
*
|
||||
* @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
|
||||
*/
|
||||
plugins?: string[] | undefined;
|
||||
/**
|
||||
* Specifying processor.
|
||||
*
|
||||
* @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
|
||||
*/
|
||||
processor?: string | undefined;
|
||||
/**
|
||||
* Report unused eslint-disable comments as warning.
|
||||
*
|
||||
* @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
|
||||
*/
|
||||
reportUnusedDisableDirectives?: boolean | undefined;
|
||||
/**
|
||||
* Settings.
|
||||
*
|
||||
* @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
|
||||
*/
|
||||
settings?: SettingsConfig | undefined;
|
||||
}
|
||||
/**
|
||||
* The overwrites that apply more differing configuration to specific files or directories.
|
||||
*/
|
||||
export interface ConfigOverride<Rules extends RulesConfig = RulesConfig> extends BaseConfig<Rules> {
|
||||
/**
|
||||
* The glob patterns for excluded files.
|
||||
*/
|
||||
excludedFiles?: string | string[] | undefined;
|
||||
/**
|
||||
* The glob patterns for target files.
|
||||
*/
|
||||
files: string | string[];
|
||||
}
|
||||
/**
|
||||
* ESLint legacy configuration.
|
||||
*
|
||||
* @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
|
||||
*/
|
||||
export interface LegacyConfigObject<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends BaseConfig<Rules, OverrideRules> {
|
||||
/**
|
||||
* Tell ESLint to ignore specific files and directories.
|
||||
*
|
||||
* @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
|
||||
*/
|
||||
ignorePatterns?: string | string[] | undefined;
|
||||
/**
|
||||
* @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
|
||||
*/
|
||||
root?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* File information passed to a processor.
|
||||
*/
|
||||
export interface ProcessorFile {
|
||||
text: string;
|
||||
filename: string;
|
||||
}
|
||||
/**
|
||||
* A processor is an object that can preprocess and postprocess files.
|
||||
*/
|
||||
export interface Processor<T extends string | ProcessorFile = string | ProcessorFile> extends ObjectMetaProperties {
|
||||
/** If `true` then it means the processor supports autofix. */
|
||||
supportsAutofix?: boolean | undefined;
|
||||
/** The function to extract code blocks. */
|
||||
preprocess?(text: string, filename: string): T[];
|
||||
/** The function to merge messages. */
|
||||
postprocess?(messages: LintMessage[][], filename: string): LintMessage[];
|
||||
}
|
||||
export interface Plugin extends ObjectMetaProperties {
|
||||
meta?: ObjectMetaProperties["meta"] & {
|
||||
namespace?: string | undefined;
|
||||
};
|
||||
configs?: Record<string, LegacyConfigObject | ConfigObject | ConfigObject[]> | undefined;
|
||||
environments?: Record<string, EnvironmentConfig> | undefined;
|
||||
languages?: Record<string, Language> | undefined;
|
||||
processors?: Record<string, Processor> | undefined;
|
||||
rules?: Record<string, RuleDefinition> | undefined;
|
||||
}
|
||||
/**
|
||||
* Generic options for the `Language` type.
|
||||
*/
|
||||
|
||||
360
node_modules/@eslint/core/dist/esm/types.d.ts
generated
vendored
360
node_modules/@eslint/core/dist/esm/types.d.ts
generated
vendored
@@ -117,7 +117,7 @@ export interface RulesMeta<MessageIds extends string = string, RuleOptions = unk
|
||||
schema?: JSONSchema4 | JSONSchema4[] | false | undefined;
|
||||
/**
|
||||
* Any default options to be recursively merged on top of any user-provided options.
|
||||
**/
|
||||
*/
|
||||
defaultOptions?: RuleOptions;
|
||||
/**
|
||||
* The messages that the rule can report.
|
||||
@@ -371,17 +371,12 @@ export interface RuleTextEdit {
|
||||
* @param fixer The text editor to apply the fix.
|
||||
* @returns The fix(es) for the violation.
|
||||
*/
|
||||
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
interface ViolationReportBase {
|
||||
/**
|
||||
* The type of node that the violation is for.
|
||||
* @deprecated May be removed in the future.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
export type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
||||
export interface ViolationReportBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
data?: Record<string, unknown> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the violation.
|
||||
*/
|
||||
@@ -392,28 +387,28 @@ interface ViolationReportBase {
|
||||
*/
|
||||
suggest?: SuggestedEdit[] | null | undefined;
|
||||
}
|
||||
type ViolationMessage<MessageIds = string> = {
|
||||
export type ViolationMessage<MessageIds = string> = {
|
||||
message: string;
|
||||
} | {
|
||||
messageId: MessageIds;
|
||||
};
|
||||
type ViolationLocation<Node> = {
|
||||
export type ViolationLocation<Node> = {
|
||||
loc: SourceLocation | Position;
|
||||
} | {
|
||||
node: Node;
|
||||
};
|
||||
export type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
|
||||
interface SuggestedEditBase {
|
||||
export interface SuggestedEditBase {
|
||||
/**
|
||||
* The data to insert into the message.
|
||||
*/
|
||||
data?: Record<string, string> | undefined;
|
||||
data?: Record<string, unknown> | undefined;
|
||||
/**
|
||||
* The fix to be applied for the suggestion.
|
||||
*/
|
||||
fix?: RuleFixer | null | undefined;
|
||||
fix: RuleFixer;
|
||||
}
|
||||
type SuggestionMessage = {
|
||||
export type SuggestionMessage = {
|
||||
desc: string;
|
||||
} | {
|
||||
messageId: string;
|
||||
@@ -422,6 +417,49 @@ type SuggestionMessage = {
|
||||
* A suggested edit for a rule violation.
|
||||
*/
|
||||
export type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
|
||||
/**
|
||||
* The normalized version of a lint suggestion.
|
||||
*/
|
||||
export interface LintSuggestion {
|
||||
/** A short description. */
|
||||
desc: string;
|
||||
/** Fix result info. */
|
||||
fix: RuleTextEdit;
|
||||
/** Id referencing a message for the description. */
|
||||
messageId?: string | undefined;
|
||||
}
|
||||
/**
|
||||
* The normalized version of a lint violation message.
|
||||
*/
|
||||
export interface LintMessage {
|
||||
/** The 1-based column number. */
|
||||
column: number;
|
||||
/** The 1-based line number. */
|
||||
line: number;
|
||||
/** The 1-based column number of the end location. */
|
||||
endColumn?: number | undefined;
|
||||
/** The 1-based line number of the end location. */
|
||||
endLine?: number | undefined;
|
||||
/** The ID of the rule which makes this message. */
|
||||
ruleId: string | null;
|
||||
/** The reported message. */
|
||||
message: string;
|
||||
/** The ID of the message in the rule's meta. */
|
||||
messageId?: string | undefined;
|
||||
/**
|
||||
* Type of node.
|
||||
* @deprecated `nodeType` is deprecated and will be removed in the next major version.
|
||||
*/
|
||||
nodeType?: string | undefined;
|
||||
/** If `true` then this is a fatal error. */
|
||||
fatal?: true | undefined;
|
||||
/** The severity of this message. */
|
||||
severity: Exclude<SeverityLevel, 0>;
|
||||
/** Information for autofix. */
|
||||
fix?: RuleTextEdit | undefined;
|
||||
/** Information for suggestions. */
|
||||
suggestions?: LintSuggestion[] | undefined;
|
||||
}
|
||||
/**
|
||||
* Generic options for the `RuleDefinition` type.
|
||||
*/
|
||||
@@ -498,6 +536,19 @@ export type SeverityLevel = 0 | 1 | 2;
|
||||
* The severity of a rule in a configuration.
|
||||
*/
|
||||
export type Severity = SeverityName | SeverityLevel;
|
||||
/**
|
||||
* Represents the metadata for an object, such as a plugin or processor.
|
||||
*/
|
||||
export interface ObjectMetaProperties {
|
||||
/** @deprecated Use `meta.name` instead. */
|
||||
name?: string | undefined;
|
||||
/** @deprecated Use `meta.version` instead. */
|
||||
version?: string | undefined;
|
||||
meta?: {
|
||||
name?: string | undefined;
|
||||
version?: string | undefined;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Represents the configuration options for the core linter.
|
||||
*/
|
||||
@@ -532,6 +583,285 @@ export interface RulesConfig {
|
||||
export interface SettingsConfig {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
/**
|
||||
* The configuration for a set of files.
|
||||
*/
|
||||
export interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
|
||||
/**
|
||||
* A string to identify the configuration object. Used in error messages and
|
||||
* inspection tools.
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Path to the directory where the configuration object should apply.
|
||||
* `files` and `ignores` patterns in the configuration object are
|
||||
* interpreted as relative to this path.
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* An array of glob patterns indicating the files that the configuration
|
||||
* object should apply to. If not specified, the configuration object applies
|
||||
* to all files
|
||||
*/
|
||||
files?: (string | string[])[];
|
||||
/**
|
||||
* An array of glob patterns indicating the files that the configuration
|
||||
* object should not apply to. If not specified, the configuration object
|
||||
* applies to all files matched by files
|
||||
*/
|
||||
ignores?: string[];
|
||||
/**
|
||||
* The name of the language used for linting. This is used to determine the
|
||||
* parser and other language-specific settings.
|
||||
* @since 9.7.0
|
||||
*/
|
||||
language?: string;
|
||||
/**
|
||||
* An object containing settings related to how the language is configured for
|
||||
* linting.
|
||||
*/
|
||||
languageOptions?: LanguageOptions;
|
||||
/**
|
||||
* An object containing settings related to the linting process
|
||||
*/
|
||||
linterOptions?: LinterOptionsConfig;
|
||||
/**
|
||||
* Either an object containing preprocess() and postprocess() methods or a
|
||||
* string indicating the name of a processor inside of a plugin
|
||||
* (i.e., "pluginName/processorName").
|
||||
*/
|
||||
processor?: string | Processor;
|
||||
/**
|
||||
* An object containing a name-value mapping of plugin names to plugin objects.
|
||||
* When files is specified, these plugins are only available to the matching files.
|
||||
*/
|
||||
plugins?: Record<string, Plugin>;
|
||||
/**
|
||||
* An object containing the configured rules. When files or ignores are specified,
|
||||
* these rule configurations are only available to the matching files.
|
||||
*/
|
||||
rules?: Partial<Rules>;
|
||||
/**
|
||||
* An object containing name-value pairs of information that should be
|
||||
* available to all rules.
|
||||
*/
|
||||
settings?: Record<string, unknown>;
|
||||
}
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export interface GlobalsConfig {
|
||||
[name: string]: GlobalAccess;
|
||||
}
|
||||
/**
|
||||
* The ECMAScript version of the code being linted.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
*/
|
||||
export type EcmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest";
|
||||
/**
|
||||
* The type of JavaScript source code.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
*/
|
||||
export type JavaScriptSourceType = "script" | "module" | "commonjs";
|
||||
/**
|
||||
* Parser options.
|
||||
* @deprecated Only supported in legacy eslintrc config format.
|
||||
* @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
|
||||
*/
|
||||
export interface JavaScriptParserOptionsConfig {
|
||||
/**
|
||||
* Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
allowReserved?: boolean | undefined;
|
||||
/**
|
||||
* 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 5
|
||||
*/
|
||||
ecmaVersion?: EcmaVersion | undefined;
|
||||
/**
|
||||
* The type of JavaScript source code. Possible values are "script" for
|
||||
* traditional script files, "module" for ECMAScript modules (ESM), and
|
||||
* "commonjs" for CommonJS files.
|
||||
*
|
||||
* @default 'script'
|
||||
*
|
||||
* @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
|
||||
*/
|
||||
sourceType?: JavaScriptSourceType | undefined;
|
||||
/**
|
||||
* An object indicating which additional language features you'd like to use.
|
||||
*
|
||||
* @see https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options
|
||||
*/
|
||||
ecmaFeatures?: {
|
||||
globalReturn?: boolean | undefined;
|
||||
impliedStrict?: boolean | undefined;
|
||||
jsx?: boolean | undefined;
|
||||
experimentalObjectRestSpread?: boolean | undefined;
|
||||
[key: string]: any;
|
||||
} | undefined;
|
||||
[key: string]: any;
|
||||
}
|
||||
/** @deprecated Only supported in legacy eslintrc config format. */
|
||||
export interface EnvironmentConfig {
|
||||
/** The definition of global variables. */
|
||||
globals?: GlobalsConfig | undefined;
|
||||
/** The parser options that will be enabled under this environment. */
|
||||
parserOptions?: JavaScriptParserOptionsConfig | undefined;
|
||||
}
|
||||
/**
|
||||
* A configuration object that may have a `rules` block.
|
||||
*/
|
||||
export interface HasRules<Rules extends RulesConfig = RulesConfig> {
|
||||
rules?: Partial<Rules> | undefined;
|
||||
}
|
||||
/**
|
||||
* ESLint legacy configuration.
|
||||
*
|
||||
* @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
|
||||
*/
|
||||
export interface BaseConfig<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends HasRules<Rules> {
|
||||
$schema?: string | undefined;
|
||||
/**
|
||||
* An environment provides predefined global variables.
|
||||
*
|
||||
* @see [Environments](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-environments)
|
||||
*/
|
||||
env?: {
|
||||
[name: string]: boolean;
|
||||
} | undefined;
|
||||
/**
|
||||
* Extending configuration files.
|
||||
*
|
||||
* @see [Extends](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#extending-configuration-files)
|
||||
*/
|
||||
extends?: string | string[] | undefined;
|
||||
/**
|
||||
* Specifying globals.
|
||||
*
|
||||
* @see [Globals](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-globals)
|
||||
*/
|
||||
globals?: GlobalsConfig | undefined;
|
||||
/**
|
||||
* Disable processing of inline comments.
|
||||
*
|
||||
* @see [Disabling Inline Comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#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/use/configure/configuration-files-deprecated#how-do-overrides-work)
|
||||
*/
|
||||
overrides?: ConfigOverride<OverrideRules>[] | undefined;
|
||||
/**
|
||||
* Parser.
|
||||
*
|
||||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
|
||||
* @see [Specifying Parser](https://eslint.org/docs/latest/use/configure/parser-deprecated)
|
||||
*/
|
||||
parser?: string | undefined;
|
||||
/**
|
||||
* Parser options.
|
||||
*
|
||||
* @see [Working with Custom Parsers](https://eslint.org/docs/latest/extend/custom-parsers)
|
||||
* @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options-deprecated#specifying-parser-options)
|
||||
*/
|
||||
parserOptions?: JavaScriptParserOptionsConfig | undefined;
|
||||
/**
|
||||
* Which third-party plugins define additional rules, environments, configs, etc. for ESLint to use.
|
||||
*
|
||||
* @see [Configuring Plugins](https://eslint.org/docs/latest/use/configure/plugins-deprecated#configure-plugins)
|
||||
*/
|
||||
plugins?: string[] | undefined;
|
||||
/**
|
||||
* Specifying processor.
|
||||
*
|
||||
* @see [processor](https://eslint.org/docs/latest/use/configure/plugins-deprecated#specify-a-processor)
|
||||
*/
|
||||
processor?: string | undefined;
|
||||
/**
|
||||
* Report unused eslint-disable comments as warning.
|
||||
*
|
||||
* @see [Report unused eslint-disable comments](https://eslint.org/docs/latest/use/configure/rules-deprecated#report-unused-eslint-disable-comments)
|
||||
*/
|
||||
reportUnusedDisableDirectives?: boolean | undefined;
|
||||
/**
|
||||
* Settings.
|
||||
*
|
||||
* @see [Settings](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#adding-shared-settings)
|
||||
*/
|
||||
settings?: SettingsConfig | undefined;
|
||||
}
|
||||
/**
|
||||
* The overwrites that apply more differing configuration to specific files or directories.
|
||||
*/
|
||||
export interface ConfigOverride<Rules extends RulesConfig = RulesConfig> extends BaseConfig<Rules> {
|
||||
/**
|
||||
* The glob patterns for excluded files.
|
||||
*/
|
||||
excludedFiles?: string | string[] | undefined;
|
||||
/**
|
||||
* The glob patterns for target files.
|
||||
*/
|
||||
files: string | string[];
|
||||
}
|
||||
/**
|
||||
* ESLint legacy configuration.
|
||||
*
|
||||
* @see [ESLint Legacy Configuration](https://eslint.org/docs/latest/use/configure/)
|
||||
*/
|
||||
export interface LegacyConfigObject<Rules extends RulesConfig = RulesConfig, OverrideRules extends RulesConfig = Rules> extends BaseConfig<Rules, OverrideRules> {
|
||||
/**
|
||||
* Tell ESLint to ignore specific files and directories.
|
||||
*
|
||||
* @see [Ignore Patterns](https://eslint.org/docs/latest/use/configure/ignore-deprecated#ignorepatterns-in-config-files)
|
||||
*/
|
||||
ignorePatterns?: string | string[] | undefined;
|
||||
/**
|
||||
* @see [Using Configuration Files](https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-configuration-files)
|
||||
*/
|
||||
root?: boolean | undefined;
|
||||
}
|
||||
/**
|
||||
* File information passed to a processor.
|
||||
*/
|
||||
export interface ProcessorFile {
|
||||
text: string;
|
||||
filename: string;
|
||||
}
|
||||
/**
|
||||
* A processor is an object that can preprocess and postprocess files.
|
||||
*/
|
||||
export interface Processor<T extends string | ProcessorFile = string | ProcessorFile> extends ObjectMetaProperties {
|
||||
/** If `true` then it means the processor supports autofix. */
|
||||
supportsAutofix?: boolean | undefined;
|
||||
/** The function to extract code blocks. */
|
||||
preprocess?(text: string, filename: string): T[];
|
||||
/** The function to merge messages. */
|
||||
postprocess?(messages: LintMessage[][], filename: string): LintMessage[];
|
||||
}
|
||||
export interface Plugin extends ObjectMetaProperties {
|
||||
meta?: ObjectMetaProperties["meta"] & {
|
||||
namespace?: string | undefined;
|
||||
};
|
||||
configs?: Record<string, LegacyConfigObject | ConfigObject | ConfigObject[]> | undefined;
|
||||
environments?: Record<string, EnvironmentConfig> | undefined;
|
||||
languages?: Record<string, Language> | undefined;
|
||||
processors?: Record<string, Processor> | undefined;
|
||||
rules?: Record<string, RuleDefinition> | undefined;
|
||||
}
|
||||
/**
|
||||
* Generic options for the `Language` type.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user