Skip to content

Commit

Permalink
fix(eslint-react-config): handle files with .jsx extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Jan 28, 2025
1 parent 671ee8f commit 9f891f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions config/eslint-react.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ module.exports = {
],

settings: {
react: {
version: 'detect',
},
react: { version: 'detect' },
// Prevents "error: unable to resolve module X" for .jsx files
// if .jsx extension isn't used, e.g.
// `import Component from './component'`
'import/resolver': { node: { extensions: ['.js', '.jsx'] } },
},

rules: {
Expand Down

0 comments on commit 9f891f4

Please sign in to comment.