Skip to content

Commit

Permalink
Merge pull request #802 from kokarn/master
Browse files Browse the repository at this point in the history
Add default for jsx-first-prop-new-line
  • Loading branch information
ljharb committed Apr 24, 2017
2 parents 21ed801 + 7d08955 commit 14dbf99
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
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
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 14dbf99

Please sign in to comment.