eslint-plugin-newline-before-paren
v1.0.0
Published
ESLint rule to disallow newlines before parenthesis on single lines.
Downloads
2,867
Readme
eslint-plugin-newline-before-paren
ESLint rule to disallow newlines before parenthesis on single lines.
Installation
After having installed ESLint, install the rule:
$ npm install eslint-plugin-newline-before-paren --save-dev
Configuration
Add newline-before-paren
to your .eslintrc
:
{
"plugins": [
"newline-before-paren"
],
"rules": {
"newline-before-paren/newline-before-paren": 2
}
}
Fail
const result = someArray.map((item) => item.prop
);
Pass
const result = someArray.map((item) => item.prop);