@icebreakers/eslint-config 4.0.11 → 4.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{dist-3Yuo5ZWh.js → dist-BLNr96Ot.js} +64756 -46931
- package/dist/{dist-D2WUqnUR.cjs → dist-vhsLpsZM.cjs} +65328 -47503
- package/dist/index.cjs +22 -20
- package/dist/index.d.cts +262 -147
- package/dist/index.d.ts +262 -147
- package/dist/index.js +21 -20
- package/dist/{lib-VdWhDy2o.cjs → lib-nIW0bwj9.cjs} +17786 -17777
- package/dist/{lib-Du7EF351.js → lib-wc9RjYLN.js} +17758 -17749
- package/dist/{lib-ivfmw_L0.cjs → minimatch-1bbaDA5a.cjs} +774 -0
- package/dist/{lib-COpZ8-nd.js → minimatch-Ba4IycII.js} +770 -2
- package/dist/{modern-D06QebMM.cjs → modern-BlDFWU8k.cjs} +2 -2
- package/dist/{modern-DE63O_Ru.js → modern-DnYnDvqZ.js} +2 -2
- package/package.json +15 -10
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { IcebreakerStylelintOptions } from "@icebreakers/stylelint-config";
|
|
|
6
6
|
|
|
7
7
|
import * as import__antfu_eslint_config from "@antfu/eslint-config";
|
|
8
8
|
//#endregion
|
|
9
|
-
//#region ../../node_modules/.pnpm/@types+estree@1.0.
|
|
9
|
+
//#region ../../node_modules/.pnpm/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
|
|
10
10
|
// This definition file follows a somewhat unusual format. ESTree allows
|
|
11
11
|
// runtime type checks based on the `type` parameter. In order to explain this
|
|
12
12
|
// to typescript we want to use discriminated union types:
|
|
@@ -256,7 +256,7 @@ interface PrivateIdentifier extends BaseNode {
|
|
|
256
256
|
}
|
|
257
257
|
interface Property extends BaseNode {
|
|
258
258
|
type: "Property";
|
|
259
|
-
key: Expression
|
|
259
|
+
key: Expression;
|
|
260
260
|
value: Expression | Pattern; // Could be an AssignmentProperty
|
|
261
261
|
kind: "init" | "get" | "set";
|
|
262
262
|
method: boolean;
|
|
@@ -729,7 +729,7 @@ interface JSONSchema4 {
|
|
|
729
729
|
format?: string | undefined;
|
|
730
730
|
}
|
|
731
731
|
//#endregion
|
|
732
|
-
//#region ../../node_modules/.pnpm/@eslint+core@
|
|
732
|
+
//#region ../../node_modules/.pnpm/@eslint+core@0.17.0/node_modules/@eslint/core/dist/esm/types.d.ts
|
|
733
733
|
/**
|
|
734
734
|
* Represents an error inside of a file.
|
|
735
735
|
*/
|
|
@@ -785,7 +785,7 @@ type RuleFixType = "code" | "whitespace";
|
|
|
785
785
|
* name of a node type or a selector, or is a method that will be called at specific
|
|
786
786
|
* times during the traversal.
|
|
787
787
|
*/
|
|
788
|
-
type RuleVisitor
|
|
788
|
+
type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
|
|
789
789
|
/**
|
|
790
790
|
* Rule meta information used for documentation.
|
|
791
791
|
*/
|
|
@@ -798,6 +798,11 @@ interface RulesMetaDocs {
|
|
|
798
798
|
* The URL to the documentation for the rule.
|
|
799
799
|
*/
|
|
800
800
|
url?: string | undefined;
|
|
801
|
+
/**
|
|
802
|
+
* The category the rule falls under.
|
|
803
|
+
* @deprecated No longer used.
|
|
804
|
+
*/
|
|
805
|
+
category?: string | undefined;
|
|
801
806
|
/**
|
|
802
807
|
* Indicates if the rule is generally recommended for all users.
|
|
803
808
|
*
|
|
@@ -808,12 +813,6 @@ interface RulesMetaDocs {
|
|
|
808
813
|
* Indicates if the rule is frozen (no longer accepting feature requests).
|
|
809
814
|
*/
|
|
810
815
|
frozen?: boolean | undefined;
|
|
811
|
-
/**
|
|
812
|
-
* The dialects of the languages that the rule is intended to lint.
|
|
813
|
-
* @example
|
|
814
|
-
* ["JavaScript", "TypeScript"]
|
|
815
|
-
*/
|
|
816
|
-
dialects?: string[] | undefined;
|
|
817
816
|
}
|
|
818
817
|
/**
|
|
819
818
|
* Meta information about a rule.
|
|
@@ -858,21 +857,12 @@ interface RulesMeta<MessageIds extends string = string, RuleOptions = unknown[],
|
|
|
858
857
|
hasSuggestions?: boolean | undefined;
|
|
859
858
|
/**
|
|
860
859
|
* The language the rule is intended to lint.
|
|
861
|
-
* @deprecated Use `languages` instead.
|
|
862
860
|
*/
|
|
863
861
|
language?: string;
|
|
864
862
|
/**
|
|
865
863
|
* The dialects of `language` that the rule is intended to lint.
|
|
866
|
-
* @deprecated Use `docs.dialects` instead.
|
|
867
864
|
*/
|
|
868
865
|
dialects?: string[];
|
|
869
|
-
/**
|
|
870
|
-
* Languages supported by this rule in the format `"plugin/language"`.
|
|
871
|
-
* Use `"*"` for any language or `"plugin/*"` for any language from a specific plugin.
|
|
872
|
-
* @example
|
|
873
|
-
* ["js/js", "markdown/gfm", "json/jsonc", "css/css"]
|
|
874
|
-
*/
|
|
875
|
-
languages?: string[] | undefined;
|
|
876
866
|
}
|
|
877
867
|
/**
|
|
878
868
|
* Provides additional metadata about a deprecation.
|
|
@@ -959,26 +949,56 @@ interface RuleContext$1<Options extends RuleContextTypeOptions = RuleContextType
|
|
|
959
949
|
* The current working directory for the session.
|
|
960
950
|
*/
|
|
961
951
|
cwd: string;
|
|
952
|
+
/**
|
|
953
|
+
* Returns the current working directory for the session.
|
|
954
|
+
* @deprecated Use `cwd` instead.
|
|
955
|
+
*/
|
|
956
|
+
getCwd(): string;
|
|
962
957
|
/**
|
|
963
958
|
* The filename of the file being linted.
|
|
964
959
|
*/
|
|
965
960
|
filename: string;
|
|
961
|
+
/**
|
|
962
|
+
* Returns the filename of the file being linted.
|
|
963
|
+
* @deprecated Use `filename` instead.
|
|
964
|
+
*/
|
|
965
|
+
getFilename(): string;
|
|
966
966
|
/**
|
|
967
967
|
* The physical filename of the file being linted.
|
|
968
968
|
*/
|
|
969
969
|
physicalFilename: string;
|
|
970
|
+
/**
|
|
971
|
+
* Returns the physical filename of the file being linted.
|
|
972
|
+
* @deprecated Use `physicalFilename` instead.
|
|
973
|
+
*/
|
|
974
|
+
getPhysicalFilename(): string;
|
|
970
975
|
/**
|
|
971
976
|
* The source code object that the rule is running on.
|
|
972
977
|
*/
|
|
973
978
|
sourceCode: Options["Code"];
|
|
979
|
+
/**
|
|
980
|
+
* Returns the source code object that the rule is running on.
|
|
981
|
+
* @deprecated Use `sourceCode` instead.
|
|
982
|
+
*/
|
|
983
|
+
getSourceCode(): Options["Code"];
|
|
974
984
|
/**
|
|
975
985
|
* Shared settings for the configuration.
|
|
976
986
|
*/
|
|
977
987
|
settings: SettingsConfig;
|
|
988
|
+
/**
|
|
989
|
+
* Parser-specific options for the configuration.
|
|
990
|
+
* @deprecated Use `languageOptions.parserOptions` instead.
|
|
991
|
+
*/
|
|
992
|
+
parserOptions: Record<string, unknown>;
|
|
978
993
|
/**
|
|
979
994
|
* The language options for the configuration.
|
|
980
995
|
*/
|
|
981
996
|
languageOptions: Options["LangOptions"];
|
|
997
|
+
/**
|
|
998
|
+
* The CommonJS path to the parser used while parsing this file.
|
|
999
|
+
* @deprecated No longer used.
|
|
1000
|
+
*/
|
|
1001
|
+
parserPath: string | undefined;
|
|
982
1002
|
/**
|
|
983
1003
|
* The rule ID.
|
|
984
1004
|
*/
|
|
@@ -1067,15 +1087,11 @@ interface RuleTextEdit {
|
|
|
1067
1087
|
* @returns The fix(es) for the violation.
|
|
1068
1088
|
*/
|
|
1069
1089
|
type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
|
|
1070
|
-
|
|
1071
|
-
* Data that can be used to fill placeholders in error messages.
|
|
1072
|
-
*/
|
|
1073
|
-
type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
|
|
1074
|
-
interface ViolationReportBase<MessageIds extends string = string> {
|
|
1090
|
+
interface ViolationReportBase {
|
|
1075
1091
|
/**
|
|
1076
1092
|
* The data to insert into the message.
|
|
1077
1093
|
*/
|
|
1078
|
-
data?:
|
|
1094
|
+
data?: Record<string, unknown> | undefined;
|
|
1079
1095
|
/**
|
|
1080
1096
|
* The fix to be applied for the violation.
|
|
1081
1097
|
*/
|
|
@@ -1084,9 +1100,9 @@ interface ViolationReportBase<MessageIds extends string = string> {
|
|
|
1084
1100
|
* An array of suggested fixes for the problem. These fixes may change the
|
|
1085
1101
|
* behavior of the code, so they are not applied automatically.
|
|
1086
1102
|
*/
|
|
1087
|
-
suggest?: SuggestedEdit
|
|
1103
|
+
suggest?: SuggestedEdit[] | null | undefined;
|
|
1088
1104
|
}
|
|
1089
|
-
type ViolationMessage<MessageIds
|
|
1105
|
+
type ViolationMessage<MessageIds = string> = {
|
|
1090
1106
|
message: string;
|
|
1091
1107
|
} | {
|
|
1092
1108
|
messageId: MessageIds;
|
|
@@ -1096,26 +1112,26 @@ type ViolationLocation<Node> = {
|
|
|
1096
1112
|
} | {
|
|
1097
1113
|
node: Node;
|
|
1098
1114
|
};
|
|
1099
|
-
type ViolationReport<Node = unknown, MessageIds
|
|
1115
|
+
type ViolationReport<Node = unknown, MessageIds = string> = ViolationReportBase & ViolationMessage<MessageIds> & ViolationLocation<Node>;
|
|
1100
1116
|
interface SuggestedEditBase {
|
|
1101
1117
|
/**
|
|
1102
1118
|
* The data to insert into the message.
|
|
1103
1119
|
*/
|
|
1104
|
-
data?:
|
|
1120
|
+
data?: Record<string, unknown> | undefined;
|
|
1105
1121
|
/**
|
|
1106
1122
|
* The fix to be applied for the suggestion.
|
|
1107
1123
|
*/
|
|
1108
1124
|
fix: RuleFixer;
|
|
1109
1125
|
}
|
|
1110
|
-
type SuggestionMessage
|
|
1126
|
+
type SuggestionMessage = {
|
|
1111
1127
|
desc: string;
|
|
1112
1128
|
} | {
|
|
1113
|
-
messageId:
|
|
1129
|
+
messageId: string;
|
|
1114
1130
|
};
|
|
1115
1131
|
/**
|
|
1116
1132
|
* A suggested edit for a rule violation.
|
|
1117
1133
|
*/
|
|
1118
|
-
type SuggestedEdit
|
|
1134
|
+
type SuggestedEdit = SuggestedEditBase & SuggestionMessage;
|
|
1119
1135
|
/**
|
|
1120
1136
|
* The normalized version of a lint suggestion.
|
|
1121
1137
|
*/
|
|
@@ -1145,6 +1161,11 @@ interface LintMessage$1 {
|
|
|
1145
1161
|
message: string;
|
|
1146
1162
|
/** The ID of the message in the rule's meta. */
|
|
1147
1163
|
messageId?: string | undefined;
|
|
1164
|
+
/**
|
|
1165
|
+
* Type of node.
|
|
1166
|
+
* @deprecated `nodeType` is deprecated and will be removed in the next major version.
|
|
1167
|
+
*/
|
|
1168
|
+
nodeType?: string | undefined;
|
|
1148
1169
|
/** If `true` then this is a fatal error. */
|
|
1149
1170
|
fatal?: true | undefined;
|
|
1150
1171
|
/** The severity of this message. */
|
|
@@ -1161,7 +1182,7 @@ interface RuleDefinitionTypeOptions {
|
|
|
1161
1182
|
LangOptions: LanguageOptions;
|
|
1162
1183
|
Code: SourceCode$1;
|
|
1163
1184
|
RuleOptions: unknown[];
|
|
1164
|
-
Visitor: RuleVisitor
|
|
1185
|
+
Visitor: RuleVisitor;
|
|
1165
1186
|
Node: unknown;
|
|
1166
1187
|
MessageIds: string;
|
|
1167
1188
|
ExtRuleDocs: unknown;
|
|
@@ -1312,7 +1333,7 @@ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
|
|
|
1312
1333
|
* An object containing name-value pairs of information that should be
|
|
1313
1334
|
* available to all rules.
|
|
1314
1335
|
*/
|
|
1315
|
-
settings?:
|
|
1336
|
+
settings?: Record<string, unknown>;
|
|
1316
1337
|
}
|
|
1317
1338
|
/** @deprecated Only supported in legacy eslintrc config format. */
|
|
1318
1339
|
type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
|
|
@@ -1375,6 +1396,7 @@ interface JavaScriptParserOptionsConfig {
|
|
|
1375
1396
|
globalReturn?: boolean | undefined;
|
|
1376
1397
|
impliedStrict?: boolean | undefined;
|
|
1377
1398
|
jsx?: boolean | undefined;
|
|
1399
|
+
experimentalObjectRestSpread?: boolean | undefined;
|
|
1378
1400
|
[key: string]: any;
|
|
1379
1401
|
} | undefined;
|
|
1380
1402
|
[key: string]: any;
|
|
@@ -1569,7 +1591,7 @@ interface Language<Options extends LanguageTypeOptions = {
|
|
|
1569
1591
|
/**
|
|
1570
1592
|
* Default language options. User-defined options are merged with this object.
|
|
1571
1593
|
*/
|
|
1572
|
-
defaultLanguageOptions?:
|
|
1594
|
+
defaultLanguageOptions?: LanguageOptions;
|
|
1573
1595
|
/**
|
|
1574
1596
|
* Validates languageOptions for this language.
|
|
1575
1597
|
*/
|
|
@@ -1843,17 +1865,7 @@ interface Directive {
|
|
|
1843
1865
|
justification?: string;
|
|
1844
1866
|
}
|
|
1845
1867
|
//#endregion
|
|
1846
|
-
//#region ../../node_modules/.pnpm
|
|
1847
|
-
/**
|
|
1848
|
-
* Adds matching `:exit` selector properties for each key of a `RuleVisitor`.
|
|
1849
|
-
*/
|
|
1850
|
-
type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key] };
|
|
1851
|
-
//#endregion
|
|
1852
|
-
//#region ../../node_modules/.pnpm/@eslint+plugin-kit@0.7.1/node_modules/@eslint/plugin-kit/dist/esm/index.d.ts
|
|
1853
|
-
type RuleVisitor = RuleVisitor$1;
|
|
1854
|
-
type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
|
|
1855
|
-
//#endregion
|
|
1856
|
-
//#region ../../node_modules/.pnpm/eslint@10.3.0_jiti@2.7.0/node_modules/eslint/lib/types/index.d.ts
|
|
1868
|
+
//#region ../../node_modules/.pnpm/eslint@9.39.4_jiti@2.7.0/node_modules/eslint/lib/types/index.d.ts
|
|
1857
1869
|
//------------------------------------------------------------------------------
|
|
1858
1870
|
// Exports
|
|
1859
1871
|
//------------------------------------------------------------------------------
|
|
@@ -1869,7 +1881,7 @@ declare namespace AST {
|
|
|
1869
1881
|
start: Position$1;
|
|
1870
1882
|
end: Position$1;
|
|
1871
1883
|
}
|
|
1872
|
-
type Range =
|
|
1884
|
+
type Range = [number, number];
|
|
1873
1885
|
interface Program extends Program {
|
|
1874
1886
|
comments: Comment[];
|
|
1875
1887
|
tokens: Token[];
|
|
@@ -1877,20 +1889,15 @@ declare namespace AST {
|
|
|
1877
1889
|
range: Range;
|
|
1878
1890
|
}
|
|
1879
1891
|
}
|
|
1880
|
-
interface JSXIdentifier extends BaseNode {
|
|
1881
|
-
type: "JSXIdentifier";
|
|
1882
|
-
name: string;
|
|
1883
|
-
}
|
|
1884
1892
|
declare namespace Scope {
|
|
1885
1893
|
interface ScopeManager {
|
|
1886
1894
|
scopes: Scope[];
|
|
1887
1895
|
globalScope: Scope | null;
|
|
1888
1896
|
acquire(node: Node$1, inner?: boolean): Scope | null;
|
|
1889
1897
|
getDeclaredVariables(node: Node$1): Variable[];
|
|
1890
|
-
addGlobals(names: ReadonlyArray<string>): void;
|
|
1891
1898
|
}
|
|
1892
1899
|
interface Scope {
|
|
1893
|
-
type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with";
|
|
1900
|
+
type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
|
|
1894
1901
|
isStrict: boolean;
|
|
1895
1902
|
upper: Scope | null;
|
|
1896
1903
|
childScopes: Scope[];
|
|
@@ -1914,11 +1921,11 @@ declare namespace Scope {
|
|
|
1914
1921
|
defs: Definition[];
|
|
1915
1922
|
}
|
|
1916
1923
|
interface Reference {
|
|
1917
|
-
identifier: Identifier
|
|
1924
|
+
identifier: Identifier;
|
|
1918
1925
|
from: Scope;
|
|
1919
1926
|
resolved: Variable | null;
|
|
1920
|
-
writeExpr
|
|
1921
|
-
init
|
|
1927
|
+
writeExpr: Node$1 | null;
|
|
1928
|
+
init: boolean;
|
|
1922
1929
|
isWrite(): boolean;
|
|
1923
1930
|
isRead(): boolean;
|
|
1924
1931
|
isWriteOnly(): boolean;
|
|
@@ -1949,6 +1956,10 @@ declare namespace Scope {
|
|
|
1949
1956
|
type: "Parameter";
|
|
1950
1957
|
node: FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
|
|
1951
1958
|
parent: null;
|
|
1959
|
+
} | {
|
|
1960
|
+
type: "TDZ";
|
|
1961
|
+
node: any;
|
|
1962
|
+
parent: null;
|
|
1952
1963
|
} | {
|
|
1953
1964
|
type: "Variable";
|
|
1954
1965
|
node: VariableDeclarator;
|
|
@@ -1982,7 +1993,11 @@ declare class SourceCode implements TextSourceCode<{
|
|
|
1982
1993
|
getAllComments(): Comment[];
|
|
1983
1994
|
getAncestors(node: Node$1): Node$1[];
|
|
1984
1995
|
getDeclaredVariables(node: Node$1): Scope.Variable[];
|
|
1996
|
+
/** @deprecated */
|
|
1997
|
+
getJSDocComment(node: Node$1): Comment | null;
|
|
1985
1998
|
getNodeByRangeIndex(index: number): Node$1 | null;
|
|
1999
|
+
/** @deprecated Use `isSpaceBetween()` instead. */
|
|
2000
|
+
isSpaceBetweenTokens(first: Node$1 | AST.Token, second: Node$1 | AST.Token): boolean;
|
|
1986
2001
|
getLocFromIndex(index: number): Position$1;
|
|
1987
2002
|
getIndexFromLoc(location: Position$1): number; // Inherited methods from TokenStore
|
|
1988
2003
|
// ---------------------------------
|
|
@@ -2000,6 +2015,10 @@ declare class SourceCode implements TextSourceCode<{
|
|
|
2000
2015
|
getTokensBefore: SourceCode.UnaryCursorWithCountOptions;
|
|
2001
2016
|
getTokenAfter: SourceCode.UnaryCursorWithSkipOptions;
|
|
2002
2017
|
getTokensAfter: SourceCode.UnaryCursorWithCountOptions;
|
|
2018
|
+
/** @deprecated Use `getTokenBefore()` instead. */
|
|
2019
|
+
getTokenOrCommentBefore(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
|
|
2020
|
+
/** @deprecated Use `getTokenAfter()` instead. */
|
|
2021
|
+
getTokenOrCommentAfter(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
|
|
2003
2022
|
getFirstTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
|
|
2004
2023
|
getFirstTokensBetween: SourceCode.BinaryCursorWithCountOptions;
|
|
2005
2024
|
getLastTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
|
|
@@ -2180,10 +2199,150 @@ declare namespace Rule {
|
|
|
2180
2199
|
create(context: RuleContext): RuleListener;
|
|
2181
2200
|
}
|
|
2182
2201
|
type NodeTypes = Node$1["type"];
|
|
2183
|
-
interface NodeListener extends
|
|
2184
|
-
|
|
2202
|
+
interface NodeListener extends RuleVisitor {
|
|
2203
|
+
ArrayExpression?: ((node: ArrayExpression & NodeParentExtension) => void) | undefined;
|
|
2204
|
+
"ArrayExpression:exit"?: ((node: ArrayExpression & NodeParentExtension) => void) | undefined;
|
|
2205
|
+
ArrayPattern?: ((node: ArrayPattern & NodeParentExtension) => void) | undefined;
|
|
2206
|
+
"ArrayPattern:exit"?: ((node: ArrayPattern & NodeParentExtension) => void) | undefined;
|
|
2207
|
+
ArrowFunctionExpression?: ((node: ArrowFunctionExpression & NodeParentExtension) => void) | undefined;
|
|
2208
|
+
"ArrowFunctionExpression:exit"?: ((node: ArrowFunctionExpression & NodeParentExtension) => void) | undefined;
|
|
2209
|
+
AssignmentExpression?: ((node: AssignmentExpression & NodeParentExtension) => void) | undefined;
|
|
2210
|
+
"AssignmentExpression:exit"?: ((node: AssignmentExpression & NodeParentExtension) => void) | undefined;
|
|
2211
|
+
AssignmentPattern?: ((node: AssignmentPattern & NodeParentExtension) => void) | undefined;
|
|
2212
|
+
"AssignmentPattern:exit"?: ((node: AssignmentPattern & NodeParentExtension) => void) | undefined;
|
|
2213
|
+
AwaitExpression?: ((node: AwaitExpression & NodeParentExtension) => void) | undefined;
|
|
2214
|
+
"AwaitExpression:exit"?: ((node: AwaitExpression & NodeParentExtension) => void) | undefined;
|
|
2215
|
+
BinaryExpression?: ((node: BinaryExpression & NodeParentExtension) => void) | undefined;
|
|
2216
|
+
"BinaryExpression:exit"?: ((node: BinaryExpression & NodeParentExtension) => void) | undefined;
|
|
2217
|
+
BlockStatement?: ((node: BlockStatement & NodeParentExtension) => void) | undefined;
|
|
2218
|
+
"BlockStatement:exit"?: ((node: BlockStatement & NodeParentExtension) => void) | undefined;
|
|
2219
|
+
BreakStatement?: ((node: BreakStatement & NodeParentExtension) => void) | undefined;
|
|
2220
|
+
"BreakStatement:exit"?: ((node: BreakStatement & NodeParentExtension) => void) | undefined;
|
|
2221
|
+
CallExpression?: ((node: SimpleCallExpression & NodeParentExtension) => void) | undefined;
|
|
2222
|
+
"CallExpression:exit"?: ((node: SimpleCallExpression & NodeParentExtension) => void) | undefined;
|
|
2223
|
+
CatchClause?: ((node: CatchClause & NodeParentExtension) => void) | undefined;
|
|
2224
|
+
"CatchClause:exit"?: ((node: CatchClause & NodeParentExtension) => void) | undefined;
|
|
2225
|
+
ChainExpression?: ((node: ChainExpression & NodeParentExtension) => void) | undefined;
|
|
2226
|
+
"ChainExpression:exit"?: ((node: ChainExpression & NodeParentExtension) => void) | undefined;
|
|
2227
|
+
ClassBody?: ((node: ClassBody & NodeParentExtension) => void) | undefined;
|
|
2228
|
+
"ClassBody:exit"?: ((node: ClassBody & NodeParentExtension) => void) | undefined;
|
|
2229
|
+
ClassDeclaration?: ((node: ClassDeclaration & NodeParentExtension) => void) | undefined;
|
|
2230
|
+
"ClassDeclaration:exit"?: ((node: ClassDeclaration & NodeParentExtension) => void) | undefined;
|
|
2231
|
+
ClassExpression?: ((node: ClassExpression & NodeParentExtension) => void) | undefined;
|
|
2232
|
+
"ClassExpression:exit"?: ((node: ClassExpression & NodeParentExtension) => void) | undefined;
|
|
2233
|
+
ConditionalExpression?: ((node: ConditionalExpression & NodeParentExtension) => void) | undefined;
|
|
2234
|
+
"ConditionalExpression:exit"?: ((node: ConditionalExpression & NodeParentExtension) => void) | undefined;
|
|
2235
|
+
ContinueStatement?: ((node: ContinueStatement & NodeParentExtension) => void) | undefined;
|
|
2236
|
+
"ContinueStatement:exit"?: ((node: ContinueStatement & NodeParentExtension) => void) | undefined;
|
|
2237
|
+
DebuggerStatement?: ((node: DebuggerStatement & NodeParentExtension) => void) | undefined;
|
|
2238
|
+
"DebuggerStatement:exit"?: ((node: DebuggerStatement & NodeParentExtension) => void) | undefined;
|
|
2239
|
+
DoWhileStatement?: ((node: DoWhileStatement & NodeParentExtension) => void) | undefined;
|
|
2240
|
+
"DoWhileStatement:exit"?: ((node: DoWhileStatement & NodeParentExtension) => void) | undefined;
|
|
2241
|
+
EmptyStatement?: ((node: EmptyStatement & NodeParentExtension) => void) | undefined;
|
|
2242
|
+
"EmptyStatement:exit"?: ((node: EmptyStatement & NodeParentExtension) => void) | undefined;
|
|
2243
|
+
ExportAllDeclaration?: ((node: ExportAllDeclaration & NodeParentExtension) => void) | undefined;
|
|
2244
|
+
"ExportAllDeclaration:exit"?: ((node: ExportAllDeclaration & NodeParentExtension) => void) | undefined;
|
|
2245
|
+
ExportDefaultDeclaration?: ((node: ExportDefaultDeclaration & NodeParentExtension) => void) | undefined;
|
|
2246
|
+
"ExportDefaultDeclaration:exit"?: ((node: ExportDefaultDeclaration & NodeParentExtension) => void) | undefined;
|
|
2247
|
+
ExportNamedDeclaration?: ((node: ExportNamedDeclaration & NodeParentExtension) => void) | undefined;
|
|
2248
|
+
"ExportNamedDeclaration:exit"?: ((node: ExportNamedDeclaration & NodeParentExtension) => void) | undefined;
|
|
2249
|
+
ExportSpecifier?: ((node: ExportSpecifier & NodeParentExtension) => void) | undefined;
|
|
2250
|
+
"ExportSpecifier:exit"?: ((node: ExportSpecifier & NodeParentExtension) => void) | undefined;
|
|
2251
|
+
ExpressionStatement?: ((node: ExpressionStatement & NodeParentExtension) => void) | undefined;
|
|
2252
|
+
"ExpressionStatement:exit"?: ((node: ExpressionStatement & NodeParentExtension) => void) | undefined;
|
|
2253
|
+
ForInStatement?: ((node: ForInStatement & NodeParentExtension) => void) | undefined;
|
|
2254
|
+
"ForInStatement:exit"?: ((node: ForInStatement & NodeParentExtension) => void) | undefined;
|
|
2255
|
+
ForOfStatement?: ((node: ForOfStatement & NodeParentExtension) => void) | undefined;
|
|
2256
|
+
"ForOfStatement:exit"?: ((node: ForOfStatement & NodeParentExtension) => void) | undefined;
|
|
2257
|
+
ForStatement?: ((node: ForStatement & NodeParentExtension) => void) | undefined;
|
|
2258
|
+
"ForStatement:exit"?: ((node: ForStatement & NodeParentExtension) => void) | undefined;
|
|
2259
|
+
FunctionDeclaration?: ((node: FunctionDeclaration & NodeParentExtension) => void) | undefined;
|
|
2260
|
+
"FunctionDeclaration:exit"?: ((node: FunctionDeclaration & NodeParentExtension) => void) | undefined;
|
|
2261
|
+
FunctionExpression?: ((node: FunctionExpression & NodeParentExtension) => void) | undefined;
|
|
2262
|
+
"FunctionExpression:exit"?: ((node: FunctionExpression & NodeParentExtension) => void) | undefined;
|
|
2263
|
+
Identifier?: ((node: Identifier & NodeParentExtension) => void) | undefined;
|
|
2264
|
+
"Identifier:exit"?: ((node: Identifier & NodeParentExtension) => void) | undefined;
|
|
2265
|
+
IfStatement?: ((node: IfStatement & NodeParentExtension) => void) | undefined;
|
|
2266
|
+
"IfStatement:exit"?: ((node: IfStatement & NodeParentExtension) => void) | undefined;
|
|
2267
|
+
ImportDeclaration?: ((node: ImportDeclaration & NodeParentExtension) => void) | undefined;
|
|
2268
|
+
"ImportDeclaration:exit"?: ((node: ImportDeclaration & NodeParentExtension) => void) | undefined;
|
|
2269
|
+
ImportDefaultSpecifier?: ((node: ImportDefaultSpecifier & NodeParentExtension) => void) | undefined;
|
|
2270
|
+
"ImportDefaultSpecifier:exit"?: ((node: ImportDefaultSpecifier & NodeParentExtension) => void) | undefined;
|
|
2271
|
+
ImportExpression?: ((node: ImportExpression & NodeParentExtension) => void) | undefined;
|
|
2272
|
+
"ImportExpression:exit"?: ((node: ImportExpression & NodeParentExtension) => void) | undefined;
|
|
2273
|
+
ImportNamespaceSpecifier?: ((node: ImportNamespaceSpecifier & NodeParentExtension) => void) | undefined;
|
|
2274
|
+
"ImportNamespaceSpecifier:exit"?: ((node: ImportNamespaceSpecifier & NodeParentExtension) => void) | undefined;
|
|
2275
|
+
ImportSpecifier?: ((node: ImportSpecifier & NodeParentExtension) => void) | undefined;
|
|
2276
|
+
"ImportSpecifier:exit"?: ((node: ImportSpecifier & NodeParentExtension) => void) | undefined;
|
|
2277
|
+
LabeledStatement?: ((node: LabeledStatement & NodeParentExtension) => void) | undefined;
|
|
2278
|
+
"LabeledStatement:exit"?: ((node: LabeledStatement & NodeParentExtension) => void) | undefined;
|
|
2279
|
+
Literal?: ((node: Literal & NodeParentExtension) => void) | undefined;
|
|
2280
|
+
"Literal:exit"?: ((node: Literal & NodeParentExtension) => void) | undefined;
|
|
2281
|
+
LogicalExpression?: ((node: LogicalExpression & NodeParentExtension) => void) | undefined;
|
|
2282
|
+
"LogicalExpression:exit"?: ((node: LogicalExpression & NodeParentExtension) => void) | undefined;
|
|
2283
|
+
MemberExpression?: ((node: MemberExpression & NodeParentExtension) => void) | undefined;
|
|
2284
|
+
"MemberExpression:exit"?: ((node: MemberExpression & NodeParentExtension) => void) | undefined;
|
|
2285
|
+
MetaProperty?: ((node: MetaProperty & NodeParentExtension) => void) | undefined;
|
|
2286
|
+
"MetaProperty:exit"?: ((node: MetaProperty & NodeParentExtension) => void) | undefined;
|
|
2287
|
+
MethodDefinition?: ((node: MethodDefinition & NodeParentExtension) => void) | undefined;
|
|
2288
|
+
"MethodDefinition:exit"?: ((node: MethodDefinition & NodeParentExtension) => void) | undefined;
|
|
2289
|
+
NewExpression?: ((node: NewExpression & NodeParentExtension) => void) | undefined;
|
|
2290
|
+
"NewExpression:exit"?: ((node: NewExpression & NodeParentExtension) => void) | undefined;
|
|
2291
|
+
ObjectExpression?: ((node: ObjectExpression & NodeParentExtension) => void) | undefined;
|
|
2292
|
+
"ObjectExpression:exit"?: ((node: ObjectExpression & NodeParentExtension) => void) | undefined;
|
|
2293
|
+
ObjectPattern?: ((node: ObjectPattern & NodeParentExtension) => void) | undefined;
|
|
2294
|
+
"ObjectPattern:exit"?: ((node: ObjectPattern & NodeParentExtension) => void) | undefined;
|
|
2295
|
+
PrivateIdentifier?: ((node: PrivateIdentifier & NodeParentExtension) => void) | undefined;
|
|
2296
|
+
"PrivateIdentifier:exit"?: ((node: PrivateIdentifier & NodeParentExtension) => void) | undefined;
|
|
2185
2297
|
Program?: ((node: AST.Program) => void) | undefined;
|
|
2186
|
-
|
|
2298
|
+
"Program:exit"?: ((node: AST.Program) => void) | undefined;
|
|
2299
|
+
Property?: ((node: Property & NodeParentExtension) => void) | undefined;
|
|
2300
|
+
"Property:exit"?: ((node: Property & NodeParentExtension) => void) | undefined;
|
|
2301
|
+
PropertyDefinition?: ((node: PropertyDefinition & NodeParentExtension) => void) | undefined;
|
|
2302
|
+
"PropertyDefinition:exit"?: ((node: PropertyDefinition & NodeParentExtension) => void) | undefined;
|
|
2303
|
+
RestElement?: ((node: RestElement & NodeParentExtension) => void) | undefined;
|
|
2304
|
+
"RestElement:exit"?: ((node: RestElement & NodeParentExtension) => void) | undefined;
|
|
2305
|
+
ReturnStatement?: ((node: ReturnStatement & NodeParentExtension) => void) | undefined;
|
|
2306
|
+
"ReturnStatement:exit"?: ((node: ReturnStatement & NodeParentExtension) => void) | undefined;
|
|
2307
|
+
SequenceExpression?: ((node: SequenceExpression & NodeParentExtension) => void) | undefined;
|
|
2308
|
+
"SequenceExpression:exit"?: ((node: SequenceExpression & NodeParentExtension) => void) | undefined;
|
|
2309
|
+
SpreadElement?: ((node: SpreadElement & NodeParentExtension) => void) | undefined;
|
|
2310
|
+
"SpreadElement:exit"?: ((node: SpreadElement & NodeParentExtension) => void) | undefined;
|
|
2311
|
+
StaticBlock?: ((node: StaticBlock & NodeParentExtension) => void) | undefined;
|
|
2312
|
+
"StaticBlock:exit"?: ((node: StaticBlock & NodeParentExtension) => void) | undefined;
|
|
2313
|
+
Super?: ((node: Super & NodeParentExtension) => void) | undefined;
|
|
2314
|
+
"Super:exit"?: ((node: Super & NodeParentExtension) => void) | undefined;
|
|
2315
|
+
SwitchCase?: ((node: SwitchCase & NodeParentExtension) => void) | undefined;
|
|
2316
|
+
"SwitchCase:exit"?: ((node: SwitchCase & NodeParentExtension) => void) | undefined;
|
|
2317
|
+
SwitchStatement?: ((node: SwitchStatement & NodeParentExtension) => void) | undefined;
|
|
2318
|
+
"SwitchStatement:exit"?: ((node: SwitchStatement & NodeParentExtension) => void) | undefined;
|
|
2319
|
+
TaggedTemplateExpression?: ((node: TaggedTemplateExpression & NodeParentExtension) => void) | undefined;
|
|
2320
|
+
"TaggedTemplateExpression:exit"?: ((node: TaggedTemplateExpression & NodeParentExtension) => void) | undefined;
|
|
2321
|
+
TemplateElement?: ((node: TemplateElement & NodeParentExtension) => void) | undefined;
|
|
2322
|
+
"TemplateElement:exit"?: ((node: TemplateElement & NodeParentExtension) => void) | undefined;
|
|
2323
|
+
TemplateLiteral?: ((node: TemplateLiteral & NodeParentExtension) => void) | undefined;
|
|
2324
|
+
"TemplateLiteral:exit"?: ((node: TemplateLiteral & NodeParentExtension) => void) | undefined;
|
|
2325
|
+
ThisExpression?: ((node: ThisExpression & NodeParentExtension) => void) | undefined;
|
|
2326
|
+
"ThisExpression:exit"?: ((node: ThisExpression & NodeParentExtension) => void) | undefined;
|
|
2327
|
+
ThrowStatement?: ((node: ThrowStatement & NodeParentExtension) => void) | undefined;
|
|
2328
|
+
"ThrowStatement:exit"?: ((node: ThrowStatement & NodeParentExtension) => void) | undefined;
|
|
2329
|
+
TryStatement?: ((node: TryStatement & NodeParentExtension) => void) | undefined;
|
|
2330
|
+
"TryStatement:exit"?: ((node: TryStatement & NodeParentExtension) => void) | undefined;
|
|
2331
|
+
UnaryExpression?: ((node: UnaryExpression & NodeParentExtension) => void) | undefined;
|
|
2332
|
+
"UnaryExpression:exit"?: ((node: UnaryExpression & NodeParentExtension) => void) | undefined;
|
|
2333
|
+
UpdateExpression?: ((node: UpdateExpression & NodeParentExtension) => void) | undefined;
|
|
2334
|
+
"UpdateExpression:exit"?: ((node: UpdateExpression & NodeParentExtension) => void) | undefined;
|
|
2335
|
+
VariableDeclaration?: ((node: VariableDeclaration & NodeParentExtension) => void) | undefined;
|
|
2336
|
+
"VariableDeclaration:exit"?: ((node: VariableDeclaration & NodeParentExtension) => void) | undefined;
|
|
2337
|
+
VariableDeclarator?: ((node: VariableDeclarator & NodeParentExtension) => void) | undefined;
|
|
2338
|
+
"VariableDeclarator:exit"?: ((node: VariableDeclarator & NodeParentExtension) => void) | undefined;
|
|
2339
|
+
WhileStatement?: ((node: WhileStatement & NodeParentExtension) => void) | undefined;
|
|
2340
|
+
"WhileStatement:exit"?: ((node: WhileStatement & NodeParentExtension) => void) | undefined;
|
|
2341
|
+
WithStatement?: ((node: WithStatement & NodeParentExtension) => void) | undefined;
|
|
2342
|
+
"WithStatement:exit"?: ((node: WithStatement & NodeParentExtension) => void) | undefined;
|
|
2343
|
+
YieldExpression?: ((node: YieldExpression & NodeParentExtension) => void) | undefined;
|
|
2344
|
+
"YieldExpression:exit"?: ((node: YieldExpression & NodeParentExtension) => void) | undefined;
|
|
2345
|
+
}
|
|
2187
2346
|
interface NodeParentExtension {
|
|
2188
2347
|
parent: Node;
|
|
2189
2348
|
}
|
|
@@ -2227,14 +2386,14 @@ declare namespace Rule {
|
|
|
2227
2386
|
}> {}
|
|
2228
2387
|
type ReportFixer = RuleFixer;
|
|
2229
2388
|
/** @deprecated Use `ReportDescriptorOptions` instead. */
|
|
2230
|
-
type ReportDescriptorOptionsBase =
|
|
2389
|
+
type ReportDescriptorOptionsBase = ViolationReportBase;
|
|
2231
2390
|
type SuggestionReportOptions = SuggestedEditBase;
|
|
2232
2391
|
type SuggestionDescriptorMessage = SuggestionMessage;
|
|
2233
2392
|
type SuggestionReportDescriptor = SuggestedEdit; // redundant with ReportDescriptorOptionsBase but kept for clarity
|
|
2234
2393
|
type ReportDescriptorOptions = ViolationReportBase;
|
|
2235
|
-
type ReportDescriptor = ViolationReport<
|
|
2394
|
+
type ReportDescriptor = ViolationReport<Node$1>;
|
|
2236
2395
|
type ReportDescriptorMessage = ViolationMessage;
|
|
2237
|
-
type ReportDescriptorLocation = ViolationLocation<
|
|
2396
|
+
type ReportDescriptorLocation = ViolationLocation<Node$1>;
|
|
2238
2397
|
type RuleFixer = RuleTextEditor<Node$1 | AST.Token>;
|
|
2239
2398
|
type Fix = RuleTextEdit;
|
|
2240
2399
|
}
|
|
@@ -2244,13 +2403,19 @@ declare class Linter {
|
|
|
2244
2403
|
version: string;
|
|
2245
2404
|
constructor(options?: {
|
|
2246
2405
|
cwd?: string | undefined;
|
|
2247
|
-
configType?: "flat";
|
|
2406
|
+
configType?: "flat" | "eslintrc";
|
|
2248
2407
|
});
|
|
2249
|
-
verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
|
|
2250
|
-
verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
|
|
2251
|
-
verifyAndFix(code: string, config: Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
|
|
2252
|
-
verifyAndFix(code: string, config: Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
|
|
2408
|
+
verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
|
|
2409
|
+
verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
|
|
2410
|
+
verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
|
|
2411
|
+
verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
|
|
2253
2412
|
getSourceCode(): SourceCode;
|
|
2413
|
+
defineRule(name: string, rule: Rule.RuleModule): void;
|
|
2414
|
+
defineRules(rules: {
|
|
2415
|
+
[name: string]: Rule.RuleModule;
|
|
2416
|
+
}): void;
|
|
2417
|
+
getRules(): Map<string, Rule.RuleModule>;
|
|
2418
|
+
defineParser(name: string, parser: Linter.Parser): void;
|
|
2254
2419
|
getTimes(): Linter.Stats["times"];
|
|
2255
2420
|
getFixPassCount(): Linter.Stats["fixPasses"];
|
|
2256
2421
|
}
|
|
@@ -2327,41 +2492,7 @@ declare namespace Linter {
|
|
|
2327
2492
|
*
|
|
2328
2493
|
* @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
|
|
2329
2494
|
*/
|
|
2330
|
-
|
|
2331
|
-
/**
|
|
2332
|
-
* Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
|
|
2333
|
-
*
|
|
2334
|
-
* @default false
|
|
2335
|
-
*/
|
|
2336
|
-
allowReserved?: boolean | undefined;
|
|
2337
|
-
/**
|
|
2338
|
-
* An object indicating which additional language features you'd like to use.
|
|
2339
|
-
*
|
|
2340
|
-
* @see https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
|
|
2341
|
-
*/
|
|
2342
|
-
ecmaFeatures?: {
|
|
2343
|
-
/**
|
|
2344
|
-
* Allow `return` statements in the global scope.
|
|
2345
|
-
*
|
|
2346
|
-
* @default false
|
|
2347
|
-
*/
|
|
2348
|
-
globalReturn?: boolean | undefined;
|
|
2349
|
-
/**
|
|
2350
|
-
* Enable global [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) (if `ecmaVersion` is 5 or greater).
|
|
2351
|
-
*
|
|
2352
|
-
* @default false
|
|
2353
|
-
*/
|
|
2354
|
-
impliedStrict?: boolean | undefined;
|
|
2355
|
-
/**
|
|
2356
|
-
* Enable [JSX](https://facebook.github.io/jsx/).
|
|
2357
|
-
*
|
|
2358
|
-
* @default false
|
|
2359
|
-
*/
|
|
2360
|
-
jsx?: boolean | undefined;
|
|
2361
|
-
[key: string]: any;
|
|
2362
|
-
} | undefined;
|
|
2363
|
-
[key: string]: any;
|
|
2364
|
-
}
|
|
2495
|
+
type ParserOptions = JavaScriptParserOptionsConfig;
|
|
2365
2496
|
/**
|
|
2366
2497
|
* Options used for linting code with `Linter#verify` and `Linter#verifyAndFix`.
|
|
2367
2498
|
*/
|
|
@@ -2529,65 +2660,55 @@ declare namespace ESLint {
|
|
|
2529
2660
|
type Plugin = Plugin$1;
|
|
2530
2661
|
type FixType = "directive" | "problem" | "suggestion" | "layout";
|
|
2531
2662
|
type CacheStrategy = "content" | "metadata";
|
|
2532
|
-
/** The options with which to configure the ESLint instance. */
|
|
2533
2663
|
interface Options {
|
|
2534
2664
|
// File enumeration
|
|
2535
|
-
/** The value to use for the current working directory. */
|
|
2536
2665
|
cwd?: string | undefined;
|
|
2537
|
-
/** If `false` then `ESLint#lintFiles()` doesn't throw even if no target files found. Defaults to `true`. */
|
|
2538
2666
|
errorOnUnmatchedPattern?: boolean | undefined;
|
|
2539
|
-
/**
|
|
2540
|
-
* Set to false to skip glob resolution of input file paths to lint (default: true).
|
|
2541
|
-
* If false, each input file path is assumed to be a non-glob path to an existing file.
|
|
2542
|
-
*/
|
|
2543
2667
|
globInputPaths?: boolean | undefined;
|
|
2544
|
-
/** False disables all ignore patterns except for the default ones. */
|
|
2545
2668
|
ignore?: boolean | undefined;
|
|
2546
|
-
/** Ignore file patterns to use in addition to config ignores. These patterns are relative to `cwd`. */
|
|
2547
2669
|
ignorePatterns?: string[] | null | undefined;
|
|
2548
|
-
/** When set to true, missing patterns cause the linting operation to short circuit and not report any failures. */
|
|
2549
2670
|
passOnNoPatterns?: boolean | undefined;
|
|
2550
|
-
/** Show warnings when the file list includes ignored files. */
|
|
2551
2671
|
warnIgnored?: boolean | undefined; // Linting
|
|
2552
|
-
/** Enable or disable inline configuration comments. */
|
|
2553
2672
|
allowInlineConfig?: boolean | undefined;
|
|
2554
|
-
/** Base config, extended by all configs used with this instance. */
|
|
2555
2673
|
baseConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2556
|
-
/** Override config, overrides all configs used with this instance. */
|
|
2557
2674
|
overrideConfig?: Linter.Config | Linter.Config[] | null | undefined;
|
|
2558
|
-
/**
|
|
2559
|
-
* Searches for default config file when falsy; doesn't do any config file lookup when `true`; considered to be a config filename when a string.
|
|
2560
|
-
*/
|
|
2561
2675
|
overrideConfigFile?: string | true | null | undefined;
|
|
2562
|
-
/** An array of plugin implementations. */
|
|
2563
2676
|
plugins?: Record<string, Plugin> | null | undefined;
|
|
2564
|
-
/**
|
|
2565
|
-
* Default is `() => true`. A predicate function that filters rules to be run.
|
|
2566
|
-
* This function is called with an object containing `ruleId` and `severity`, and returns `true` if the rule should be run.
|
|
2567
|
-
*/
|
|
2568
2677
|
ruleFilter?: ((arg: {
|
|
2569
2678
|
ruleId: string;
|
|
2570
2679
|
severity: Exclude<Linter.Severity, 0>;
|
|
2571
2680
|
}) => boolean) | undefined;
|
|
2572
|
-
/** True enables added statistics on lint results. */
|
|
2573
2681
|
stats?: boolean | undefined; // Autofix
|
|
2574
|
-
/** Execute in autofix mode. If a function, should return a boolean. */
|
|
2575
2682
|
fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
|
|
2576
|
-
/** Array of rule types to apply fixes for. */
|
|
2577
2683
|
fixTypes?: FixType[] | null | undefined; // Cache-related
|
|
2578
|
-
/** Enable result caching. */
|
|
2579
2684
|
cache?: boolean | undefined;
|
|
2580
|
-
/** The cache file to use instead of .eslintcache. */
|
|
2581
2685
|
cacheLocation?: string | undefined;
|
|
2582
|
-
|
|
2583
|
-
cacheStrategy?: CacheStrategy | undefined;
|
|
2584
|
-
/** If true, apply suppressions automatically. Defaults to false. */
|
|
2585
|
-
applySuppressions?: boolean | undefined;
|
|
2586
|
-
/** Path to suppressions file. Relative to cwd. Defaults to eslint-suppressions.json in cwd. */
|
|
2587
|
-
suppressionsLocation?: string | undefined; // Other Options
|
|
2588
|
-
/** Maximum number of linting threads, "auto" to choose automatically, "off" for no multithreading. */
|
|
2686
|
+
cacheStrategy?: CacheStrategy | undefined; // Other Options
|
|
2589
2687
|
concurrency?: number | "auto" | "off" | undefined;
|
|
2590
|
-
|
|
2688
|
+
flags?: string[] | undefined;
|
|
2689
|
+
}
|
|
2690
|
+
interface LegacyOptions {
|
|
2691
|
+
// File enumeration
|
|
2692
|
+
cwd?: string | undefined;
|
|
2693
|
+
errorOnUnmatchedPattern?: boolean | undefined;
|
|
2694
|
+
extensions?: string[] | undefined;
|
|
2695
|
+
globInputPaths?: boolean | undefined;
|
|
2696
|
+
ignore?: boolean | undefined;
|
|
2697
|
+
ignorePath?: string | undefined; // Linting
|
|
2698
|
+
allowInlineConfig?: boolean | undefined;
|
|
2699
|
+
baseConfig?: Linter.LegacyConfig | undefined;
|
|
2700
|
+
overrideConfig?: Linter.LegacyConfig | undefined;
|
|
2701
|
+
overrideConfigFile?: string | undefined;
|
|
2702
|
+
plugins?: Record<string, Plugin> | undefined;
|
|
2703
|
+
reportUnusedDisableDirectives?: Linter.StringSeverity | undefined;
|
|
2704
|
+
resolvePluginsRelativeTo?: string | undefined;
|
|
2705
|
+
rulePaths?: string[] | undefined;
|
|
2706
|
+
useEslintrc?: boolean | undefined; // Autofix
|
|
2707
|
+
fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
|
|
2708
|
+
fixTypes?: FixType[] | null | undefined; // Cache-related
|
|
2709
|
+
cache?: boolean | undefined;
|
|
2710
|
+
cacheLocation?: string | undefined;
|
|
2711
|
+
cacheStrategy?: CacheStrategy | undefined; // Other Options
|
|
2591
2712
|
flags?: string[] | undefined;
|
|
2592
2713
|
}
|
|
2593
2714
|
/** A linting result. */
|
|
@@ -2630,8 +2751,9 @@ declare namespace ESLint {
|
|
|
2630
2751
|
*/
|
|
2631
2752
|
foundWarnings: number;
|
|
2632
2753
|
}
|
|
2633
|
-
interface LintResultData
|
|
2754
|
+
interface LintResultData {
|
|
2634
2755
|
cwd: string;
|
|
2756
|
+
maxWarningsExceeded?: MaxWarningsExceeded | undefined;
|
|
2635
2757
|
rulesMeta: {
|
|
2636
2758
|
[ruleId: string]: Rule.RuleMetaData;
|
|
2637
2759
|
};
|
|
@@ -2659,13 +2781,6 @@ declare namespace ESLint {
|
|
|
2659
2781
|
* Metadata about results for formatters.
|
|
2660
2782
|
*/
|
|
2661
2783
|
interface ResultsMeta {
|
|
2662
|
-
/**
|
|
2663
|
-
* Whether or not to use color in the formatter output.
|
|
2664
|
-
* - If `--color` was set, this property is `true`.
|
|
2665
|
-
* - If `--no-color` was set, it is `false`.
|
|
2666
|
-
* - If neither option was provided, the property is omitted.
|
|
2667
|
-
*/
|
|
2668
|
-
color?: boolean | undefined;
|
|
2669
2784
|
/**
|
|
2670
2785
|
* Present if the maxWarnings threshold was exceeded.
|
|
2671
2786
|
*/
|
|
@@ -2676,9 +2791,9 @@ declare namespace ESLint {
|
|
|
2676
2791
|
/**
|
|
2677
2792
|
* Used to call the underlying formatter.
|
|
2678
2793
|
* @param results An array of lint results to format.
|
|
2679
|
-
* @param resultsMeta An object with optional `
|
|
2794
|
+
* @param resultsMeta An object with an optional `maxWarningsExceeded` property that will be
|
|
2680
2795
|
* passed to the underlying formatter function along with other properties set by ESLint.
|
|
2681
|
-
* This argument can be omitted if `
|
|
2796
|
+
* This argument can be omitted if `maxWarningsExceeded` is not needed.
|
|
2682
2797
|
* @return The formatter output.
|
|
2683
2798
|
*/
|
|
2684
2799
|
format(results: LintResult[], resultsMeta?: ResultsMeta): string | Promise<string>;
|