Last active
December 20, 2015 06:39
-
-
Save thomasfr/6087764 to your computer and use it in GitHub Desktop.
WebStorm Code Style Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Multiline | |
C-style | |
Comment | |
*/ | |
var myLink = { | |
img: "btn.gif", | |
text: "Button", | |
width: 128 | |
} | |
varName = val; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(x, y, z) { | |
bar(1, b); | |
var i = 0; | |
var x = {0: "zero", 1: "one"}; | |
var foo = function () { | |
} | |
if (!i > 10) { | |
for (var j = 0; j < 10; j++) { | |
switch (j) { | |
case 0: | |
value = "zero"; | |
break; | |
case 1: | |
value = "one"; | |
break; | |
} | |
var c = j > 5 ? "GT 5" : "LE 5"; | |
} | |
} | |
else { | |
var j = 0; | |
try { | |
while (j < 10) { | |
if (i == j || j > 5) { | |
a[j] = i + j * 12; | |
} | |
i = (j << 2) & 4; | |
j++; | |
} | |
do { | |
j--; | |
} | |
while (j > 0) | |
} | |
catch (e) { | |
alert("Failure: " + e.message); | |
} | |
finally { | |
reset(a, i); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buzz() { | |
return 0; | |
} | |
var foo = { | |
numbers: [ | |
'one', 'two', | |
'three', 'four', | |
'five', 'six' | |
], | |
// fBar : function (x,y); | |
fOne: function (argA, argB, argC, argD, argE, argF, argG, argH) { | |
var x = argA + argB + argC + argD + argE + argF + argG + argH; | |
this.fTwo(argA, argB, argC, this.fThree(argD, argE, argF, argG, argH)); | |
var z = argA == 'Some string' ? 'yes' : 'no'; | |
var colors = [ | |
'red', | |
'green', | |
'blue', | |
'black', | |
'white', | |
'gray' | |
]; | |
for (var colorIndex = 0; colorIndex < colors.length; colorIndex++) { | |
var colorString = this.numbers[colorIndex]; | |
} | |
}, | |
fTwo: function (strA, strB, strC, strD) { | |
if (true) { | |
return strC; | |
} | |
if (strA == 'one' && (strB == 'two' || strC == 'three')) { | |
return strA + strB + strC; | |
} | |
else { | |
return strD; | |
} | |
if (strA == 'one') { | |
return 1; | |
} | |
else if (strA == 'two') { | |
return 2; | |
} | |
var number = -10; | |
while (x < 0) { | |
number = number + 1; | |
} | |
do { | |
number = number + 1; | |
} | |
while (number < 10); | |
return strD; | |
}, | |
fThree: function (strA, strB, strC, strD, strE) { | |
var number = prompt("Enter a number:", 0); | |
switch (number) { | |
case 0 : | |
alert("Zero"); | |
break; | |
case 1: | |
alert("One"); | |
break; | |
} | |
try { | |
a[2] = 10; | |
} | |
catch (e) { | |
alert("Failure: " + e.message); | |
} | |
return strA + strB + strC + strD + strE; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment