Skip to content

Commit

Permalink
Fix for #1256
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-konshin committed Jan 22, 2019
1 parent 767f01a commit 5c5439d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions config/typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Adds `.jsx`, `.ts` and `.tsx` as an extension, and enables JSX/TSX parsing.
*/
var jsExtensions = ['.js', '.jsx'];
var tsExtensions = ['.ts', '.tsx'];
var allExtensions = jsExtensions.concat(tsExtensions);

module.exports = {

settings: {
'import/extensions': allExtensions,
'import/parsers': {
'typescript-eslint-parser': tsExtensions
},
'import/resolver': {
'node': {
'extensions': allExtensions
}
}
}

}
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ export const configs = {
'react': require('../config/react'),
'react-native': require('../config/react-native'),
'electron': require('../config/electron'),
'typescript': require('../config/typescript'),
}

0 comments on commit 5c5439d

Please sign in to comment.