简体   繁体   中英

Can't push commit to remote GitHub

I've recently added a new Angular project into my current repository. Then added angular-calendar and ngx-admin Angular projects. Commit to local Git works but I got this error when push to 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

There seems to be a git hook triggered when you push your code it is recommended that you fix the lint errors

else you can check the config for you have refer https://www.npmjs.com/package/prepush

alternatively you can use the '--no-verify' option as suggested in the logs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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