From 7d08955d8db3e5e1dc088e92cf4a9209e325088b Mon Sep 17 00:00:00 2001 From: kokarn Date: Thu, 1 Sep 2016 10:23:26 +0200 Subject: [PATCH] Add default for jsx-first-prop-new-line --- docs/rules/jsx-first-prop-new-line.md | 2 +- lib/rules/jsx-first-prop-new-line.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rules/jsx-first-prop-new-line.md b/docs/rules/jsx-first-prop-new-line.md index 67e45d4067..dd3bcd3644 100644 --- a/docs/rules/jsx-first-prop-new-line.md +++ b/docs/rules/jsx-first-prop-new-line.md @@ -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"`: diff --git a/lib/rules/jsx-first-prop-new-line.js b/lib/rules/jsx-first-prop-new-line.js index 6307439b8b..2c6b7c8638 100644 --- a/lib/rules/jsx-first-prop-new-line.js +++ b/lib/rules/jsx-first-prop-new-line.js @@ -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;