Skip to content

Commit 0a2c510

Browse files
committed
Fix indent errors
1 parent 1bcaee0 commit 0a2c510

7 files changed

+30
-27
lines changed

lib/rules/display-name.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ module.exports = {
9999
node.type === 'ObjectExpression' &&
100100
node.parent &&
101101
node.parent.parent &&
102-
node.parent.parent.type === 'AssignmentExpression' && (
102+
node.parent.parent.type === 'AssignmentExpression' &&
103+
(
103104
!node.parent.parent.left.object ||
104105
node.parent.parent.left.object.name !== 'module' ||
105106
node.parent.parent.left.property.name !== 'exports'

lib/rules/jsx-indent.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ module.exports = {
169169
return startLine !== endLine;
170170
}
171171

172-
/**
173-
* Check if the node is the right member of a logical expression
174-
* @param {ASTNode} node The node to check
175-
* @return {Boolean} true if its the case, false if not
176-
*/
172+
/**
173+
* Check if the node is the right member of a logical expression
174+
* @param {ASTNode} node The node to check
175+
* @return {Boolean} true if its the case, false if not
176+
*/
177177
function isRightInLogicalExp(node) {
178178
return (
179179
node.parent &&
@@ -183,11 +183,11 @@ module.exports = {
183183
);
184184
}
185185

186-
/**
187-
* Check if the node is the alternate member of a conditional expression
188-
* @param {ASTNode} node The node to check
189-
* @return {Boolean} true if its the case, false if not
190-
*/
186+
/**
187+
* Check if the node is the alternate member of a conditional expression
188+
* @param {ASTNode} node The node to check
189+
* @return {Boolean} true if its the case, false if not
190+
*/
191191
function isAlternateInConditionalExp(node) {
192192
return (
193193
node.parent &&

lib/rules/jsx-no-literals.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040

4141
Literal: function(node) {
4242
if (
43-
!/^[\s]+$/.test(node.value) &&
43+
!/^[\s]+$/.test(node.value) &&
4444
node.parent &&
4545
node.parent.type !== 'JSXExpressionContainer' &&
4646
node.parent.type !== 'JSXAttribute' &&

lib/rules/no-unused-prop-types.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,8 @@ module.exports = {
596596
);
597597
// let {firstname} = props
598598
var genericDestructuring = isPropAttributeName(node) && (
599-
utils.getParentStatelessComponent() ||
600-
isInLifeCycleMethod(node)
599+
utils.getParentStatelessComponent() ||
600+
isInLifeCycleMethod(node)
601601
);
602602

603603
if (thisDestructuring) {
@@ -751,9 +751,9 @@ module.exports = {
751751
if (prop.node && !isPropUsed(component, prop)) {
752752
context.report(
753753
prop.node,
754-
UNUSED_MESSAGE, {
755-
name: prop.fullName
756-
}
754+
UNUSED_MESSAGE, {
755+
name: prop.fullName
756+
}
757757
);
758758
}
759759

@@ -842,8 +842,8 @@ module.exports = {
842842
var thisDestructuring = destructuring && node.init.type === 'ThisExpression';
843843
// let {firstname} = props
844844
var statelessDestructuring = destructuring && isPropAttributeName(node) && (
845-
utils.getParentStatelessComponent() ||
846-
isInLifeCycleMethod(node)
845+
utils.getParentStatelessComponent() ||
846+
isInLifeCycleMethod(node)
847847
);
848848

849849
if (!thisDestructuring && !statelessDestructuring) {

lib/rules/prop-types.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,9 @@ module.exports = {
623623
name: name,
624624
allNames: allNames,
625625
node: (
626-
!isDirectProp && !inConstructor() && !inComponentWillReceiveProps() ? node.parent.property :
627-
node.property
626+
!isDirectProp && !inConstructor() && !inComponentWillReceiveProps() ?
627+
node.parent.property :
628+
node.property
628629
)
629630
});
630631
break;

lib/rules/require-optimization.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ module.exports = {
114114
}
115115

116116
return Boolean(
117-
node &&
118-
node.key.name === 'mixins' &&
119-
hasPR
120-
);
117+
node &&
118+
node.key.name === 'mixins' &&
119+
hasPR
120+
);
121121
};
122122

123123
/**

lib/util/Components.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ function componentRule(rule, context) {
294294
node[property].alternate.type === 'JSXElement'
295295
;
296296
var returnsConditionalJSX =
297-
strict ? (returnsConditionalJSXConsequent && returnsConditionalJSXAlternate) :
298-
(returnsConditionalJSXConsequent || returnsConditionalJSXAlternate);
297+
strict ?
298+
(returnsConditionalJSXConsequent && returnsConditionalJSXAlternate) :
299+
(returnsConditionalJSXConsequent || returnsConditionalJSXAlternate);
299300

300301
var returnsJSX =
301302
node[property] &&

0 commit comments

Comments
 (0)