eslint-plugin-no-class

ESlint rule to forbid classes

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-no-class
2000.1.08 years ago8 years agoMinified + gzip package size for eslint-plugin-no-class in KB

Readme

eslint-plugin-no-class
!NPM versionnpm-imagenpm-url !Build Statustravis-imagetravis-url
Linting rule for ESLint:
When do I need this?
Normally you don't need this rule if you disable classes in your ecmaFeatures configuration. If you are using babel-eslint as a parser though, it won't work since Acorn doesn't support ecmaFeatures specific flags and simply ignores it (see discussion).
So if you want to forbid the use of class, and you are using babel-eslint you should install this rule.
Installation
Install ESLint either locally or globally.
$ npm i eslint
$ npm i eslint-plugin-no-class
Configuration
Add plugins section and specify eslint-plugin-no-class as a plugin.
{
  "plugins": [
    "no-class"
  ]
}

Finally, enable the rule.
{
  "rules": {
    "no-class": 2
  }
}