Skip to content

Commit

Permalink
add linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dpatti committed Jan 11, 2016
1 parent d251f32 commit f63ac0b
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
91 changes: 91 additions & 0 deletions .coffeelint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"coffeescript_error": {
"level": "error"
},
"duplicate_key": {
"level": "error"
},
"empty_constructor_needs_parens": {
"level": "error"
},
"line_endings": {
"level": "error",
"value": "unix"
},
"no_empty_param_list": {
"level": "error"
},
"no_tabs": {
"level": "error"
},
"no_throwing_strings": {
"level": "error"
},
"no_trailing_semicolons": {
"level": "error"
},
"no_trailing_whitespace": {
"level": "error",
"allowed_in_empty_lines": false,
"allowed_in_comments": false
},
"cyclomatic_complexity": {
"value": 10,
"level": "error"
},







"arrow_spacing": {
"level": "ignore"
},
"camel_case_classes": {
"level": "ignore"
},
"colon_assignment_spacing": {
"level": "ignore"
},
"indentation": {
"value": 2,
"level": "ignore"
},
"max_line_length": {
"value": 100,
"level": "ignore"
},
"missing_fat_arrows": {
"level": "ignore"
},
"newlines_after_classes": {
"value": 3,
"level": "ignore"
},
"no_backticks": {
"level": "ignore"
},
"no_implicit_braces": {
"level": "ignore"
},
"no_implicit_parens": {
"level": "ignore"
},
"no_plusplus": {
"level": "ignore"
},
"no_stand_alone_at": {
"level": "ignore"
},
"no_unnecessary_fat_arrows": {
"level": "ignore"
},
"non_empty_constructor_needs_parens": {
"level": "ignore"
},
"space_operators": {
"level": "ignore"
}
}
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ node_js:
- "0.12"
- "4"
- "5"
script:
- npm test
- npm run lint
- npm run hint
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,18 @@
"underscore": "^1.8.3"
},
"devDependencies": {
"coffee-jshint": "^0.2.3",
"coffee-script": "^1.10.0",
"coffeelint": "^1.14.2",
"mocha": "^2.3.4",
"should": "^8.0.2",
"should-sinon": "0.0.3",
"sinon": "^1.17.2"
},
"scripts": {
"build-npm": "rm -rf ./lib/ && coffee -b -c -o ./lib/ --no-header src/",
"hint": "coffee-jshint -o node src/*; coffee-jshint -o node,mocha test/*",
"lint": "coffeelint --file .coffeelint.json --quiet src test",
"prepublish": "npm run build-npm",
"test": "mocha"
}
Expand Down
2 changes: 1 addition & 1 deletion test/experiment.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe "Experiment", ->
@experiment.use -> throw Error()
@experiment.try -> throw Error()
# This is going to throw to reproduce the effect of the use
try @experiment.run(@true)
try @experiment.run(@true) catch e

eventToPromise(@experiment, 'result').should.be.fulfilled()

Expand Down

0 comments on commit f63ac0b

Please sign in to comment.