Closed
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 |