A linter rule is a configured check for one pattern or violation in source code. Linters scan code during development and flag rule violations before review, while teams choose each rule’s granularity and severity. section 5.3.2
Rules turn a team style guide into consistently enforced decisions. Use them to automate judgments such as brace placement, unused variables, duplicate imports, equality checks, alerts, or console usage; begin with warnings when adopting unfamiliar rules, then promote proven rules to errors. section 5.2.1 section 5.3.2
Choose the rule’s role deliberately:
- Prefer dedicated formatters for formatting because linting tools are slower and less consistent at that job. section 5.3.2
- Add or adjust a rule when an obvious issue escapes prechecks repeatedly, especially after it recurs more than three times. section 4.4.4
Make a boolean check direct
A no-unneeded-ternary rule can flag `let thingToCheck = input === 3 ? true : false;`. The simpler `let thingToCheck = input === 3;` expresses the same check directly.



