Skip to content

Commit

Permalink
Add eslint support for Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
thibmaek committed Oct 25, 2018
1 parent fcc3a89 commit 73cec08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
"rollup-plugin-size-snapshot": "^0.6.1",
"rollup-plugin-terser": "^1.0.1",
"semver": "^5.5.1",
"typescript-eslint-parser": "^20.0.0",
"which": "^1.3.0",
"yargs-parser": "^10.0.0"
},
Expand Down
6 changes: 5 additions & 1 deletion src/config/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ module.exports = {
ifAnyDep('flow-bin', 'eslint-config-prettier/flowtype'),
require.resolve('eslint-config-prettier/react'),
].filter(Boolean),
parser: ifAnyDep(['babel-cli', 'babel-core', 'babel-eslint', 'babel-loader'], 'babel-eslint'),
parser: ifAnyDep(
['babel-cli', 'babel-core', 'babel-eslint', 'babel-loader'],
'babel-eslint',
ifAnyDep(['typescript'], 'typescript-eslint-parser')
),
rules: {
'no-use-before-define': [
'error',
Expand Down

0 comments on commit 73cec08

Please sign in to comment.