Skip to content

Commit

Permalink
fix(tslint): fix tslint errors (#4770)
Browse files Browse the repository at this point in the history
* fix(carousel): fix tslint errors

* fix(dropdown): fix tslint errors

* fix(rating): fix tslint errors in rating component

* fix(pagination): fix tslint errors

* fix(positioning): fix tslint errors

* fix(rating): fix tslint errors in src/rating component

* fix(modal): fix tslint issues

* fix(timepicker): fix tslint errors

* fix(typeahead): fix tslint issues

* Update tslint.json

* Update tslint.json

* fix(accordion): fix tslint errors into accordion

* fix(tooltip/progressbar/tabs): fix tslint errors of tooltip, progressbar, tabs components

* fix(tslint): clean up

* fix(buttons): fix tslint errors

* fix(tslint): clean up

* clean up

* feat(hook): add pre-push hook

* fix(tslint): fix tslint errors && add pre-push hook
  • Loading branch information
Domainv authored and valorkin committed Nov 15, 2018
1 parent 5ebf88c commit d01c533
Show file tree
Hide file tree
Showing 95 changed files with 881 additions and 324 deletions.
215 changes: 211 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"demo.deploy": "run-s demo.build demo.deploy-gh-pages",
"link": "npm link ./dist && npm link ngx-bootstrap",
"lint-pretty": "prettier --config .prettierrc --write -l \"{demo/src,src}/**/*.ts\"",
"lint-src": "tslint \"src/**/*.ts\" -c tslint.json --type-check -p src/tsconfig.spec.json -e \"src/chronos/**\" -e \"src/**/bs-datepicker-view.html\"",
"lint-src": "tslint \"src/**/*.ts\" -c tslint.json -p src/tsconfig.spec.json -e \"src/chronos/**\"",
"lint": "exit 0",
"disable-lint": "tslint \"**/*.ts\" -c tslint.json --fix --type-check -t prose -e \"node_modules/**\" -e \"dist/**\" -e \"temp/**\" -e \"scripts/docs/**\"",
"flow.changelog": "conventional-changelog -i CHANGELOG.md -s -p angular",
Expand Down Expand Up @@ -48,6 +48,11 @@
"webpack:server": "webpack --config ./scripts/universal/webpack.server.config.js --progress --colors",
"configure-heroku": "node scripts/universal/configure-heroku.js"
},
"husky": {
"hooks": {
"pre-push": "npm run lint-src"
}
},
"main": "bundles/ngx-bootstrap.umd.js",
"module": "esm5/ngx-bootstrap.js",
"typings": "ngx-bootstrap.d.ts",
Expand Down Expand Up @@ -75,6 +80,8 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "0.6.1",
"@angular-devkit/core": "0.8.5",
"@angular-devkit/schematics": "0.8.5",
"@angular/animations": "6.0.1",
"@angular/cli": "6.1.5",
"@angular/common": "6.0.1",
Expand All @@ -89,8 +96,6 @@
"@angular/platform-server": "6.0.1",
"@angular/router": "6.0.1",
"@angular/service-worker": "6.0.1",
"@angular-devkit/core": "0.8.5",
"@angular-devkit/schematics": "0.8.5",
"@cypress/webpack-preprocessor": "3.0.1",
"@nguniversal/express-engine": "6.0.0",
"@nguniversal/module-map-ngfactory-loader": "6.0.0",
Expand All @@ -117,6 +122,7 @@
"gitignore-to-glob": "0.3.0",
"google-code-prettify": "1.0.5",
"html-loader": "0.5.5",
"husky": "1.0.0",
"intl": "^1.2.5",
"jasmine": "3.1.0",
"jasmine-core": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/accordion-group.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="panel card" [ngClass]="panelClass">
<div class="panel-heading card-header" role="tab"
(click)="toggleOpen($event)">
(click)="toggleOpen()">
<div class="panel-title">
<div role="button" class="accordion-toggle"
[attr.aria-expanded]="isOpen">
Expand Down
12 changes: 8 additions & 4 deletions src/accordion/accordion-group.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export class AccordionPanelComponent implements OnInit, OnDestroy {
this._isOpen = value;
Promise.resolve(null).then(() => {
this.isOpenChange.emit(value);
});
})
.catch((error: Error) => {
/* tslint:disable: no-console */
console.log(error);
});
}
}

Expand All @@ -63,16 +67,16 @@ export class AccordionPanelComponent implements OnInit, OnDestroy {
this.accordion = accordion;
}

ngOnInit(): any {
ngOnInit(): void {
this.panelClass = this.panelClass || 'panel-default';
this.accordion.addGroup(this);
}

ngOnDestroy(): any {
ngOnDestroy(): void {
this.accordion.removeGroup(this);
}

toggleOpen(event: Event): any {
toggleOpen(): void {
if (!this.isDisabled) {
this.isOpen = !this.isOpen;
}
Expand Down
Loading

0 comments on commit d01c533

Please sign in to comment.