-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
Fixer incorrectly changes declare keyword to interface
issue is present for type
and interface
options and its related to sourceCode.getFirstToken(node);
Repro
Code
export declare type LocalStorageOption = {
blurb: string;
flag: string;
};
Eslint config
{
"rules": {
"@typescript-eslint/consistent-type-definitions": "error"
}
}
Expected Result
export declare interface LocalStorageOption {
blurb: string;
flag: string;
};
Actual Result
export interface type LocalStorageOption {
blurb: string;
flag: string;
};
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.8.0 |
@typescript-eslint/parser |
5.8.0 |
TypeScript |
4.5.2 |
ESLint |
8.1.0 |
Env |
web |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghas prthere is a PR raised to close thisthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin