Skip to content

Commit

Permalink
Add jscs, add style script, run style checks first
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshire137 committed Nov 24, 2015
1 parent b6e3661 commit d88bb10
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .jscsrc
@@ -0,0 +1,11 @@
{
"preset": "google",
"maximumLineLength": {
"value": 80,
"tabSize": 2,
"allowUrlComments": true,
"allowRegex": true
},
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties"
}

7 changes: 5 additions & 2 deletions package.json
Expand Up @@ -16,7 +16,9 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "if [ -d \"tmp\" ]; then if find tmp -mindepth 1 -print -quit | grep -q .; then rm tmp/*; fi; fi; mocha; echo \"Running jshint\"; ./node_modules/jshint/bin/jshint index.js test/test.js"
"test": "npm run-script style && npm run-script unit-test",
"style": "node_modules/.bin/jscs index.js test/test.js && node_modules/jshint/bin/jshint index.js test/test.js",
"unit-test": "if [ -d \"tmp\" ]; then if find tmp -mindepth 1 -print -quit | grep -q .; then rm tmp/*; fi; fi; mocha"
},
"files": [
"index.js"
Expand All @@ -38,7 +40,8 @@
},
"devDependencies": {
"gulp": "~3.5.2",
"jshint": "^2.7.0",
"jshint-stylish": "^1.0.1",
"jscs": "^1.13.1",
"mocha": "*"
}
}

0 comments on commit d88bb10

Please sign in to comment.