denoland / deno_lint

Blazing fast linter for JavaScript and TypeScript written in Rust
https://lint.deno.land/
MIT License
1.53k stars 171 forks source link

Rules that should be refined further #330

Open magurotuna opened 4 years ago

magurotuna commented 4 years ago

Now that all the recommended rules have been implemented, it's good time to look back at the rules again. I have looked through how the rules are implemented, and have noticed that some rules need more refinement. Current issues I've found are:

rules that need refinement

Note that this list has been made from my quick look, thus it may contain rules that actually don't need any fix.

recommended_rules

all_rules

bartlomieju commented 4 years ago

@magurotuna have you found bugs in all the listed rules?

IIRC most of implemented rules have ESLint tests ported, but I'm more than happy to add more tests if they are lacking.

magurotuna commented 4 years ago

@bartlomieju

have you found bugs in all the listed rules?

not necessarily, but I feel like lots of the listed rules are unable to catch nested violations. For example, with no-with rule, if we run a test like

    assert_lint_err_n::<NoWith>(
      "with (foo) { with(bar) { console.log(42); }}",
      vec![0, 13],
    );

it is expected to pass, but the rule doesn't detect with(bar). Most likely this goes for the other rules.

I will fix them one by one, giving priority to "recommended" rules over the others. Hopefully it will not take much time, but I guess it will...

bartlomieju commented 4 years ago

@magurotuna I see, thanks for digging into this problem.

bartlomieju commented 3 years ago

@magurotuna is this issue still relevant?

magurotuna commented 3 years ago

@bartlomieju Not really sure, let me check if the issue remains.