quick-lint/quick-lint-js

config: ignore specific rules

KraXen72 opened this issue ยท 8 comments

i couldn't find a way to supress specific error codes in https://quick-lint-js.com/config/. Due to #1172, i want to supress https://quick-lint-js.com/errors/E0214/

I think you would rather have a config file like

// quick-lint-js.config
{
  "globals": {
    "VtourInfoDB": {"writable": false}
  }
}

. imo telling me about undeclared types is one of quick-lint's key features since this often means a typo in a type name

typescript already tells you about undeclared types, no? also, as it currently is, quick-lint doesen't resolve some global types (see other issue), so there are a bunch of false positives

typescript already tells you about undeclared types, no?

Yes, this is correct.

You can use quick-lint-js on TypeScript code without using TypeScript's compiler.

i couldn't find a way to supress specific error codes in https://quick-lint-js.com/config/. Due to #1172, i want to supress https://quick-lint-js.com/errors/E0214/

To suppress this warning, use the literally-anything global group in your quick-lint-js.config file:

{
  "global-groups": ["literally-anything"]
}

The documentation mentions that literally-anything suppresses some diagnostics, but it doesn't mention E0214. It does suppress E0214. I'll fix the documentation.

Let me know if setting "global-groups": ["literally-anything"] works for you.

I improved the documentation a bit in commit 5bd592e.

i'll test it, thanks. but i'm not a huge fan of suppressing some bigger group of warnings that i might not need to supress. this is a good workaround until one of the solutions in the other issue gets implemented.

Can't .d.ts files declare global variables too? In that case, how is literally-anything different from what you want?

i'm not a huge fan of suppressing some bigger group of warnings that i might not need to supress.

I understand. quick-lint-js takes a different approach to suppression than ESLint.

Using globals and global-groups is how you suppress this kind of warning.

okay, thanks. i'll check out the improved docs.