-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershas 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
Repro
{
"rules": {
"@typescript-eslint/no-empty-interface": "error"
}
}
import { tokens } from './theme.treat';
declare module 'treat/theme' {
type Tokens = typeof tokens;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Theme extends Tokens {}
}
The code above can be found here, along with the referenced theme.treat.ts
file in the same directory.
Expected Result
No errors should be thrown, as the Theme
interface of module 'treat/theme'
is being augmented.
Actual Result
An interface declaring no members is equivalent to its supertype.
(As thrown by @typescript-eslint/no-empty-interface
.)
Additional Info
The code above gets auto-fixed to:
import { tokens } from './theme.treat';
declare module 'treat/theme' {
type Tokens = typeof tokens;
export type Theme = Tokens;
}
Which throws a TypeScript error ts(2300)
:
Duplicate identifier 'Theme'.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.27.0 |
@typescript-eslint/parser |
2.27.0 |
TypeScript |
3.8.3 |
ESLint |
6.8.0 |
node |
13.12.0 |
yarn |
1.22.4 |
npm |
6.14.4 |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershas 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