[go: up one dir, main page]

Skip to content

Commit

Permalink
feat(code-style): updates code style rules, this will cause some pain
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired authored and arschmitz committed Sep 30, 2016
1 parent 0a1c6a4 commit 15d257e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 108 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.js]
indent_style = space
indent_size = 2

[*.{diff,md}]
trim_trailing_whitespace = false
90 changes: 2 additions & 88 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -1,95 +1,9 @@
{
"preset": "ember-suave",
"excludeFiles": [
"*.js",
"tests/**/assets",
"node_modules/**"
],
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireOperatorBeforeLineBreak": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"maximumLineLength": {
"value": 120,
"allowComments": true,
"allowRegex": true
},
"validateIndentation": 4,
"validateQuoteMarks": "'",
"disallowMultipleLineStrings": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"disallowSpaceAfterPrefixUnaryOperators": true,
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBinaryOperators": [
"=",
"+=",
"-=",
"*=",
"/=",
"%=",
"<<=",
">>=",
">>>=",
"&=",
"|=",
"^=",
"+=",
"+",
"-",
"*",
"/",
"%",
"<<",
">>",
">>>",
"&",
"|",
"^",
"&&",
"||",
"===",
"==",
">=",
"<=",
"<",
">",
"!=",
"!=="
],
"requireSpaceAfterBinaryOperators": true,
"requireSpacesInConditionalExpression": true,
"requireSpaceBeforeBlockStatements": true,
"requireLineFeedAtFileEnd": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInAnonymousFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideArrayBrackets": "all",
"disallowSpacesInsideParentheses": true,
"jsDoc": {
"checkParamNames": true,
"requireParamTypes": true
},
"disallowMultipleLineBreaks": true,
"disallowNewlineBeforeBlockStatements": true
"disallowConstOutsideModuleScope": false
}
53 changes: 33 additions & 20 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
{
"browser": true,
"curly": true,
"eqnull": true,
"expr": true,
"maxerr": 100,
"freeze": true,
"esversion":6,
"newcap": true,
"node": true,
"strict": false,
"sub": true,
"trailing": true,
"undef": true,
"unused": true,
"camelcase": true,
"indent": 4,
"validthis": true,
"globals": {
"define": false
}
"maxerr": 100,
"freeze": true,
"node": false,
"indent": 2,
"predef": [
"document",
"window"
],
"browser": true,
"boss": true,
"curly": true,
"debug": false,
"devel": true,
"eqeqeq": true,
"evil": true,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"nomen": false,
"onevar": false,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": false,
"eqnull": true,
"esnext": true,
"unused": true
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"devDependencies": {
"babel-preset-es2015-rollup": "^1.1.1",
"changelogplease": "^1.2.0",
"ember-suave": "^2.0.1",
"git-tags": "^0.2.4",
"grunt": "0.4.x",
"grunt-banner": "^0.2.3",
Expand Down

0 comments on commit 15d257e

Please sign in to comment.