Enforce indention on empty lines
npm install eslint-plugin-indent-empty-linesEnforce indention on empty lines
First, you'll need to install ESLint:
```
$ npm install --save-dev eslint
Next, install eslint-plugin-indent-empty-lines:
``
$ npm install --save-dev eslint-plugin-indent-empty-lines
Extend indentEmptyLinesPlugin.configs.recommended to load the plugin with for default config.
`js
import indentEmptyLinesPlugin from 'eslint-plugin-indent-empty-lines';
import js from '@eslint/js';
export default [
js.configs.recommended,
indentEmptyLinesPlugin.configs.recommended,
{
rules: {
"indent-empty-lines/indent-empty-lines": ["warn", 2] // Use to configure the rule
// ...
},
},
];
`
Add indent-empty-lines to the plugins section of the .eslintrc configuration file. You can omit the eslint-plugin- prefix:
`json`
{
"plugins": [
"indent-empty-lines"
]
}
Then configure the rules you want to use under the rules section.
`json``
{
"rules": {
"indent-empty-lines/indent-empty-lines": ["warn", 2]
}
}