Skip to content

Latest commit

 

History

History
 
 

eslint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

eslint-plugin-eslint-dimagi

Dimagi-specific ESLint rules. Intended for developers of CommCareHQ.

Installation

You'll first need to install ESLint:

$ yarn add eslint --save-dev

Next, install eslint-plugin-eslint-dimagi:

$ yarn add eslint-plugin-eslint-dimagi --save-dev

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

Usage

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

{
    "plugins": [
        "eslint-dimagi"
    ]
}

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

{
    "rules": {
        "eslint-dimagi/rule-name": 2
    }
}

Supported Rules

  • no-unblessed-new: Disallows use of the new keyword except with specified object types.