Rules Hub
Coding Rules Library
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Make config include/ignore paths match actual file locations
Glob and ignore patterns in tool config must point at the real path of the target file; a mismatched path silently fails to apply, even if the tool happens to behave correctly for unrelated reasons.
Bad example
| 1 | { |
| 2 | "files": { |
| 3 | "ignore": ["./styles/tailwind.css"] |
| 4 | } |
| 5 | } |
| 6 | // actual file lives at ./src/styles/tailwind.css |
Explanation (EN)
The ignore pattern targets ./styles/... but the file is under ./src/styles/..., so the rule never matches the intended file.
Objašnjenje (HR)
Ignore obrazac cilja ./styles/..., ali datoteka je u ./src/styles/..., pa se pravilo nikad ne odnosi na zeljenu datoteku.
Good example
| 1 | { |
| 2 | "files": { |
| 3 | "ignore": ["./src/styles/tailwind.css"] |
| 4 | } |
| 5 | } |
Explanation (EN)
The ignore pattern points at the actual file path, so the configuration reliably applies to the intended file.
Objašnjenje (HR)
Ignore obrazac upucuje na stvarnu putanju datoteke, pa se konfiguracija pouzdano primjenjuje na zeljenu datoteku.
Notes (EN)
Verify config paths against the real directory layout rather than assuming correctness from current tool output — coincidental behavior can hide a wrong path.
Bilješke (HR)
Provjeri putanje u konfiguraciji prema stvarnom rasporedu direktorija umjesto da pretpostavljas ispravnost iz trenutnog izlaza alata — slucajno ponasanje moze sakriti pogresnu putanju.