JSConfig / TSConfig #2
Replies: 3 comments 8 replies
-
I for a long while didn't know about My typical {
"files": [
"index.js"
],
"include": [
"lib/**/*.js",
"test/**/*.js"
],
"compilerOptions": {
/* Basic Options */
"target": "ES2017",
"lib": ["ESNext.Array"],
"module": "commonjs",
"allowJs": true,
"checkJs": true,
"resolveJsonModule": true,
"noEmit": true,
"esModuleInterop": true,
"removeComments": true,
/* Strict Type-Checking Options */
"strict": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
/* Additional Checks */
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true
}
} I will eventually move to the setup of eg. @sindresorhus, with an extracted config that's shared between all of my projects: https://github.com/sindresorhus/tsconfig I have so far felt that I'm still in a state of iteration and that such an abstraction for me would still be a bit premature. But eventually I will make a |
Beta Was this translation helpful? Give feedback.
-
I've found that there are subtle differences in way the text editor behaves in the existance of a tsconfig / jsconfig file. The existance of a tsconfig file with no typescript files can make the editor behave less javascript friendly. |
Beta Was this translation helpful? Give feedback.
-
Seems like |
Beta Was this translation helpful? Give feedback.
-
To get the most out of leveraging jsdoc you want to configure your project.
In my experience, I found that a
jsconfig.json
file behaves better then atsconfig.json
file.I have an example jsconfig.json file
For my personal sanity I choose to put some defaults in another file. I copy that file into basically every project and it's very similar and not project specific ( https://github.com/Raynos/fake-s3/blob/master/types/base-tsconfig.json ).
The content of the
jsconfig.json
is project specific and it states the files and dependencies for this project.Beta Was this translation helpful? Give feedback.
All reactions