eslint-plugin-indent-class-properties
v1.0.3
Published
A rule for indentation of class properties.
Downloads
1,220
Maintainers
Readme
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"]
}
}