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

Indicate which rules are part of the preset, and which aren't #165

Closed
jzaefferer opened this issue May 24, 2020 · 2 comments · Fixed by #251
Closed

Indicate which rules are part of the preset, and which aren't #165

jzaefferer opened this issue May 24, 2020 · 2 comments · Fixed by #251
Assignees
Milestone

Comments

@jzaefferer
Copy link

I want to request a feature.

The readme lists all the available rules (yay), but gives no indication which of those are part of the recommended preset, and which aren't. Since I'd like to check out the others rules, I'm looking for a list of the rules outside the preset. Which I can't find so far.

I suspect that the recommended preset is created here, but I haven't yet figured out what's actually happening: https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/src/index.ts

Here's an example of a table of rules from a different plugin that indicate which rules are included in which preset: https://github.com/testing-library/eslint-plugin-testing-library#supported-rules - this is really nice!

Here's another example, which only lists the rules in the preset, separate from the main list of rules: https://github.com/yannickcr/eslint-plugin-react#recommended - still better than nothing, but requires more effort to identify the not-in-the-preset rules.

@Loxos
Copy link
Contributor

Loxos commented Oct 19, 2020

https://github.com/SonarSource/eslint-plugin-sonarjs/blob/master/src/index.ts is in fact the place where the recommended preset is generated.
At the moment the recommended preset contains all available rules in this plugin on error level.
I could imagine that we could offer a few more presets as improvements: For example Bug Detection and Code Smell Detection as seperate presets as well as a warn preset is described in #166

@jzaefferer
Copy link
Author

At the moment the recommended preset contains all available rules in this plugin on error level.

Adding that to the readme would probably help a lot already

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

Successfully merging a pull request may close this issue.

3 participants