Enforce putting an empty line before a line containing a named function
> npm install eslint eslint-plugin-newline-before-func --save-dev
.eslintrc.json (An example)
{
"plugins": [
"newline-before-func"
],
"extends": [
"eslint:recommended"
],
"rules": {
"newline-before-func/newline-before-func": "warn",
}
}
Fixable | Rule ID | Description |
---|---|---|
✅ | newline-before-func | Functions should be seperated by a newline. |
Feel free to open issues or create PRs.