-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Javascript coding standard and lint files
- Loading branch information
Showing
4 changed files
with
877 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. | ||
|
||
# Set this file as the topmost .editorconfig | ||
# (multiple files can be used, and are applied starting from current document location) | ||
root = true | ||
|
||
# Use hard or soft tabs ["tab", "space"] | ||
indent_style = space | ||
|
||
# Size of a single indent [an integer, "tab"] | ||
indent_size = tab | ||
|
||
# Number of columns representing a tab character [an integer] | ||
tab_width = 4 | ||
|
||
# Line breaks representation ["lf", "cr", "crlf"] | ||
end_of_line = lf | ||
|
||
# ["latin1", "utf-8", "utf-16be", "utf-16le"] | ||
charset = utf-8 | ||
|
||
# Remove any whitespace characters preceding newline characters ["true", "false"] | ||
trim_trailing_whitespace = true | ||
|
||
# Ensure file ends with a newline when saving ["true", "false"] | ||
insert_final_newline = true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
|
||
{ | ||
"requireCurlyBraces": [ | ||
"if", | ||
"else", | ||
"for", | ||
"while", | ||
"do" | ||
], | ||
"requireSpaceAfterKeywords": [ | ||
"if", | ||
"else", | ||
"for", | ||
"while", | ||
"do", | ||
"switch", | ||
"return", | ||
"catch" | ||
], | ||
"disallowKeywords": [ | ||
"with" | ||
], | ||
"disallowKeywordsOnNewLine": [ | ||
"else", | ||
"catch" | ||
], | ||
|
||
"disallowSpaceAfterPrefixUnaryOperators": true, | ||
"disallowSpaceBeforePostfixUnaryOperators": [ | ||
"++", | ||
"--" | ||
], | ||
"requireSpaceBeforeBinaryOperators": true, | ||
"requireSpaceAfterBinaryOperators": true, | ||
|
||
"disallowSpacesInsideParentheses": true, | ||
"disallowEmptyBlocks": true, | ||
|
||
"requireParenthesesAroundIIFE": true, | ||
"requireSpacesInFunctionDeclaration": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInFunctionDeclaration": { | ||
"beforeOpeningRoundBrace": true | ||
}, | ||
"requireSpacesInAnonymousFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
"disallowSpacesInNamedFunctionExpression": { | ||
"beforeOpeningRoundBrace": true | ||
}, | ||
"requireSpacesInNamedFunctionExpression": { | ||
"beforeOpeningCurlyBrace": true | ||
}, | ||
|
||
"requireSpacesInConditionalExpression": { | ||
"afterTest": true, | ||
"beforeConsequent": true, | ||
"afterConsequent": true, | ||
"beforeAlternate": true | ||
}, | ||
|
||
"disallowSpaceBeforeBinaryOperators": [ | ||
"," | ||
], | ||
"requireCommaBeforeLineBreak": true, | ||
|
||
"validateQuoteMarks": "'", | ||
"disallowMultipleLineStrings": true, | ||
|
||
"disallowImplicitTypeConversion": [ | ||
"numeric", | ||
"boolean", | ||
"binary", | ||
"string" | ||
], | ||
"disallowYodaConditions": true, | ||
|
||
"disallowSpacesInsideArrayBrackets": true, | ||
|
||
"requireDotNotation": true, | ||
"disallowSpaceAfterObjectKeys": true, | ||
"disallowQuotedKeysInObjects": "allButReserved", | ||
|
||
"validateJSDoc": { | ||
"checkParamNames": true, | ||
"requireParamTypes": true | ||
}, | ||
|
||
"maximumLineLength": { | ||
"value": 120, | ||
"allowUrlComments": true | ||
}, | ||
"requireSpaceAfterLineComment": true, | ||
"requireLineFeedAtFileEnd": true, | ||
"disallowMultipleLineBreaks": true, | ||
"disallowMixedSpacesAndTabs": true, | ||
"disallowTrailingWhitespace": true, | ||
"validateLineBreaks": "LF", | ||
|
||
"excludeFiles": ["node_modules/**"] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"strict": true, | ||
"curly": true, | ||
"camelcase": true, | ||
"undef": true, | ||
"latedef": "nofunc", | ||
"eqeqeq": true, | ||
"browser": true, | ||
"node": true, | ||
"es3": true, | ||
"es5": false, | ||
"esnext": false, | ||
"moz": false, | ||
"newcap": true, | ||
"quotmark": "single", | ||
"maxlen": 120, | ||
"indent": 4, | ||
"noarg": true, | ||
"bitwise": false, | ||
"unused": true, | ||
"globals": { | ||
"define": false, | ||
"require": false, | ||
|
||
"describe" : false, | ||
"it" : false, | ||
"before" : false, | ||
"beforeEach" : false, | ||
"after" : false, | ||
"afterEach" : false | ||
} | ||
} |
Oops, something went wrong.