xojs / xo

❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults
MIT License
7.7k stars 291 forks source link

Output is different between *nix and travis #186

Closed OmgImAlexis closed 7 years ago

OmgImAlexis commented 7 years ago

Not sure what's causing this but I did see an issue opened similarly with Windows and *nix so maybe it's a cross platform bug.

When testing against this branch on my OSX laptop I get no issues at all yet on travis I see a few that don't even point to the correct lines.

➜  medusa git:(add_js_linting) yarn test-js
yarn test-js v0.20.3
$ xo 
✨  Done in 7.42s.
static/js/manage/backlog-overview.js:70:18
  ⚠  70:18  Expected error to be handled.   handle-callback-err
  ⚠  83:18  Expected error to be handled.   handle-callback-err
  ✖  70:27  err is defined but never used.  no-unused-vars
  ✖  78:17  Extra space after key status.   key-spacing
  ✖  83:27  err is defined but never used.  no-unused-vars

https://travis-ci.org/pymedusa/Medusa/builds/205416269

sindresorhus commented 7 years ago

You're caching your node_modules on Travis. This is why that's a bad idea.

OmgImAlexis commented 7 years ago

I'm not sure what you mean by that? We use yarn and we cache the yarn cache not the npm cache?

sindresorhus commented 7 years ago

This results in stale dependencies (of which would be ESLint for example) on Travis. That's most likely why you're seeing different results. Try clearing the Travis cache: https://docs.travis-ci.com/user/caching/#Clearing-Caches

OmgImAlexis commented 7 years ago

We haven't cached the node_modules before and I tried clearing the cache. It's also testing against our own code so I don't see how the cache of deps would cause anything at all.