mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 11:28:51 +01:00
a4f3a5fdd0
Currently, all test files are excluded from TypeScript's purview. That means that if any test file fails to typecheck, we won't know about it. In fact if we were to remove all test files from the `exclude` list, then some files would indeed fail to be typechecked. At the moment all we care about is the unit test file for NetworkController. Due to how the `include`/`exclude` rules work in `tsconfig.json`, we can't "un-exclude" that file after it's excluded, so to fix this, we simply exclude fewer things. While we're at it, we also: - Add `esModuleInterop: true` to address warnings we sometimes see around imports - Add `noEmit: true` so that we can run `tsc` to test typechecking on its own without producing any compiled files (so that ESLint doesn't accidentally pick them up) - Clean up `tsconfig.json` slightly
39 lines
990 B
JSON
39 lines
990 B
JSON
{
|
|
"compilerOptions": {
|
|
"allowJs": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"baseUrl": ".",
|
|
"esModuleInterop": true,
|
|
"inlineSources": true,
|
|
"isolatedModules": true,
|
|
"jsx": "react",
|
|
"lib": ["dom", "es2020"],
|
|
"moduleResolution": "node",
|
|
"noEmit": true,
|
|
"noEmitOnError": true,
|
|
"outDir": "tsout",
|
|
"rootDir": ".",
|
|
"sourceMap": true,
|
|
"strict": true
|
|
},
|
|
"exclude": [
|
|
"**/jest-coverage/**/*",
|
|
"**/__mocks__/**/*",
|
|
"**/storybook-build/**/*",
|
|
"**/*.stories.*",
|
|
".storybook/**/*",
|
|
"app/scripts/controllers/*.test.ts",
|
|
"app/scripts/lib/**/*.test.ts",
|
|
"builds/**/*",
|
|
"dist/**/*",
|
|
"node_modules/**",
|
|
"development/ts-migration-dashboard/build/**/*",
|
|
"development/ts-migration-dashboard/intermediate/**/*",
|
|
"ui/**/*.test.js",
|
|
"ui/**/*.test.ts",
|
|
"ui/**/*.test.tsx"
|
|
],
|
|
"extends": "@tsconfig/node16/tsconfig.json",
|
|
"include": ["app", "development", "shared", "types", "ui"]
|
|
}
|