chore: update moduleResolution value casing (#18409)

This commit is contained in:
Bjorn Lu 2024-10-21 15:33:54 +08:00 committed by GitHub
parent 802839d483
commit ff018dca95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
21 changed files with 22 additions and 22 deletions

View File

@ -52,7 +52,7 @@ Hence, it's usually better to be explicit with your import paths, e.g. `import '
If you're a plugin author, make sure to only call [`this.resolve`](https://rollupjs.org/plugin-development/#this-resolve) when needed to reduce the number of checks above.
::: tip TypeScript
If you are using TypeScript, enable `"moduleResolution": "bundler"` and `"allowImportingTsExtensions": true` in your `tsconfig.json`'s `compilerOptions` to use `.ts` and `.tsx` extensions directly in your code.
If you are using TypeScript, enable `"moduleResolution": "Bundler"` and `"allowImportingTsExtensions": true` in your `tsconfig.json`'s `compilerOptions` to use `.ts` and `.tsx` extensions directly in your code.
:::
## Avoid Barrel Files

View File

@ -8,7 +8,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -11,7 +11,7 @@
},
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -6,7 +6,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -7,7 +7,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -6,7 +6,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -7,7 +7,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -6,7 +6,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -7,7 +7,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -6,7 +6,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -4,7 +4,7 @@
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"strict": true,
"noEmit": true,
"noUncheckedSideEffectImports": true

View File

@ -1,6 +1,6 @@
{
"compilerOptions": {
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"target": "ESNext",
"module": "ESNext",
/**

View File

@ -7,7 +7,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -7,7 +7,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -6,7 +6,7 @@
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",

View File

@ -4,7 +4,7 @@
"outDir": "dist",
"target": "ES2022",
"module": "ES2020",
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"strict": true,
"skipLibCheck": true,
"declaration": false,

View File

@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "ES2020",
"moduleResolution": "node16",
"module": "node16",
"moduleResolution": "Node16",
"module": "Node16",
"lib": ["ES2020", "WebWorker"], // ES2020 is very conservative check for client types, could be bumped if needed
"types": [], // Avoid checking unrelated node_modules types
"noEmit": true,

View File

@ -3,7 +3,7 @@
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,

View File

@ -5,7 +5,7 @@
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,

View File

@ -3,7 +3,7 @@
"target": "ESNext",
"module": "ESNext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"strict": true,
"sourceMap": true,
"resolveJsonModule": true,

View File

@ -10,7 +10,7 @@
"allowJs": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"moduleResolution": "bundler",
"moduleResolution": "Bundler",
"skipLibCheck": true,
"noUnusedLocals": true,
"jsx": "preserve",