You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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 realizeLineLength
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'sdefault.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.The text was updated successfully, but these errors were encountered: