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