Closed
Description
Repro
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/restrict-plus-operands": "error"
}
}
const a: string = '1.1' + 1;
Expected Result
Operands of '+' operation must either be both strings or both numbers
Actual Result
Error: Error while loading rule '@typescript-eslint/restrict-plus-operands': This rule requires you to use `@typescript-eslint/parser`.
at Object.exports.getParserServices.context [as getParserServices]
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
1.1.0 |
@typescript-eslint/parser |
1.1.0 |
TypeScript |
3.2.1 |
ESLint |
5.11.1 |
node |
11.5.0 |
npm |
6.5.0 |