jsPsych/packages/config/tsconfig.json
bjoluc 82fa8e3f29 Add explicit include option to TS configs
So VS Code ignores the `dist` folders
2021-07-13 09:54:29 +02:00

42 lines
1.9 KiB
JSON

{
// based on https://github.com/formium/tsdx/blob/462af2d002987f985695b98400e0344b8f2754b7/templates/basic/tsconfig.json<<<<
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
"compilerOptions": {
"target": "ES6",
"module": "ESNext",
"lib": ["dom", "esnext"],
"importHelpers": true,
// output .d.ts declaration files for consumers
"declaration": true,
// output .js.map sourcemap files for consumers
"sourceMap": true,
// stricter type-checking for stronger correctness. Recommended by TS
"strict": false, // should be enabled one lucky day
// linter checks for common issues
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
// noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
"noUnusedLocals": false, // should be enabled one lucky day
"noUnusedParameters": false, // should be enabled one lucky day
// use Node's module resolution algorithm, instead of the legacy TS one
"moduleResolution": "node",
// interop between ESM and CJS modules. Recommended by TS
"esModuleInterop": true,
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
"skipLibCheck": true,
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
// do note emit build output when running `tsc`
"noEmit": true,
// map package imports directly to their source files
"paths": {
"jspsych/tests": ["../jspsych/tests"],
"jspsych": ["../jspsych/src"],
"@jspsych/*": ["../*/src"]
},
// allow resolving json modules in tests (needed for transitive imports of jspsych in tests;
// the jspsych package itself uses https://stackoverflow.com/a/61426303 instead)
"resolveJsonModule": true
}
}