-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: spurious typescript errors #1550
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2017", | ||
"allowJs": true, | ||
"baseUrl": "./", | ||
"downlevelIteration": true, | ||
"esModuleInterop": true, | ||
"experimentalDecorators": true, | ||
"removeComments": false, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"moduleResolution": "node", | ||
"module": "commonjs", | ||
"outDir": "build", | ||
"removeComments": false, | ||
"resolveJsonModule": true, | ||
"esModuleInterop": true, | ||
"allowJs": true, | ||
"skipLibCheck": true | ||
"rootDir": "./", | ||
"skipLibCheck": true, | ||
"target": "es5" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2017 is way too modern a target, as Android 5 was released in 2014. I've added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we specify the target in the webpack, no? es5 seems scary, and unnecessary for Electron. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mm, on second look we do have a BABEL_LOADER which uses What if I were to set the target here to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually there's also an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BUT our electron build doesn't use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh, these things should live in |
||
}, | ||
// We don't need TypeScript to check javascript files. | ||
"include": ["./src/**/*.ts"], | ||
"exclude": ["node_modules", "www", "./src/**/*.js", "./src/**/*.mjs", "./www/**/*", "./build/**/*"] | ||
"exclude": ["*.cjs", "*.js", "*.mjs"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't we exclude node_modules? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have an https://www.typescriptlang.org/tsconfig#include
|
||
"include": ["src"] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the reason why we were seeing so many errors in the vscode intellisense - we needed a default output directory so ts wasn't trying to override our javascript files with themselves