mongkuen / gatsby-plugin-eslint

Gatsby plugin to add support for ESLint
MIT License
13 stars 14 forks source link

failOnError: false does not seem to work #4

Closed ukch closed 5 years ago

ukch commented 6 years ago

Here's the contents of my gatsby-config.js:

module.exports = {
    siteMetadata: ...,
    plugins: [
        {
            resolve: "gatsby-plugin-eslint",
            options: {
                options: {
                    failOnError: false,
                },
            },
        },
        "gatsby-plugin-react-helmet",
    ],
}

Still, all it takes for my build to fail is one single eslint error. What I would like is for all errors to be logged to the console, but for the build to succeed unless there is an actual error which prevents the code from compiling.

jacekk commented 5 years ago

@ukch Such config should works as you expect:

{
      resolve: 'gatsby-plugin-eslint',
      options: {
        options: {
            emitWarning: true,
            failOnError: false
        }
    }
}

With the emitWarning flag, changing failOnError value does make a difference :)