eslint-webpack-plugin
Advanced tools
Comparing version 2.5.0 to 2.5.1
@@ -5,6 +5,15 @@ # Changelog | ||
### [2.5.1](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v2.5.0...v2.5.1) (2021-02-12) | ||
### Bug Fixes | ||
* exclude node_modules root ([#80](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/80)) ([be0391e](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/be0391e28322e220cf628f842f35b3d800c284c0)) | ||
* prevent lint all files ([#77](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/77)) ([f57cb8e](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/f57cb8e1f01c522e562f0af3460d900d7fbba94f)) | ||
* update types ([#81](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/81)) ([90608da](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/90608da93f13ae2de70c2696d4284c1558a3f301)) | ||
## [2.5.0](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v2.4.3...v2.5.0) (2021-02-04) | ||
### ⚠ BREAKING CHANGES | ||
### Refactor | ||
@@ -28,4 +37,2 @@ * Updates to emitError and emitWarning | ||
* types ([#66](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/66)) ([4daddf5](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/4daddf5335b2c78203482d7e7f6d82a909277212)) | ||
* Fix emit warning error quiet (#46) ([d38165b](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/d38165bef1e2d73a9d53f42d80b926c9eab12707)), closes [#46](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/46) [#19](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/19) [#19](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/19) | ||
@@ -32,0 +39,0 @@ |
@@ -84,3 +84,3 @@ "use strict"; | ||
const options = { ...this.options, | ||
exclude: (0, _utils.parseFiles)(this.options.exclude || 'node_modules', this.getContext(compiler)), | ||
exclude: (0, _utils.parseFiles)(this.options.exclude || [], this.getContext(compiler)), | ||
extensions: (0, _arrify.default)(this.options.extensions), | ||
@@ -90,3 +90,3 @@ files: (0, _utils.parseFiles)(this.options.files || '', this.getContext(compiler)) | ||
const wanted = (0, _utils.parseFoldersToGlobs)(options.files, options.extensions); | ||
const exclude = (0, _utils.parseFoldersToGlobs)(options.exclude, []); | ||
const exclude = (0, _utils.parseFoldersToGlobs)(this.options.exclude ? options.exclude : '**/node_modules/**', []); | ||
compiler.hooks.thisCompilation.tap(ESLINT_PLUGIN, compilation => { | ||
@@ -107,21 +107,22 @@ /** @type {import('./linter').Linter} */ | ||
return; | ||
} // Gather Files to lint | ||
} | ||
/** @type {string[]} */ | ||
compilation.hooks.finishModules.tap(ESLINT_PLUGIN, modules => { | ||
/** @type {string[]} */ | ||
const files = []; // @ts-ignore | ||
const files = []; // @ts-ignore | ||
// Add the file to be linted | ||
for (const { | ||
resource | ||
} of modules) { | ||
if (resource) { | ||
const [file] = resource.split('?'); | ||
compilation.hooks.succeedModule.tap(ESLINT_PLUGIN, ({ | ||
resource | ||
}) => { | ||
if (resource) { | ||
const [file] = resource.split('?'); | ||
if (file && !files.includes(file) && (0, _micromatch.isMatch)(file, wanted) && !(0, _micromatch.isMatch)(file, exclude)) { | ||
files.push(file); | ||
} | ||
if (file && !files.includes(file) && (0, _micromatch.isMatch)(file, wanted) && !(0, _micromatch.isMatch)(file, exclude)) { | ||
files.push(file); | ||
} | ||
} | ||
}); // Lint all files added | ||
compilation.hooks.finishModules.tap(ESLINT_PLUGIN, () => { | ||
if (files.length > 0) { | ||
@@ -128,0 +129,0 @@ lint(files); |
{ | ||
"name": "eslint-webpack-plugin", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "A ESLint plugin for webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52384
1055