Skip to content

Module lint errors are reported when module is not included in webpack bundleΒ #74

Open
@watjurk

Description

@watjurk
  • Operating System: N/R
  • Node Version: N/R
  • NPM Version: N/R
  • webpack Version: N/R
  • eslint-webpack-plugin Version: 2.4.3 (the same issue occurs on branch pref-use-finish-modules)

Let's assume scenario:
webpack entry point: index.js

  • index.js
  • lintError.js
  1. index.js:
import "lintError.js";

webpack is erroring with lintError.js's linting error

  1. let's change index.js (lintErrorjs.js is no longer imported in the bundle):
// import "lintErrorjs";

again webpack is erroring with lintError.js's linting error

Expected Behavior / Situation

after index.js is changed (2) webpack shouldn't throw error

Actual Behavior / Situation

webpack is throwing an error

Modification Proposal

the issue is this line:

results = Object.values(crossRunResultStorage);

I propose getting rid of cache in src/linter.js, as we are not using it as cache at all,
maybe create a real caching mechanism

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions