Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-no-bigint-usage

mstrokin251.0.2

Simple eslint plugin to disallow the use of bigint literals (that might break on older JS engines)

eslint, eslint-plugin, jsc, bigint

readme

eslint-plugin-no-bigint-usage

Simple eslint plugin to disallow the use of BigInt literals.

Installation

yarn add --dev eslint eslint-plugin-no-bigint-usage

Note: If you installed ESLint globally then you must also install eslint-plugin-no-bigint-usage globally.

Usage

Add no-bigint-usage to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["no-bigint-usage"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "no-bigint-usage/no-bigint-literals": "error"
  }
}

Reasons to use this plugin

Older JS engines might display this error if you try to use BigInt literals:

No identifiers allowed directly after numeric literal

This plugin makes sure you don't have BigInt literals in your codebase.