Feature Request: Syntax for ignore-directives should allow for an explanation
Summary
When a programmer bypasses a configured linting rule, they should be able to document why they made an exception. This can improve code clarity, and should encourage future programmers only to ignore a rule when there's a clear reason for doing so.
Syntax
It could use a dash preceded by a space:
// deno-lint-ignore no-explicit-any - We don't want to restrict the value's type
type Dict = Record<string, any>;
Two dashes might be clearer, and easier to distinguish from rules when parsing.
// deno-lint-ignore no-explicit-any -- We don't want to restrict the value's type
type Dict = Record<string, any>;
Makes sense, PRs are welcome!
Hi, I am trying to do this one
And If i lucky can close the ticket. I think the document should be updated somewhere as well
@bartlomieju I think I only need to update Linter section in deno-docs. Does there any other place need updating?
BTW, maybe this issue can be closed
Thanks for pointing this out @chengr4. I think we should update https://github.com/denoland/deno_lint/blob/00c9025907ac0846ae2a85067219ebc428b7ac54/www/static/ignoring-rules.md?plain=1#L4 too.
If we do not have any other issues, this issue can be closed.
Thanks for implementing this @chengr4!