Created
May 4, 2017 05:50
-
-
Save ronapelbaum/ef3c3459f01b002d0d719ca205401174 to your computer and use it in GitHub Desktop.
How to run ESLint in you travis CI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: node_js | |
node_js: | |
- "6" | |
script: | |
- npm run lint | |
- npm run build | |
- npm test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"scripts": { | |
"lint": "./node_modules/.bin/eslint **/*.js", | |
"build": "...", | |
"test": "..." | |
} | |
... | |
} |
This is old now, but just FYI you need quotes around the glob for it to work, also since you're calling this through npm run
it doesn't need the ./node_modules/.bin
:
"scripts": {
"lint": "eslint \"./**/*.js\""
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That linting glob pattern didn't work for me (Ubuntu 16.04 LTS), however the following did:
Cheers for the gist however!