System Info
0.3.1
Details
no-constant-binary-expression appears to report many false positives on normal TypeScript boolean/nullish guard patterns.
After enabling the no-constant-binary-expression rule in Rsbuild repo, Rslint reports many errors, but the flagged expressions are ordinary short-circuit checks and do not look like constant binary expressions.
no-constant-binary-expression — [error] Unexpected constant || on the left-hand side of a `||` expression.
╭─┴──────────( packages/core/src/plugins/rsdoctor.ts:71:11 )─────
│ 70 │
│ 71 │ if (!module || !module[pluginName]) {
│ 72 │ return;
╰────────────────────────────────
Reproduce link
https://github.com/web-infra-dev/rsbuild
Reproduce Steps
- enable
no-constant-binary-expression in rslint.config.ts
- pnpm lint