Skip to content

Support ESLInt Shareable Configs #152

@nweldev

Description

@nweldev

PROBLEM : Shareable Configs simply do not work with gulp-eslint when using configuration files. (using 2.0.0)

USE CASE :

In one of my projects, my lint task isn't showing all eslint errors, while eslint-cli was.

I'm using an eslint-config-noelmace npm dependency, and I assume that the problem could be from that.

Here is an example of configuration :

gulp task configuration (config.paths.scripts is ok) :

export let lintGen = (params = false) => {
    let configuration = params || {};
    configuration.fix = true;
    return lazypipe()
        .pipe(eslint, configuration)
        .pipe(eslint.format)
        .pipe(eslint.failAfterError);
};

gulp.task('lint:scripts', 'Lint the application\'s JS files', () => {
    return gulp.src("app/!(libs)/**/*.js")
        .pipe(debug({
            title: 'test'
        }))
        .pipe(lintGen()());
});

.eslintrc

{
    "extends": "noelmace/angular-base"
}

package.json

{ "scripts" : { "lint": "eslint \"app/!(libs)/**/*.js\" || true" } }

For example, when I'm adding a double quote to my code, npm run lint is showing the following error, when gulp lint:scripts isn't :
31:17 error Strings must use singlequote

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions