Skip to content

[restrict-plus-operands] Throws "this rule requires you to use @typescript-eslint/parser" #130

Closed
@scottohara

Description

@scottohara

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions