mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
[eslint] add type property to RuleMetaData (#37351)
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
5b1c50b7f7
commit
b56ebdbf4e
@@ -283,6 +283,12 @@ rule = { create(context) { return {}; }, meta: { fixable: 'whitespace' }};
|
||||
rule = { create(context) { return {}; }, meta: { fixable: 'code' }};
|
||||
rule = { create(context) { return {}; }, meta: { schema: [{ enum: ['always', 'never'] }] }};
|
||||
rule = { create(context) { return {}; }, meta: { deprecated: true }};
|
||||
rule = {
|
||||
create(context) {
|
||||
return {};
|
||||
},
|
||||
meta: { type: 'layout' },
|
||||
};
|
||||
|
||||
rule = {
|
||||
create(context) {
|
||||
|
||||
5
types/eslint/index.d.ts
vendored
5
types/eslint/index.d.ts
vendored
@@ -292,6 +292,7 @@ export namespace Rule {
|
||||
fixable?: 'code' | 'whitespace';
|
||||
schema?: JSONSchema4 | JSONSchema4[];
|
||||
deprecated?: boolean;
|
||||
type?: 'problem' | 'suggestion' | 'layout';
|
||||
}
|
||||
|
||||
interface RuleContext {
|
||||
@@ -319,7 +320,9 @@ export namespace Rule {
|
||||
|
||||
type ReportDescriptor = ReportDescriptorMessage & ReportDescriptorLocation & ReportDescriptorOptions;
|
||||
type ReportDescriptorMessage = { message: string } | { messageId: string };
|
||||
type ReportDescriptorLocation = { node: ESTree.Node } | { loc: AST.SourceLocation | { line: number, column: number } };
|
||||
type ReportDescriptorLocation =
|
||||
| { node: ESTree.Node }
|
||||
| { loc: AST.SourceLocation | { line: number; column: number } };
|
||||
interface ReportDescriptorOptions {
|
||||
data?: { [key: string]: string };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user