Skip to content

Commit

Permalink
Add default for jsx-first-prop-new-line
Browse files Browse the repository at this point in the history
  • Loading branch information
kokarn authored and ljharb committed Apr 24, 2017
1 parent 21ed801 commit 7d08955
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/rules/jsx-first-prop-new-line.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This rule checks whether the first property of all JSX elements is correctly pla
* `always`: The first property should always be placed on a new line.
* `never` : The first property should never be placed on a new line, e.g. should always be on the same line as the Component opening tag.
* `multiline`: The first property should always be placed on a new line when the JSX tag takes up multiple lines.
* `multiline-multiprop`: The first property should always be placed on a new line if the JSX tag takes up multiple lines and there are multiple properties.
* `multiline-multiprop`: The first property should always be placed on a new line if the JSX tag takes up multiple lines and there are multiple properties. `default`

The following patterns are considered warnings when configured `"always"`:

Expand Down
2 changes: 1 addition & 1 deletion lib/rules/jsx-first-prop-new-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
},

create: function (context) {
var configuration = context.options[0];
var configuration = context.options[0] || 'multiline-multiprop';

function isMultilineJSX(jsxNode) {
return jsxNode.loc.start.line < jsxNode.loc.end.line;
Expand Down

0 comments on commit 7d08955

Please sign in to comment.