Skip to content

Commit

Permalink
Merge branch 'master' into fix-cache-result-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Feb 6, 2021
2 parents d5f2bd2 + be0391e commit 1b73671
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions declarations/ESLintError.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
export default class ESLintError {
export default ESLintError;
declare class ESLintError extends Error {
/**
* @param {string=} messages
*/
constructor(messages?: string | undefined);
name: string;
stack: string;
}
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,18 @@ class ESLintWebpackPlugin {
const options = {
...this.options,
exclude: parseFiles(
this.options.exclude || 'node_modules',
this.options.exclude || [],
this.getContext(compiler)
),
extensions: arrify(this.options.extensions),
files: parseFiles(this.options.files || '', this.getContext(compiler)),
};

const wanted = parseFoldersToGlobs(options.files, options.extensions);
const exclude = parseFoldersToGlobs(options.exclude, []);
const exclude = parseFoldersToGlobs(
this.options.exclude ? options.exclude : '**/node_modules/**',
[]
);

compiler.hooks.thisCompilation.tap(ESLINT_PLUGIN, (compilation) => {
/** @type {import('./linter').Linter} */
Expand Down

0 comments on commit 1b73671

Please sign in to comment.