Skip to content

Can it be used in gulp? #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gerardcarbo opened this issue Apr 21, 2015 · 1 comment
Closed

Can it be used in gulp? #2

gerardcarbo opened this issue Apr 21, 2015 · 1 comment

Comments

@gerardcarbo
Copy link

I have installed it with:

npm install eslint-path-formatter --save-dev

I've tried to use it in a gulp task as follow:

gulp.task('eslint', function () {
    gulp.src(['bin/**/*.js','server/**/*.js'])
        .pipe(eslint())
        .pipe(eslint.format('eslint-path-formatter'));
}); 

But it fails with the error:

TypeError: Invalid Formatter
    at Object.exports.resolveFormatter (...\node_modules\gulp-eslint\util.js:129:10)
    at Function.gulpEslint.format (...\node_modules\gulp-eslint\index.js:113:19)
    at Gulp.<anonymous> (...\gulpfile.js:39:22)
@gerardcarbo gerardcarbo changed the title Can it be used in gulp Can it be used in gulp? Apr 21, 2015
@gerardcarbo
Copy link
Author

I've make it work. Just specify the path:

.pipe(eslint.format('node_modules/eslint-path-formatter'));

riddla added a commit to riddla/gulp-eslint that referenced this issue Mar 16, 2016
As stated in Bartvds/eslint-path-formatter#2 the correct usage of the `eslint-path-formatter` plugin is `.pipe(eslint.format('node_modules/eslint-path-formatter'));`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant