SamVerschueren / clinton

Project style linter
MIT License
122 stars 9 forks source link

Throws invalid version when using Node.js version alias in .travis.yml #46

Closed sindresorhus closed 8 years ago

sindresorhus commented 8 years ago

When I run it in the ansi-styles repo.

ansi-styles
TypeError: Invalid Version: stable.0.0
    at new SemVer (/usr/local/lib/node_modules/clinton/node_modules/semver/semver.js:293:11)
    at Range.test (/usr/local/lib/node_modules/clinton/node_modules/semver/semver.js:1036:15)
    at Function.satisfies (/usr/local/lib/node_modules/clinton/node_modules/semver/semver.js:1085:16)
    at /usr/local/lib/node_modules/clinton/rules/travis.js:97:17

Because of https://github.com/chalk/ansi-styles/blob/d8be37b078a14e35d27a7dbae3f9f5ae7dee9d72/.travis.yml#L4

Both stable, iojs, and node are valid aliases.

stable and iojs are deprecated, so would be useful if clinton warned about those.

SamVerschueren commented 8 years ago

Damn, totally missed those cases. Will fix it asap.