Skip to content

Commit

Permalink
fix(plugin-eslint): allow unmatched patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Nov 8, 2023
1 parent c8cfb6e commit d350187
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-eslint/src/lib/runner/lint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ describe('lint', () => {

it('should correctly use ESLint Node API', async () => {
await lint('.eslintrc.js', ['**/*.js']);
expect(ESLint).toHaveBeenCalledWith({
expect(ESLint).toHaveBeenCalledWith<ConstructorParameters<typeof ESLint>>({
overrideConfigFile: '.eslintrc.js',
useEslintrc: false,
errorOnUnmatchedPattern: false,
});
expect(eslint.lintFiles).toHaveBeenCalledTimes(1);
expect(eslint.lintFiles).toHaveBeenCalledWith(['**/*.js']);
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-eslint/src/lib/runner/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export async function lint(
const eslint = new ESLint({
overrideConfigFile: eslintrc,
useEslintrc: false,
errorOnUnmatchedPattern: false,
});

const lintResults = await eslint.lintFiles(patterns);
Expand Down

0 comments on commit d350187

Please sign in to comment.