Skip to content

Instantly share code, notes, and snippets.

@joeynguyen
Last active January 29, 2019 21:28
Show Gist options
  • Save joeynguyen/3226d34871c35faef632259b5d7cdcb1 to your computer and use it in GitHub Desktop.
Save joeynguyen/3226d34871c35faef632259b5d7cdcb1 to your computer and use it in GitHub Desktop.
Use Typescript to check JavaScript
// add this file to the root of your repo without these comment lines
// inside `compilerOptions`, include "moduleResolution": "node" if it's a Node project
// remove `jsx` lines if not using JSX
{
"compilerOptions": {
"target": "es2017",
"checkJs": true,
"jsx": "react"
},
"include": [
"src/**/*.js",
"src/**/*.jsx"
],
"exclude": [
"node_modules"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment