Skip to content

Commit ccb9132

Browse files
committed
[jsx-wrap-multilines] Rename attr to prop
1 parent 41a29c6 commit ccb9132

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/rules/jsx-wrap-multilines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are the possible syntax available:
1616
* `arrow`
1717
* `condition`
1818
* `logical` (not enabled by default)
19-
* `attr` (not enabled by default)
19+
* `prop` (not enabled by default)
2020

2121
The following patterns are considered warnings:
2222

lib/rules/jsx-wrap-multilines.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const DEFAULTS = {
1717
arrow: true,
1818
condition: true,
1919
logical: false,
20-
attr: false
20+
prop: false
2121
};
2222

2323
// ------------------------------------------------------------------------------
@@ -54,7 +54,7 @@ module.exports = {
5454
logical: {
5555
type: 'boolean'
5656
},
57-
attr: {
57+
prop: {
5858
type: 'boolean'
5959
}
6060
},
@@ -150,7 +150,7 @@ module.exports = {
150150
},
151151

152152
JSXAttribute: function (node) {
153-
if (isEnabled('attr') && node.value && node.value.type === 'JSXExpressionContainer') {
153+
if (isEnabled('prop') && node.value && node.value.type === 'JSXExpressionContainer') {
154154
check(node.value.expression);
155155
}
156156
}

tests/lib/rules/jsx-wrap-multilines.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ const LOGICAL_NO_PAREN = `
174174
</div>
175175
`;
176176

177-
const ATTR_SINGLE_LINE = '<div attr={<p>Hello</p>}></div>';
177+
const ATTR_SINGLE_LINE = '<div prop={<p>Hello</p>}></div>';
178178

179179
const ATTR_PAREN = `
180-
<div attr={
180+
<div prop={
181181
(<div>
182182
<p>Hello</p>
183183
</div>)
@@ -187,7 +187,7 @@ const ATTR_PAREN = `
187187
`;
188188

189189
const ATTR_NO_PAREN = `
190-
<div attr={
190+
<div prop={
191191
<div>
192192
<p>Hello</p>
193193
</div>
@@ -269,7 +269,7 @@ ruleTester.run('jsx-wrap-multilines', rule, {
269269
code: ATTR_NO_PAREN
270270
}, {
271271
code: ATTR_PAREN,
272-
options: [{attr: true}]
272+
options: [{prop: true}]
273273
}
274274
],
275275

@@ -332,7 +332,7 @@ ruleTester.run('jsx-wrap-multilines', rule, {
332332
}, {
333333
code: ATTR_NO_PAREN,
334334
output: ATTR_PAREN,
335-
options: [{attr: true}],
335+
options: [{prop: true}],
336336
errors: [{message: 'Missing parentheses around multilines JSX'}]
337337
}
338338
]

0 commit comments

Comments
 (0)