1.0.3 • Published 5 years ago

eslint-plugin-indent-class-properties v1.0.3

Weekly downloads
690
License
ISC
Repository
github
Last release
5 years ago

eslint-plugin-indent-class-properties

A rule for indentation of class properties.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-indent-class-properties:

$ npm install eslint-plugin-indent-class-properties --save-dev

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

Usage

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

{
    "plugins": [
        "indent-class-properties"
    ]
}

Then configure the rule under the rules section in your .eslintrc file. Here the indent size is set to 4 spaces.

{
    "rules": {
        "indent-class-properties/indent": ["error", 4]
    }
}

You can also use tabbed indentation:

{
    "rules": {
        "indent-class-properties/indent": ["error", "tab"]
    }
}