Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules that should be refined further #330

Open
27 of 40 tasks
magurotuna opened this issue Sep 21, 2020 · 5 comments
Open
27 of 40 tasks

Rules that should be refined further #330

magurotuna opened this issue Sep 21, 2020 · 5 comments
Labels

Comments

@magurotuna
Copy link
Member

magurotuna commented Sep 21, 2020

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:

  • unable to catch violations in nested blocks, just like no-unsafe-finally doesn't catch nested violations #327
  • some cases that should be reported are ignored (e.g. normal funcions are considered, but arrow functions are not)
  • insufficient test cases (I think porting the ESLint's tests would be good as it would guarantee the compatibility with ESLint.)

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
Copy link
Member

@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
Copy link
Member Author

magurotuna commented Sep 21, 2020

@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
Copy link
Member

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

@bartlomieju
Copy link
Member

@magurotuna is this issue still relevant?

@magurotuna
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants