繁体   English   中英

无法将提交推送到远程 GitHub

[英]Can't push commit to remote GitHub

我最近在我当前的存储库中添加了一个新的 Angular 项目。 然后添加了 angular-calendar 和 ngx-admin Angular 项目。 提交到本地 Git 工作,但在推送到 GitHub 时出现此错误。

Linting "ngx-admin-demo"...
no-use-before-declare is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
typeof-compare is deprecated. Starting from TypeScript 2.2 the compiler includes this check which makes this rule redundant.
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.

ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:6:13 - The selector should be prefixed by "ngx" (https://angular.io/guide/styleguide#style-02-07)
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:13:24 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:18:42 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:19:62 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:25:26 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:26:5 - Forbidden 'var' keyword, use 'let' or 'const' instead
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:26:9 - Identifier 'selectedBuilding' is never reassigned; use 'const' instead of 'var'.
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:26:58 - == should be ===
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:26:87 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/@theme/components/booking-form/booking-form.component.ts:27:68 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/bookings.module.ts:23:26 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/bookings.module.ts:26:34 - file should end with a newline
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/new-booking/new-booking.component.ts:5:13 - The selector should be prefixed by "ngx" (https://angular.io/guide/styleguide#style-02-07)
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/new-booking/new-booking.component.ts:6:46 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/new-booking/new-booking.component.ts:15:62 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/view-bookings/view-bookings.component.ts:4:13 - The selector should be prefixed by "ngx" (https://angular.io/guide/styleguide#style-02-07)
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/bookings/view-bookings/view-bookings.component.ts:5:48 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/dashboard/dashboard.module.ts:11:3 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/dashboard/dashboard.module.ts:17:33 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/dashboard/dashboard.module.ts:23:22 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/pages-routing.module.ts:23:63 - comment must start with a space
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/pages.module.ts:18:16 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/rooms/rooms.module.ts:18:31 - file should end with a newline
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/rooms/view-rooms/view-rooms.component.ts:5:13 - The selector should be prefixed by "ngx" (https://angular.io/guide/styleguide#style-02-07)
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/pages/rooms/view-rooms/view-rooms.component.ts:7:45 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/services/booking.service.ts:6:21 - Missing trailing comma
ERROR: F:/Workspaces/UBD-TABS/DotNetAngularApp/ClientApp/src/app/services/booking.service.ts:12:22 - comment must start with a space

Lint errors found in the listed files.
Linting "ngx-admin-demo-e2e"...
All files pass linting.

> husky - pre-push hook failed (add --no-verify to bypass)
> husky - to debug, use 'npm run prepush'
Error: failed to push some refs to 'https://github.com/kuroza/UBD-TABS.git'
Error encountered while pushing to the remote repository: PushCommand.ExecutePushCommand

推送代码时似乎触发了 git hook,建议您修复 lint 错误

否则你可以检查配置,因为你有参考https://www.npmjs.com/package/prepush

或者,您可以使用日志中建议的“--no-verify”选项。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM