Skip to content

Commit cad9843

Browse files
committed
docs(guidelines): provide more info about narrowing suppression scope
Seeing as this came up in code review over here: liferay-frontend/liferay-portal#746 (comment)
1 parent fde79d8 commit cad9843

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)