Skip to content

Commit

Permalink
Explicitly set parser for jsx in ESLint config
Browse files Browse the repository at this point in the history
Summary:
Followup to D41654962 (59ee573), it looks like the default parser here is something different, so not all newer JS syntax is correctly recognixed. Set the parser for JSX to babel/eslint-parser explicitly.

Changelog:
[General][Fixed] - Explicitly set parser for jsx in ESLint config

Reviewed By: motiz88

Differential Revision: D41708672

fbshipit-source-id: 362716ab0aadb7c9cf5fc9f1175b69168372df88
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Dec 6, 2022
1 parent 1d3fa40 commit cdb88a2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config-react-native-community/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {
},
{
files: ['*.jsx'],
parser: '@babel/eslint-parser',
},
{
files: ['*.ts', '*.tsx'],
Expand Down

0 comments on commit cdb88a2

Please sign in to comment.