mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 13:17:08 +00:00
Move web
tsconfig to let TS language server work (#506)
* Move `web` tsconfig to let TS language server work * Assign typing to images This removes type errors on imported images.
This commit is contained in:
parent
24a653f11d
commit
911a73abba
1
changelog.d/506.misc
Normal file
1
changelog.d/506.misc
Normal file
@ -0,0 +1 @@
|
||||
Refactor the Vite component's `tsconfig.json` file to make it compatible with the TypeScript project settings & the TypeScript language server.
|
@ -1,27 +0,0 @@
|
||||
{
|
||||
"include": ["web"],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2019",
|
||||
"moduleResolution": "node",
|
||||
"jsx": "preserve",
|
||||
"jsxFactory": "h",
|
||||
"baseUrl": "./",
|
||||
/* noEmit - Snowpack builds (emits) files, not tsc. */
|
||||
"noEmit": true,
|
||||
/* Additional Options */
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"importsNotUsedAsValues": "error",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"web/typings"
|
||||
]
|
||||
},
|
||||
}
|
||||
|
23
web/tsconfig.json
Normal file
23
web/tsconfig.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2019",
|
||||
"moduleResolution": "node",
|
||||
"jsx": "preserve",
|
||||
"jsxFactory": "h",
|
||||
/* noEmit - Snowpack builds (emits) files, not tsc. */
|
||||
"noEmit": true,
|
||||
/* Additional Options */
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"typeRoots": [
|
||||
"./typings"
|
||||
]
|
||||
}
|
||||
}
|
4
web/typings/images.d.ts
vendored
Normal file
4
web/typings/images.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare module "*.png" {
|
||||
const content: string
|
||||
export = content
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user