Skip to content

npm run lint exits 0 when eslint reports errors, so CI misses them #295

Description

@arbrandes

Description

The lint script in package.json chains its three commands with ; instead of &&, so npm run lint exits with the status of the last command only. Errors reported by eslint . are printed but do not fail the script, and the tests CI job passes with lint errors present.

#269 is a live example. It introduces a react/display-name error in runtime/authz/hooks.test.tsx; npx eslint . reports it, npm run lint prints the same error and exits 0, and every check on the PR is green.

Chaining the commands with &&, or splitting them into separate CI steps, would surface the failure.

Metadata

Metadata

Assignees

Type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions