Skip to content

Commit 14dbf99

Browse files
authored
Merge pull request #802 from kokarn/master
Add default for jsx-first-prop-new-line
2 parents 21ed801 + 7d08955 commit 14dbf99

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/rules/jsx-first-prop-new-line.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This rule checks whether the first property of all JSX elements is correctly pla
1010
* `always`: The first property should always be placed on a new line.
1111
* `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.
1212
* `multiline`: The first property should always be placed on a new line when the JSX tag takes up multiple lines.
13-
* `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.
13+
* `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`
1414

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

lib/rules/jsx-first-prop-new-line.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = {
2323
},
2424

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

2828
function isMultilineJSX(jsxNode) {
2929
return jsxNode.loc.start.line < jsxNode.loc.end.line;

0 commit comments

Comments
 (0)