Skip to content

Commit

Permalink
Adding npm run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 16, 2014
1 parent 0b862da commit af5dedd
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
55 changes: 55 additions & 0 deletions .jscs.json
@@ -0,0 +1,55 @@
{
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],

"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],

"disallowSpaceAfterKeywords": [],

"requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },

"disallowSpacesInsideParentheses": true,

"disallowSpacesInsideArrayBrackets": true,

"disallowQuotedKeysInObjects": "allButReserved",

"disallowSpaceAfterObjectKeys": true,

"requireCommaBeforeLineBreak": true,

"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"requireSpaceAfterPrefixUnaryOperators": [],

"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"requireSpaceBeforePostfixUnaryOperators": [],

"disallowSpaceBeforeBinaryOperators": [],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],

"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"disallowSpaceAfterBinaryOperators": [],

"disallowImplicitTypeConversion": ["binary", "string"],

"disallowKeywords": ["with", "eval"],

"validateLineBreaks": "LF",

"requireKeywordsOnNewLine": [],
"disallowKeywordsOnNewLine": ["else"],

"requireLineFeedAtFileEnd": true,

"disallowTrailingWhitespace": true,

"excludeFiles": ["node_modules/**", "vendor/**"],

"disallowMultipleLineStrings": true,

"additionalRules": []
}

6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -8,7 +8,8 @@
"scripts": {
"test": "node test.js && npm run coverage",
"coverage": "covert test.js",
"coverage-quiet": "covert test.js --quiet"
"coverage-quiet": "covert test.js --quiet",
"lint": "jscs *.js"
},
"repository": {
"type": "git",
Expand All @@ -30,7 +31,8 @@
"dependencies": {},
"devDependencies": {
"tape": "~2.14.0",
"covert": "~1.0.0"
"covert": "~1.0.0",
"jscs": "~1.5.9"
},
"testling": {
"files": "test.js",
Expand Down

0 comments on commit af5dedd

Please sign in to comment.