chore: upgrade ESLint warnings to errors for stricter quality-rails

Upgraded three TypeScript rules from "warn" to "error":
- explicit-function-return-type: Functions must declare return types
- prefer-nullish-coalescing: Enforce ?? over || for null checks
- prefer-optional-chain: Enforce ?. over && chains

This tightens pre-commit enforcement to catch more issues mechanically
before code review, reducing agent iteration cycles.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 12:16:57 -06:00
parent 94afeb67e3
commit c6699908e4

View File

@@ -21,7 +21,7 @@ export default tseslint.config(
// Type Safety - STRICT (Quality Rails)
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-unused-vars": [
"error",
@@ -36,8 +36,8 @@ export default tseslint.config(
// Code Quality (Quality Rails)
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
// Security (Quality Rails)
"security/detect-object-injection": "off", // Too many false positives