Skip to content

Commit

Permalink
Linting (#29)
Browse files Browse the repository at this point in the history
* Added linting checks

* Fixed linting feedback

* I was hoping linting would actually find this error... but alas

* AppVeyor did not like the combined test command
  • Loading branch information
TomKemperNL authored and victor-torres committed Oct 8, 2016
1 parent fbaf1f0 commit ad13795
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test_script:
- node --version
- npm --version
# run tests
- npm test -- -t 10000
- npm test -- -- -t 10000 #the extra -- is because npm test runs multiple script commands

# Don't actually build.
build: off
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,19 @@
"devDependencies": {
"chai": "^3.5.0",
"coffee-script": "^1.10.0",
"coffeelint": "^1.16.0",
"mocha": "^3.0.2"
},
"scripts": {
"test": "mocha --compilers coffee:coffee-script/register"
"test": "npm run lint & npm run mocha",
"mocha": "mocha --compilers coffee:coffee-script/register",
"lint": "coffeelint lib test"
},
"coffeelintConfig": {
"max_line_length": {
"value": 100,
"level": "error",
"limitComments": true
}
}
}
2 changes: 1 addition & 1 deletion test/empty_repo.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ describe 'Constructing hg-repository', ->
repo = new HgRepository testRepo.fullPath()
assert.ok repo

after ->
after ->
testRepo.destroy()
4 changes: 2 additions & 2 deletions test/fakeWindow.coffee
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
global.window = {
addEventListener: ()->
removeEventListener: ()->
addEventListener: ()->
removeEventListener: ()->
}
4 changes: 2 additions & 2 deletions test/testRepository.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ module.exports =
path.join __dirname, 'test_repo'

exists: () ->
fs.existsSync(@fullPath)
fs.existsSync(@fullPath())

destroy: ->
destroy: ->
if isWindows
exec 'powershell -command "remove-item -recurse -force ' + @fullPath() + '"'
else
Expand Down

0 comments on commit ad13795

Please sign in to comment.