Browse Source

fix fixers

CrazyDoctor 2 years ago
parent
commit
cf712d72ca
1 changed files with 4 additions and 4 deletions
  1. 4 4
      index.js

+ 4 - 4
index.js

@@ -28,7 +28,7 @@ module.exports = {
 								node: node,
 								message: 'Do not use spaces between \'if\' and its condition',
 								fix: function(fixer) {
-									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '(');
+									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '');
 								}
 							});
 						}
@@ -49,7 +49,7 @@ module.exports = {
 								node: node,
 								message: 'Do not use spaces between \'for\' and its condition',
 								fix: function(fixer) {
-									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '(');
+									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '');
 								}
 							});
 						}
@@ -70,7 +70,7 @@ module.exports = {
 								node: node,
 								message: 'Do not use spaces between \'while\' and its condition',
 								fix: function(fixer) {
-									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '(');
+									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '');
 								}
 							});
 						}
@@ -91,7 +91,7 @@ module.exports = {
 								node: node,
 								message: 'Do not use spaces between \'switch\' and its expression',
 								fix: function(fixer) {
-									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '(');
+									return fixer.replaceTextRange([firstToken.range[1], secondToken.range[0]], '');
 								}
 							});
 						}