List of available rules

Rules

Rules in ESLint are grouped by category to help you understand their purpose.

No rules are enabled by default. The "extends": "eslint:recommended" property in a configuration file enables rules that report common problems, which have a check mark (recommended) below.

The --fix option on the command line automatically fixes problems (currently mostly whitespace) reported by rules which have a wrench (fixable) below.

{% for category in site.data.rules.categories %}

{{ category.name}}

{{ category.description }}

{% for rule in category.rules %} {% endfor %}
{% if rule.recommended %}(recommended){% endif %} {% if rule.fixable %}(fixable){% endif %} [{{rule.name}}]({{rule.name}}) {{rule.description}}

{% endfor %}

{% if site.data.rules.deprecated %}

{{ site.data.rules.deprecated.name }}

{{ site.data.rules.deprecated.description }}

{% for rule in site.data.rules.deprecated.rules %} {% if rule.replacedBy.size > 0 %} {% endfor %}
Deprecated rule Replaced by
[{{rule.name}}]({{rule.name}}) {% for replaced in rule.replacedBy %}[{{replaced}}]({{replaced}}){% endfor %} {% else %}

(no replacement)

{% endif %}
{% endif %}

{{ site.data.rules.removed.name }}

{{ site.data.rules.removed.description }}

{% for rule in site.data.rules.removed.rules %} {% if rule.replacedBy.size > 0 %} {% endfor %}
Removed rule Replaced by
[{{rule.removed}}]({{rule.removed}}) {% for replaced in rule.replacedBy %}[{{replaced}}]({{replaced}}){% endfor %} {% else %}

(no replacement)

{% endif %}
このページの内容は https://eslint.org/docs/rules (MIT) から引用しています