Rules
no-bigint-literals
Use BigInt construction instead of bigint literal syntax.
Purpose and behavior
Use BigInt construction instead of bigint literal syntax.
Official Effect rule, vendored at b1d200c40a1dad69def51ebdbf0a1a612a12b8ac. Reports literal nodes whose runtime value is bigint and replaces them with BigInt("
Options
No configurable options. Enable with "rules/no-bigint-literals": "error".
Invalid example
const value = 123nValid example
const value = BigInt("123")Fixes and exceptions
This rule supplies an automatic code fix. Review the resulting import bindings and runtime resolution before applying it.
For a genuine boundary exception, use an oxlint-disable-next-line rules/no-bigint-literals -- reason comment. Examples illustrate this rule alone and may omit imports and declarations.
Source and tests
Enabled by the Effect preset.