Skip to content
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

Why are the quiet and fix options incompatible? #210

Closed
elevatebart opened this issue Oct 23, 2017 · 2 comments
Closed

Why are the quiet and fix options incompatible? #210

elevatebart opened this issue Oct 23, 2017 · 2 comments

Comments

@elevatebart
Copy link

elevatebart commented Oct 23, 2017

When I use this task definition, I get absolutely no fixes.
Is it documented/normal?
What would be the reason?
I think I could cook up a quick pull request to solve the issue, but I would like to understand first

gulp.task('eslint', () => {
    // ESLint ignores files with "node_modules" paths. 
    // So, it's best to have gulp ignore the directory as well. 
    // Also, Be sure to return the stream from the task; 
    // Otherwise, the task may end before the stream has finished. 
    return gulp.src('./src/*.js')
        // eslint() attaches the lint output to the "eslint" property 
        // of the file object so it can be used by other modules. 
        .pipe(eslint({
               fix: true,
               quiet: true
        }))
        // eslint.format() outputs the lint results to the console. 
        // Alternatively use eslint.formatEach() (see Docs). 
        .pipe(eslint.format())
        // To have the process exit with an error code (1) on 
        // lint error, return the stream and pipe to failAfterError last. 
        .pipe(gulp.dest('./src/'));
});
@shinnn
Copy link
Collaborator

shinnn commented Oct 23, 2017

Just fixed by myself.

@elevatebart
Copy link
Author

ありがとう ございます

The fix seems perfect and I will love to test it.
On that note, do you know when version 4.0.1 is coming out on npm?

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

2 participants