1

Could someone explain the difference between an ESLInt plugin and an ESLInt rule. I did my research on https://eslint.org/docs/developer-guide/working-with-plugins#working-with-plugins and it seems like a plugin is a collection of rules. It says

Plugins can expose additional rules for use in ESLint

However I wonder does this imply that plugins can have other usage, other than storing a bunch of rules?

Also if I were to write my own ESLint rule, do I need to first create my own ESLint plugin? I suppose I cannot just modify any existing ESLint rules on any existing ESLint plugins right?

Joji
  • 4,703
  • 7
  • 41
  • 86

1 Answers1

0

I mean what else do you want to do besides store things related to eslint?

You can configure rules, environments, configs, and pre-processors in them.

The term plugin in this context is typically reserved for eslint rules, however you can also extend a plugin (https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/.eslintrc) and configure additional rules that override it.

JacobW
  • 826
  • 5
  • 15