Skip to content

Commit

Permalink
ESLint Plugin: Include .jsx extenstion when linting import statements (
Browse files Browse the repository at this point in the history
…#33746)

* ESLint Plugin: Include .jsx extenstion when linting import statements

* Move import settings to react config
  • Loading branch information
gziolo authored Aug 3, 2021
1 parent 52970e7 commit 5dd57c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/eslint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- Include `.jsx` extension when linting import statements in case TypeScript not present ([#33746](https://github.com/WordPress/gutenberg/pull/33746)).

## 9.1.0 (2021-07-21)

### Enhancement
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-plugin/configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = {
jsx: true,
},
},
settings: {
'import/extensions': [ '.js', '.jsx' ],
},
plugins: [ '@wordpress', 'react', 'react-hooks' ],
rules: {
'@wordpress/no-unused-vars-before-return': [
Expand Down

0 comments on commit 5dd57c4

Please sign in to comment.