-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
enhancementNew feature or requestNew feature or requesthas 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/ban-types": [
"error",
{
"types": {
"React.FunctionComponent": {
"message": "Use React.FC instead",
"fixWith": "React.FC"
}
}
}
]
}
}
import * as React from 'react';
const Thing: React.FunctionComponent = () => 'foobar';
Expected Result
Should be reported, and fixed to React.FC
Actual Result
Not reported
Additional Info
Removing React.
from the rule and the code makes it work correctly
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.1.0 |
@typescript-eslint/parser |
1.1.0 |
TypeScript |
3.2.4 |
ESLint |
5.12.1 |
node |
10.15.0 |
yarn |
1.13.0 |
theneva, j-f1 and sindresorhus
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthas 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