build: check component types (#283)

This commit is contained in:
Fine0830 2023-06-14 09:35:35 +08:00 committed by GitHub
parent 7fe3257c32
commit 77c1694383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -49,6 +49,7 @@ jobs:
npm ci
npm run lint
npm run build --if-present
npm run check-components-types
npm run test:unit
env:
CI: true

View File

@ -14,7 +14,8 @@
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged",
"prepare": "husky install"
"prepare": "husky install",
"check-components-types": "if (! git diff --quiet -U0 ./src/types); then echo 'type files are not updated correctly'; git diff -U0 ./src/types; exit 1; fi"
},
"dependencies": {
"axios": "^0.24.0",

View File

@ -128,10 +128,6 @@ limitations under the License. -->
});
}
function getURI(uri: { uriRegex: string; uriPath: string }) {
return uri && uri.uriRegex && uri.uriPath ? `(${uri.uriRegex || ""} | ${uri.uriPath || ""})` : "";
}
function resize() {
const observer = new ResizeObserver((entries) => {
const entry = entries[0];