sindresorhus / grunt-eslint

Validate files with ESLint
MIT License
200 stars 72 forks source link

Use opts.quiet when determining return value #128

Closed heston closed 8 years ago

heston commented 8 years ago

Currently, this task returns true when there are lint warnings, and quiet is set to false. This makes it difficult to fail a build in a CI environment for warnings. This PR makes it possible for Grunt to return a non-0 exit code when lint warnings are present.

If opts.quiet is set to false (default), then this task will return false if there are any errors or warnings. If opts.quiet is true, then this task will only return false if there are errors.

sindresorhus commented 8 years ago

Working as intended. Warnings shouldn't fail the build. They're informational. This is also how the ESLint CLI works. If you disagree, I suggest taking it up on the ESLint issue tracker first: https://github.com/eslint/eslint/issues