fix: enforce type checking on commit time
This commit is contained in:
parent
750487e8ad
commit
2a67e98588
9 changed files with 23 additions and 2 deletions
|
|
@ -12,8 +12,9 @@
|
||||||
"generate": "pnpm -r do-build-prod",
|
"generate": "pnpm -r do-build-prod",
|
||||||
"start": "pnpm -r do-prod-start",
|
"start": "pnpm -r do-prod-start",
|
||||||
"lint": "pnpm -r do-lint",
|
"lint": "pnpm -r do-lint",
|
||||||
|
"typecheck": "pnpm -r do-typecheck",
|
||||||
"lintfix": "pnpm -r do-lintfix",
|
"lintfix": "pnpm -r do-lintfix",
|
||||||
"pre-commit": "pnpm -r do-lint",
|
"pre-commit": "pnpm -r do-lint && pnpm -r do-typecheck",
|
||||||
"test": "pnpm -r do-test"
|
"test": "pnpm -r do-test"
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
"lintfix": "pnpm run lintfix:script && pnpm run lintfix:style",
|
"lintfix": "pnpm run lintfix:script && pnpm run lintfix:style",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"do-dev": "pnpm run dev",
|
"do-dev": "pnpm run dev",
|
||||||
|
"do-typecheck": "pnpx tsc --noEmit",
|
||||||
"do-build-prod": "pnpm run generate",
|
"do-build-prod": "pnpm run generate",
|
||||||
"do-prod-start": "pnpm run start",
|
"do-prod-start": "pnpm run start",
|
||||||
"do-lint": "pnpm run lint",
|
"do-lint": "pnpm run lint",
|
||||||
|
|
@ -146,6 +147,7 @@
|
||||||
"@types/httpsnippet": "^1.23.1",
|
"@types/httpsnippet": "^1.23.1",
|
||||||
"@types/lodash": "^4.14.179",
|
"@types/lodash": "^4.14.179",
|
||||||
"@types/lossless-json": "^1.0.1",
|
"@types/lossless-json": "^1.0.1",
|
||||||
|
"@types/paho-mqtt": "^1.0.6",
|
||||||
"@types/postman-collection": "^3.5.7",
|
"@types/postman-collection": "^3.5.7",
|
||||||
"@types/splitpanes": "^2.2.1",
|
"@types/splitpanes": "^2.2.1",
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
|
|
||||||
7
packages/hoppscotch-app/types/socket-io-2.d.ts
vendored
Normal file
7
packages/hoppscotch-app/types/socket-io-2.d.ts
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
// NOTE: This is an implementation just for shutting up
|
||||||
|
// tsc, this is really annoying (and maybe dangerous)
|
||||||
|
// We don't have access to the 2.4.0 typings, hence we make do with this,
|
||||||
|
// Check docs before you correct types again as you need
|
||||||
|
declare module "socket.io-client-v2" {
|
||||||
|
export type Socket = any
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,8 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsup src --dts",
|
"build": "tsup src --dts",
|
||||||
"prepare": "tsup src --dts"
|
"prepare": "tsup src --dts",
|
||||||
|
"do-typecheck": "pnpx tsc --noEmit"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": "./dist/index.js",
|
".": "./dist/index.js",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
"prepublish": "pnpm run build",
|
"prepublish": "pnpm run build",
|
||||||
"do-lint": "pnpm run lint",
|
"do-lint": "pnpm run lint",
|
||||||
"do-lintfix": "pnpm run lintfix",
|
"do-lintfix": "pnpm run lintfix",
|
||||||
|
"do-typecheck": "pnpx tsc --noEmit",
|
||||||
"do-build-prod": "pnpm run build",
|
"do-build-prod": "pnpm run build",
|
||||||
"do-test": "pnpm run test"
|
"do-test": "pnpm run test"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
"target": "ES6",
|
"target": "ES6",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node",
|
||||||
|
"skipLibCheck": true,
|
||||||
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
|
"lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ importers:
|
||||||
'@types/httpsnippet': ^1.23.1
|
'@types/httpsnippet': ^1.23.1
|
||||||
'@types/lodash': ^4.14.179
|
'@types/lodash': ^4.14.179
|
||||||
'@types/lossless-json': ^1.0.1
|
'@types/lossless-json': ^1.0.1
|
||||||
|
'@types/paho-mqtt': ^1.0.6
|
||||||
'@types/postman-collection': ^3.5.7
|
'@types/postman-collection': ^3.5.7
|
||||||
'@types/splitpanes': ^2.2.1
|
'@types/splitpanes': ^2.2.1
|
||||||
'@types/uuid': ^8.3.4
|
'@types/uuid': ^8.3.4
|
||||||
|
|
@ -301,6 +302,7 @@ importers:
|
||||||
'@types/httpsnippet': 1.23.1
|
'@types/httpsnippet': 1.23.1
|
||||||
'@types/lodash': 4.14.179
|
'@types/lodash': 4.14.179
|
||||||
'@types/lossless-json': 1.0.1
|
'@types/lossless-json': 1.0.1
|
||||||
|
'@types/paho-mqtt': 1.0.6
|
||||||
'@types/postman-collection': 3.5.7
|
'@types/postman-collection': 3.5.7
|
||||||
'@types/splitpanes': 2.2.1
|
'@types/splitpanes': 2.2.1
|
||||||
'@types/uuid': 8.3.4
|
'@types/uuid': 8.3.4
|
||||||
|
|
@ -5021,6 +5023,10 @@ packages:
|
||||||
'@types/webpack': 4.41.28
|
'@types/webpack': 4.41.28
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/paho-mqtt/1.0.6:
|
||||||
|
resolution: {integrity: sha512-d6CXsdv2fEruyZLe5DUtgGsF8ROp0358OrEmVgqtFxO/kiCvP9KhYen9N6ReKBkMdR/d0parLQq6DMn2qe6d9Q==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@types/parse-json/4.0.0:
|
/@types/parse-json/4.0.0:
|
||||||
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
|
resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue