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).
Use the linter's exact rule id in disable directives
Disable comments must reference the rule id in the format the active linter recognizes; a mistyped id silently fails to suppress anything.
Bad example
| 1 | // eslint-disable-next-line no-param-reassign typescript-eslint(no-deprecated) |
| 2 | foo.bar = 1; |
Explanation (EN)
`typescript-eslint(no-deprecated)` is not a valid rule-id syntax, so the linter ignores it and the deprecation warning is never suppressed.
Objašnjenje (HR)
`typescript-eslint(no-deprecated)` nije valjana sintaksa id-a pravila, pa ga linter ignorira i upozorenje o zastarjelosti nikad nije potisnuto.
Good example
| 1 | // eslint-disable-next-line no-param-reassign, typescript/no-deprecated |
| 2 | foo.bar = 1; |
Explanation (EN)
Using the exact rule id the linter exposes (e.g. `typescript/no-deprecated`) makes the suppression actually take effect.
Objašnjenje (HR)
Koristenje tocnog id-a pravila koji linter izlaze (npr. `typescript/no-deprecated`) cini da potiskivanje stvarno proradi.