eslint-webpack-plugin
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -13,4 +13,12 @@ export default ESLintWebpackPlugin; | ||
* @param {Compiler} compiler | ||
* @param {Options} options | ||
* @param {string[]} wanted | ||
* @param {string[]} exclude | ||
*/ | ||
run(compiler: Compiler): Promise<void>; | ||
run( | ||
compiler: Compiler, | ||
options: Options, | ||
wanted: string[], | ||
exclude: string[] | ||
): Promise<void>; | ||
/** | ||
@@ -17,0 +25,0 @@ * @param {Compiler} compiler |
@@ -6,5 +6,5 @@ "use strict"; | ||
}); | ||
exports.default = getESLint; | ||
exports.loadESLint = loadESLint; | ||
exports.loadESLintThreaded = loadESLintThreaded; | ||
exports.default = getESLint; | ||
@@ -11,0 +11,0 @@ var _os = require("os"); |
@@ -44,7 +44,14 @@ "use strict"; | ||
// this differentiates one from the other when being cached. | ||
this.key = compiler.name || `${this.key}_${counter += 1}`; // If `lintDirtyModulesOnly` is disabled, | ||
this.key = compiler.name || `${this.key}_${counter += 1}`; | ||
const options = { ...this.options, | ||
exclude: (0, _utils.parseFiles)(this.options.exclude || [], this.getContext(compiler)), | ||
extensions: (0, _utils.arrify)(this.options.extensions), | ||
files: (0, _utils.parseFiles)(this.options.files || '', this.getContext(compiler)) | ||
}; | ||
const wanted = (0, _utils.parseFoldersToGlobs)(options.files, options.extensions); | ||
const exclude = (0, _utils.parseFoldersToGlobs)(this.options.exclude ? options.exclude : '**/node_modules/**', []); // If `lintDirtyModulesOnly` is disabled, | ||
// execute the linter on the build | ||
if (!this.options.lintDirtyModulesOnly) { | ||
compiler.hooks.run.tapPromise(this.key, this.run); | ||
compiler.hooks.run.tapPromise(this.key, c => this.run(c, options, wanted, exclude)); | ||
} | ||
@@ -59,3 +66,3 @@ | ||
return this.run(c); | ||
return this.run(c, options, wanted, exclude); | ||
}); | ||
@@ -65,6 +72,9 @@ } | ||
* @param {Compiler} compiler | ||
* @param {Options} options | ||
* @param {string[]} wanted | ||
* @param {string[]} exclude | ||
*/ | ||
async run(compiler) { | ||
async run(compiler, options, wanted, exclude) { | ||
// Do not re-hook | ||
@@ -78,9 +88,2 @@ if ( // @ts-ignore | ||
const options = { ...this.options, | ||
exclude: (0, _utils.parseFiles)(this.options.exclude || [], this.getContext(compiler)), | ||
extensions: (0, _utils.arrify)(this.options.extensions), | ||
files: (0, _utils.parseFiles)(this.options.files || '', this.getContext(compiler)) | ||
}; | ||
const wanted = (0, _utils.parseFoldersToGlobs)(options.files, options.extensions); | ||
const exclude = (0, _utils.parseFoldersToGlobs)(this.options.exclude ? options.exclude : '**/node_modules/**', []); | ||
compiler.hooks.thisCompilation.tap(this.key, compilation => { | ||
@@ -87,0 +90,0 @@ /** @type {import('./linter').Linter} */ |
@@ -6,4 +6,4 @@ "use strict"; | ||
}); | ||
exports.getESLintOptions = getESLintOptions; | ||
exports.getOptions = getOptions; | ||
exports.getESLintOptions = getESLintOptions; | ||
@@ -10,0 +10,0 @@ var _schemaUtils = require("schema-utils"); |
@@ -7,5 +7,5 @@ "use strict"; | ||
exports.arrify = arrify; | ||
exports.jsonStringifyReplacerSortKeys = void 0; | ||
exports.parseFiles = parseFiles; | ||
exports.parseFoldersToGlobs = parseFoldersToGlobs; | ||
exports.jsonStringifyReplacerSortKeys = void 0; | ||
@@ -37,2 +37,4 @@ var _path = require("path"); | ||
*/ | ||
/* istanbul ignore next */ | ||
function arrify(value) { | ||
@@ -39,0 +41,0 @@ // eslint-disable-next-line no-undefined |
{ | ||
"name": "eslint-webpack-plugin", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "A ESLint plugin for webpack", | ||
@@ -45,19 +45,19 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"eslint": "^7.0.0", | ||
"eslint": "^7.0.0 || ^8.0.0", | ||
"webpack": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@types/eslint": "^7.2.14", | ||
"jest-worker": "^27.0.6", | ||
"@types/eslint": "^7.28.2", | ||
"jest-worker": "^27.3.1", | ||
"micromatch": "^4.0.4", | ||
"normalize-path": "^3.0.0", | ||
"schema-utils": "^3.1.0" | ||
"schema-utils": "^3.1.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.14.5", | ||
"@babel/core": "^7.14.6", | ||
"@babel/preset-env": "^7.14.7", | ||
"@commitlint/cli": "^12.1.4", | ||
"@commitlint/config-conventional": "^12.1.4", | ||
"@types/fs-extra": "^9.0.10", | ||
"@babel/cli": "^7.15.7", | ||
"@babel/core": "^7.15.8", | ||
"@babel/preset-env": "^7.15.8", | ||
"@commitlint/cli": "^13.2.1", | ||
"@commitlint/config-conventional": "^13.2.0", | ||
"@types/fs-extra": "^9.0.13", | ||
"@types/micromatch": "^4.0.2", | ||
@@ -68,19 +68,19 @@ "@types/normalize-path": "^3.0.0", | ||
"babel-eslint": "^10.1.0", | ||
"babel-jest": "^27.0.6", | ||
"babel-jest": "^27.3.1", | ||
"chokidar": "^3.5.2", | ||
"cross-env": "^7.0.3", | ||
"del": "^6.0.0", | ||
"del-cli": "^4.0.0", | ||
"eslint": "^7.30.0", | ||
"del-cli": "^4.0.1", | ||
"eslint": "^8.1.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-import": "^2.25.2", | ||
"fs-extra": "^10.0.0", | ||
"husky": "^7.0.1", | ||
"jest": "^27.0.6", | ||
"lint-staged": "^11.0.0", | ||
"husky": "^7.0.4", | ||
"jest": "^27.3.1", | ||
"lint-staged": "^11.2.5", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.3.2", | ||
"standard-version": "^9.3.0", | ||
"typescript": "^4.3.5", | ||
"webpack": "^5.43.0" | ||
"prettier": "^2.4.1", | ||
"standard-version": "^9.3.2", | ||
"typescript": "^4.4.4", | ||
"webpack": "^5.60.0" | ||
}, | ||
@@ -87,0 +87,0 @@ "keywords": [ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
43810
1112
0
+ Added@eslint-community/eslint-utils@4.4.0(transitive)
+ Added@eslint-community/regexpp@4.11.0(transitive)
+ Added@eslint/eslintrc@2.1.4(transitive)
+ Added@eslint/js@8.57.0(transitive)
+ Added@humanwhocodes/config-array@0.11.14(transitive)
+ Added@humanwhocodes/module-importer@1.0.1(transitive)
+ Added@humanwhocodes/object-schema@2.0.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@ungap/structured-clone@1.2.0(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addedeslint@8.57.0(transitive)
+ Addedeslint-scope@7.2.2(transitive)
+ Addedeslint-visitor-keys@3.4.3(transitive)
+ Addedespree@9.6.1(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfind-up@5.0.0(transitive)
+ Addedglob-parent@6.0.2(transitive)
+ Addedgraphemer@1.4.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-path-inside@3.0.3(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedlocate-path@6.0.0(transitive)
+ Addedp-limit@3.1.0(transitive)
+ Addedp-locate@5.0.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedyocto-queue@0.1.0(transitive)
- Removed@babel/code-frame@7.12.11(transitive)
- Removed@babel/helper-validator-identifier@7.24.7(transitive)
- Removed@babel/highlight@7.24.7(transitive)
- Removed@eslint/eslintrc@0.4.3(transitive)
- Removed@humanwhocodes/config-array@0.5.0(transitive)
- Removed@humanwhocodes/object-schema@1.2.1(transitive)
- Removedacorn@7.4.1(transitive)
- Removedajv@8.17.1(transitive)
- Removedansi-colors@4.1.3(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedargparse@1.0.10(transitive)
- Removedastral-regex@2.0.0(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedemoji-regex@8.0.0(transitive)
- Removedenquirer@2.4.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedeslint@7.32.0(transitive)
- Removedeslint-utils@2.1.0(transitive)
- Removedeslint-visitor-keys@1.3.02.1.0(transitive)
- Removedespree@7.3.1(transitive)
- Removedesprima@4.0.1(transitive)
- Removedfast-uri@3.0.1(transitive)
- Removedfunctional-red-black-tree@1.0.1(transitive)
- Removedglob-parent@5.1.2(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedignore@4.0.6(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedlodash.truncate@4.4.2(transitive)
- Removedprogress@2.0.3(transitive)
- Removedregexpp@3.2.0(transitive)
- Removedrequire-from-string@2.0.2(transitive)
- Removedsemver@7.6.3(transitive)
- Removedslice-ansi@4.0.0(transitive)
- Removedsprintf-js@1.0.3(transitive)
- Removedstring-width@4.2.3(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedtable@6.8.2(transitive)
- Removedv8-compile-cache@2.4.0(transitive)
Updated@types/eslint@^7.28.2
Updatedjest-worker@^27.3.1
Updatedschema-utils@^3.1.1