Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

loft-br/eslint-plugin-loft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-loft

Loft's ESLint custom rules

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-loft:

$ npm install eslint-plugin-loft --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-loft globally.

Usage

Add loft to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "loft"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "loft/prefer-compose": 2
    }
}

Supported Rules

  • prefer-compose: Rule that suggests the use of compose, instead of multiple HOC