Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

usage with eslint-loader, warnings/errors are swallowed after successful compilation #72

Open
@kelly-tock

Description

@kelly-tock
  • Operating System: OS X
  • Node Version: 11.12.0
  • NPM Version: 6.7.0
  • webpack Version: 4.30.0
  • cache-loader Version: 3.0.0

Expected Behavior

with eslint-loader set up to not fail on errors/warnings, and if cache loader is used with babel-loader, warnings/errors should show up consistently.

  • on initial startup, should see errors/warnings
  • after stopping, then starting again, should see the same errors

Actual Behavior

with eslint-loader set up to not fail on errors/warnings, and if cache loader is used with babel-loader, warnings/errors should show up consistently.

  • on initial startup, see errors/warnings
  • after stopping, then starting again, the same errors/warnings are not shown

Code

 {
        enforce: 'pre',
        test: /\.(ts|tsx)$/,
        include: [path.join(cwd, 'src/js'), path.join(cwd, '../shared/src/js')],
        loader: 'eslint-loader',
        options: {
          configFile: path.resolve(cwd, './.eslintrc.js'),
          emitWarning: true,
          failOnWarning: false,
        },
      },
      {
        include: [path.join(cwd, 'src/js'), path.join(cwd, '../shared/src/js')],
        test: /\.(ts|tsx)$/,
        use: [
          {
            loader: 'cache-loader'
          },
          {
            loader: 'babel-loader',
            options: {
              cacheDirectory: true,
              cacheCompression: false,
              compact: false,
              babelrc: false,
              plugins: ['@babel/plugin-syntax-dynamic-import'],
              presets: ['babel-preset-tock'],
            },
          },
        ],
      },

How Do We Reproduce?

introduce a warning from linting, such as no-unused-variables, startup webpack with webpack dev server, and see the warning.
stop webpack dev server, then start again. you will not see the error.

Notes

Without cache-loader, the expected behavior above does happen. i'm not sure if the issue is with cache-loader, or with eslint-loader

webpack-contrib/eslint-loader#267

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions