Skip to content

Commit

Permalink
fix: skip running ESLint on ignored files (#162)
Browse files Browse the repository at this point in the history
* Skip running ESLint on ignored files

* Return early when an ESLint file is ignored
  • Loading branch information
kylewlacy authored Sep 4, 2022
1 parent 2824b50 commit a491be7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/vite-plugin-checker/src/checkers/eslint/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ const createDiagnostic: CreateDiagnostic<'eslint'> = (pluginConfig) => {

const handleFileChange = async (filePath: string, type: 'change' | 'unlink') => {
const absPath = path.resolve(root, filePath)
const isChangedFileIgnored = await eslint.isPathIgnored(filePath)

if (isChangedFileIgnored) return

if (type === 'unlink') {
manager.updateByFileId(absPath, [])
Expand Down

0 comments on commit a491be7

Please sign in to comment.