Skip to content

Commit

Permalink
Use babel for typescript compilation with minimal changes (reduxjs#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckdries authored and timdorr committed Jun 29, 2021
1 parent c60ccc5 commit a8c84d2
Show file tree
Hide file tree
Showing 6 changed files with 2,766 additions and 4,584 deletions.
4 changes: 2 additions & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const cjs = NODE_ENV === 'test' || BABEL_ENV === 'commonjs'
const loose = true

module.exports = {
presets: [['@babel/env', { loose, modules: false }]],
presets: [['@babel/env', { loose, modules: false }], '@babel/preset-typescript'],
plugins: [
['@babel/proposal-decorators', { legacy: true }],
['@babel/proposal-object-rest-spread', { loose }],
Expand All @@ -18,5 +18,5 @@ module.exports = {
].replace(/^[^0-9]*/, '')
}
]
].filter(Boolean)
].filter(Boolean),
}
9 changes: 8 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"parser": "babel-eslint",
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:react/recommended",
"plugin:prettier/recommended"
// "plugin:@typescript-eslint/recommended"
],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"extensions": [".js", ".ts"]
}
}
},
"parserOptions": {
Expand All @@ -32,6 +38,7 @@
"react/no-string-refs": 0
},
"plugins": [
"@typescript-eslint",
"import",
"react"
]
Expand Down
Loading

0 comments on commit a8c84d2

Please sign in to comment.