Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Update JSCS rules.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-roemer committed Jan 28, 2015
1 parent bea9233 commit 6693372
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 14 deletions.
42 changes: 34 additions & 8 deletions .jscsrc
@@ -1,4 +1,7 @@
{
"disallowOperatorBeforeLineBreak": ["."],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],

"requireCurlyBraces": [
"if",
"else",
Expand All @@ -9,7 +12,7 @@
"catch"
],

"requireSpaceAfterKeywords": [
"requireSpaceBeforeKeywords": [
"if",
"else",
"for",
Expand All @@ -19,9 +22,7 @@
"case",
"return",
"try",
"catch",
"function",
"typeof"
"catch"
],
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true,
Expand All @@ -30,15 +31,40 @@
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeObjectValues": true,
"requireSpaceBetweenArguments": true,
"requireSpaceAfterBinaryOperators": true,
"requireSpaceBeforeBinaryOperators": true,
"requireSpaceAfterKeywords": true,
"requireSpaceBeforeBlockStatements": true,
"requireSpacesInConditionalExpression": true,
"requireSpacesInForStatement": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpacesInsideArrayBrackets": {
"allExcept": [ "[", "]", "{", "}" ]
},
"requireSpacesInsideObjectBrackets": "all",

"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineBreaks": true,
"disallowMultipleLineStrings": true,
"disallowMultipleVarDecl": true,
"disallowNewlineBeforeBlockStatements": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireSpaceAfterLineComment": true,
"requireSpaceBeforeObjectValues": true,
"disallowSpaceAfterObjectKeys": true,
"disallowSpacesInCallExpression": true,
"requireCommaBeforeLineBreak": true,
"requireSpacesInForStatement": true,
"disallowEmptyBlocks": true,
"disallowYodaConditions": true,
"disallowKeywordsOnNewLine": ["else"],
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
"requireOperatorBeforeLineBreak": true,
"requireParenthesesAroundIIFE": true,
"safeContextKeyword": ["self"],
"validateIndentation": 2,
"validateQuoteMarks": "\""
}
}
4 changes: 2 additions & 2 deletions scripts/init-db.js
Expand Up @@ -36,8 +36,8 @@ var init = module.exports = function (dbPath, callback) {
// Script. Use defaults (init dev. database).
if (require.main === module) {
init(DB_PATH, function (err) {
if (err) { console.log("ERROR: ", err); }
if (db) { db.close(); }
if (err) { console.log("ERROR: ", err); }
if (db) { db.close(); }
console.log("Finished initialization of: " + DB_PATH);
});
}
8 changes: 4 additions & 4 deletions webpack.config.js
Expand Up @@ -23,13 +23,13 @@ module.exports = {
},
externals: {
// Deliberately undefined vars for conditional exclusion for exoskeleton.
"jquery": "__NOOP",
"underscore": "__NOOP"
jquery: "__NOOP",
underscore: "__NOOP"
},
resolve: {
alias: {
"type": "type-of", // For `component-ajax`
"backbone": "exoskeleton" // For backbone.localStorage imports.
type: "type-of", // For `component-ajax`
backbone: "exoskeleton" // For backbone.localStorage imports.
}
},
plugins: [
Expand Down

0 comments on commit 6693372

Please sign in to comment.