Strict Configuration · Quick recall Q&A

1 min read
Mid-level1 min read
Rapid overview

Quick recall Q&A

1. How do you introduce strict linting to an existing codebase?

  1. Start with warnings, not errors
  2. Use --max-warnings to prevent new issues
  3. Fix incrementally by directory/feature
  4. Use git hooks to prevent new violations
  5. Track metrics (violation count over time)

2. Which rules have the highest impact on code quality?

  • @typescript-eslint/no-explicit-any - Forces proper typing
  • @typescript-eslint/strict-boolean-expressions - Prevents truthy/falsy bugs
  • @typescript-eslint/no-floating-promises - Catches unhandled async
  • complexity - Limits function complexity
  • import/no-cycle - Prevents circular dependencies

3. How do you handle rules that conflict with your codebase style?

  1. Customize rule options (many rules have configuration)
  2. Use overrides for specific file patterns
  3. Disable with inline comments sparingly (with justification)
  4. Create team consensus on which rules to modify

See also