Socket
Socket
Sign inDemoInstall

eslint-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-webpack-plugin - npm Package Compare versions

Comparing version 2.5.3 to 2.5.4

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

### [2.5.4](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v2.5.3...v2.5.4) (2021-04-19)
### Bug Fixes
* context with symbols ([#94](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/94)) ([6fc6874](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/6fc6874f4ee295eea372dcfa0a86799b355dab70))
* resolve paths and normalize ([#97](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/97)) ([818b825](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/818b825db119dde0b53b24d96688f1af89344b29))
* use `finishModules` if thread is less than or equal 1 ([#95](https://github.com/webpack-contrib/eslint-webpack-plugin/issues/95)) ([c12e7be](https://github.com/webpack-contrib/eslint-webpack-plugin/commit/c12e7be0be49f95fa8f2d9ae354acba3bd412b5c))
### [2.5.3](https://github.com/webpack-contrib/eslint-webpack-plugin/compare/v2.5.2...v2.5.3) (2021-03-24)

@@ -7,0 +16,0 @@

3

declarations/linter.d.ts

@@ -5,3 +5,3 @@ /**

* @param {Compilation} compilation
* @returns {{lint: Linter, report: Reporter}}
* @returns {{lint: Linter, report: Reporter, threads: number}}
*/

@@ -15,2 +15,3 @@ export default function linter(

report: Reporter;
threads: number;
};

@@ -17,0 +18,0 @@ export type ESLint = import('eslint').ESLint;

@@ -8,7 +8,2 @@ /**

/**
* @param {string} str
* @returns {string}
*/
export function replaceBackslashes(str: string): string;
/**
* @param {string|string[]} patterns

@@ -15,0 +10,0 @@ * @param {string|string[]} extensions

@@ -96,7 +96,11 @@ "use strict";

let report;
/** @type number */
let threads;
try {
({
lint,
report
report,
threads
} = (0, _linter.default)(this.key, options, compilation));

@@ -125,2 +129,6 @@ } catch (e) {

files.push(file);
if (threads > 1) {
lint(file);
}
}

@@ -131,3 +139,3 @@ }

compilation.hooks.finishModules.tap(this.key, () => {
if (files.length > 0) {
if (files.length > 0 && threads <= 1) {
lint(files);

@@ -134,0 +142,0 @@ }

@@ -48,3 +48,3 @@ "use strict";

* @param {Compilation} compilation
* @returns {{lint: Linter, report: Reporter}}
* @returns {{lint: Linter, report: Reporter, threads: number}}
*/

@@ -61,2 +61,5 @@

let cleanup;
/** @type number */
let threads;
/** @type {Promise<LintResult[]>[]} */

@@ -71,3 +74,4 @@

lintFiles,
cleanup
cleanup,
threads
} = (0, _getESLint.default)(key, options));

@@ -80,3 +84,4 @@ } catch (e) {

lint,
report
report,
threads
};

@@ -83,0 +88,0 @@ /**

@@ -7,8 +7,11 @@ "use strict";

exports.parseFiles = parseFiles;
exports.replaceBackslashes = replaceBackslashes;
exports.parseFoldersToGlobs = parseFoldersToGlobs;
exports.jsonStringifyReplacerSortKeys = void 0;
var _path = require("path");
var _fs = require("fs");
var _normalizePath = _interopRequireDefault(require("normalize-path"));
var _arrify = _interopRequireDefault(require("arrify"));

@@ -19,3 +22,4 @@

// @ts-ignore
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
// @ts-ignore
/**

@@ -26,18 +30,8 @@ * @param {string|string[]} files

*/
function parseFiles(files, context) {
return (0, _arrify.default)(files).map(
/** @type {string} */
file => `${replaceBackslashes(context).replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2')}/${replaceBackslashes(file)}`);
file => (0, _normalizePath.default)((0, _path.resolve)(context, file)));
}
/**
* @param {string} str
* @returns {string}
*/
function replaceBackslashes(str) {
return str.replace(/\\/g, '/');
}
/**
* @param {string|string[]} patterns

@@ -57,4 +51,2 @@ * @param {string|string[]} extensions

/** @type {string} */
pattern => replaceBackslashes(pattern)).map(
/** @type {string} */
pattern => {

@@ -61,0 +53,0 @@ try {

{
"name": "eslint-webpack-plugin",
"version": "2.5.3",
"version": "2.5.4",
"description": "A ESLint plugin for webpack",

@@ -53,2 +53,3 @@ "license": "MIT",

"micromatch": "^4.0.2",
"normalize-path": "^3.0.0",
"schema-utils": "^3.0.0"

@@ -64,2 +65,3 @@ },

"@types/micromatch": "^4.0.1",
"@types/normalize-path": "^3.0.0",
"@types/webpack": "^4.41.26",

@@ -66,0 +68,0 @@ "@webpack-contrib/eslint-config-webpack": "^3.0.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc