alecxe
alecxe

Reputation: 474131

Making all plugin specific rules strict

In eslint.json configuration, ESLint allows to configure rule strictness using the following logic:

Example:

{
  "rules": {
    "jasmine/valid-expect": 2,
    "eqeqeq": [2, "smart"]
  }
}

Question: Is it possible to make all plugin-specific rules strict (code 2)?

In this case, we want all rules coming from jasmine (eslint-plugin-jasmine plugin) produce an error if there is a violation.

I've tried to specify "jasmine/*": 2 and "jasmine": 2, but both failed with a "definition for rule ... not found" error.

Upvotes: 0

Views: 78

Answers (1)

Ilya Volodin
Ilya Volodin

Reputation: 11266

ESLint doesn't have support for wildcards in configuration. However, you can request that plugin creator adds a shareable config into their plugin (http://eslint.org/docs/developer-guide/working-with-plugins#configs-in-plugins) after that you can just add extends: plugin:jasmine/all into your config file to use config all provided by plugin.

Upvotes: 2

Related Questions