how to specify lint rules in deno.json?
hello. how can i specify the deno lint rules inside the
deno.json
file?
if that is not possible, and they can only be passed via the cli, is there some other way to specify multiple of them in a single command? i would prefer not to write 105 flags.10 Replies
i think i found it. it's under
lint.rules.include
then perhaps my question is, is there a list of defaults somewhere? maybe the recommended
are the defaults?Yup! Recommended are the defaults
You can find the list here: https://lint.deno.land/
If you select the checkbox at the top you will see non-recommended rules too
hmm, it does not seem to respect any of the specified rules. i also passed the config file in with
--config
, though it is in the default location of ./deno.json
. am i doing something wrong?
i also tried without the "tags": ["recommended"]
field, but it is the sameCan you show some screenshot?
of course
rootHandler
not having the Response
return type should error outWhat if you add non-camel-case variable - eg.
const hello_there = "hello";
Is it also not geting flagged?ok, i tried a few of them out, including the
camelcase
you mention, and all seem to work except the explicit-function-return-type
if this does turn out to be a bug, it will be that much funnier, since i opened a previous issue as a bug, but referenced it as a deno check
issue, not a deno lint
issue :^)
i'll open up an issue on githubGitHub
deno lint does not enforce explicit-function-return-type · Issue #2...
deno 2.0.0 (stable, release, x86_64-unknown-linux-gnu) v8 12.9.202.13-rusty typescript 5.6.2 deno lint does not enforce the explicit-function-return-type rule. Assuming the following deno.json snip...
Thanks!