Skip to content

Commit b552509

Browse files
tanemclaude
andcommitted
chore: fail lint on warnings
@eslint-react/eslint-plugin's recommended-typescript config sets 38 rules at warn severity, where eslint-plugin-react's flat.recommended used error. Several of those catch real defects rather than style, among them web-api-no-leaked-timeout, web-api-no-leaked-event-listener, set-state-in-effect and purity. ESLint's reportUnusedDisableDirectives also defaults to warn. Since `eslint .` exits 0 on warnings, all of the above could regress without failing `npm test`. Add --max-warnings=0 to gate them. format no longer shells out to the lint script, so that prettier --write still runs when eslint --fix leaves an unfixable warning behind rather than being short-circuited by the new gate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 91511dc commit b552509

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"clean:dist": "shx rm -rf dist",
2323
"clean:react": "node ./scripts/clean-react.js",
2424
"compile": "tsc -p tsconfig.base.json",
25-
"format": "npm run lint -- --fix && prettier --write \"**/*.{js,ts,tsx}\"",
26-
"lint": "eslint .",
25+
"format": "eslint . --fix && prettier --write \"**/*.{js,ts,tsx}\"",
26+
"lint": "eslint . --max-warnings=0",
2727
"postbundle": "npm run clean:compiled && shx cp ./index.js ./dist/index.js",
2828
"prepare": "npm run build",
2929
"release": "tanem-scripts release",

0 commit comments

Comments
 (0)