Skip to content

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

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy