Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

emmenko/eslint-plugin-no-class

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This repository is deprecated and not maintained anymore

eslint-plugin-no-class

NPM version Build Status

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/no-class": 2
  }
}

About

Avoid usage of class

Resources

License

Stars

Watchers

Forks

Packages

No packages published