Skip to content

[restrict-plus-operands] rule doesn't support bigint #309

@novemberborn

Description

@novemberborn

Repro

{
  "plugins": ["@typescript-eslint"],
  "rules": {
    "@typescript-eslint/restrict-plus-operands": "error"
  }
}
1n + 1n

Expected Result

No errors.

Actual Result

The operands are not numbers, but they're bigints which are still addable without type conversion.

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 1.4.0
@typescript-eslint/parser 1.4.0
TypeScript 3.2.1
ESLint X.Y.Z
node X.Y.Z
npm X.Y.Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions