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

Reference for default configuration #130

Open
digitalcora opened this issue Feb 17, 2020 · 4 comments
Open

Reference for default configuration #130

digitalcora opened this issue Feb 17, 2020 · 4 comments

Comments

@digitalcora
Copy link

digitalcora commented Feb 17, 2020

Unless I've missed something, right now it doesn't seem possible to get an overview of all supported rules and their default settings. This makes it difficult to discover rules that are disabled by default, and to decide ahead of time what kind of code style you want to enforce. For example, even if you're in the habit of running ameba --all, you might not realize LineLength exists.

How other linters handle this:

Rubocop has a default.yml which defines the default values for all known rules in one place. It has an "inheritance" mechanism so user configuration can start with these settings and override them.

Credo has a gen.config command-line task that generates a config file containing all known rules and their default settings. This is like copying Rubocop's default.yml into your project, though the config format is more concise (most rules fit on one line).

ESLint has "inheritance" like Rubocop, and comes with a recommended config which is inherited by default when you set up the library with eslint --init (this also automatically adds overrides for rules your code currently fails). There is a nice table of all supported rules and whether they are enabled in the recommended config.

@veelenga
Copy link
Member

Thanks for pointing this out. It was planned to have the ability to generate a config file containing all the available rules. I have to finalize a convenient design for this.

@Sija
Copy link
Member

Sija commented Feb 3, 2021

#179 made the rule list a bit more accessible, though it doesn't cover all of the mentioned features from OP.

@nobodywasishere
Copy link
Contributor

Related, #497 could provide similar introspection about the different rules config options.

@Sija
Copy link
Member

Sija commented Nov 17, 2024

@nobodywasishere That's certainly helpful, although won't resolve this issue as-is.

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

No branches or pull requests

4 participants