Skip to content

Commit

Permalink
🚧 Fix .ts file become Missing file extension error.
Browse files Browse the repository at this point in the history
  • Loading branch information
KiKiKi-KiKi committed Jul 9, 2021
1 parent f2cfbfe commit b0ea0b4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,28 @@ module.exports = {
parserOptions: {
project: './tsconfig.json',
},
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/prefer-default-export': 'off',
'newline-before-return': 'error',
'no-console': 'warn',
Expand Down

0 comments on commit b0ea0b4

Please sign in to comment.