Skip to content

Commit c473044

Browse files
authored
Merge pull request #392 from liferay/wincent/narrow-suppressions
docs(guidelines): provide more info about narrowing suppression scope
2 parents fde79d8 + cad9843 commit c473044

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guidelines/dxp/linting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ As such, overrides need be applied using in-file comments of the form:
7676
Key points to note:
7777

7878
- If a suppression is temporary, prefer downgrading it from an error to a warning rather than turning it off completely. In this way, it will continue to be visible but it won't cause CI runs to fail.
79-
- If a suppression is permanent and the code cannot (or should not) be rewritten to avoid it, prefer narrowly scoped suppressions (eg. `eslint-disable-next-line` over `eslint-disable`).
79+
- If a suppression is permanent and the code cannot (or should not) be rewritten to avoid it, prefer narrowly scoped suppressions. In other words, prefer more targeted suppressions like `eslint-disable-next-line` over `eslint-disable`, and make sure you always provide a specific rule name as opposed to a blanket suppression (eg. `eslint-disable-next-line no-console` over `eslint-disable-next-line`). Broader suppressions run the risk of masking more problems than the suppression originally intended.
8080

8181
**NOTE:** Comments written with a leading `//` will not work:
8282

0 commit comments

Comments
 (0)