Skip to content

Commit

Permalink
fix: import/resolver missing file extension "tsx". closes #217
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob McGuinness committed Jul 29, 2021
1 parent f30e49d commit a1a4e96
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion base.js
Expand Up @@ -14,7 +14,7 @@ try {
files: ['*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 2020,
sourceType: 'module',
warnOnUnsupportedTypeScriptVersion: true,
},
Expand Down
10 changes: 4 additions & 6 deletions browser.js
Expand Up @@ -26,11 +26,11 @@ module.exports = {
// Append 'ts' extensions to Airbnb 'import/resolver' setting
'import/resolver': {
node: {
extensions: ['.mjs', '.js', '.ts', '.json'],
extensions: ['.mjs', '.js', '.ts', '.json', '.jsx'],
},
},
// Append 'ts' extensions to Airbnb 'import/extensions' setting
'import/extensions': ['.js', '.ts', '.mjs'],
'import/extensions': ['.js', '.ts', '.mjs', '.jsx'],
react: {
version: 'detect',
},
Expand All @@ -41,11 +41,9 @@ module.exports = {
parserOptions: {
sourceType: 'module',
requireConfigFile: false,
ecmaVersion: 2018,
presets: ["@babel/preset-react"],
ecmaVersion: 2020,
presets: ['@babel/preset-react'],
ecmaFeatures: {
// This goes away with babel-eslint@11 https://github.com/babel/babel-eslint/issues/662#issuecomment-459712913
legacyDecorators: true,
jsx: true,
},
},
Expand Down

0 comments on commit a1a4e96

Please sign in to comment.