Skip to content

Commit

Permalink
fix(eslint): only use typescript parser if we have typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Nov 20, 2024
1 parent 72179d9 commit 0653d5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ export const config = [
react: (await import('eslint-plugin-react')).default,
},
languageOptions: {
parser: (await import('typescript-eslint')).parser,
parser: hasTypeScript
? (await import('typescript-eslint')).parser
: undefined,
parserOptions: {
jsx: true,
},
Expand Down

0 comments on commit 0653d5c

Please sign in to comment.