Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused locals and parameters #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('NgxDebounceClickDirective', () => {
button = fixture.nativeElement.querySelector('button');
}));

it('should debounce a click event', fakeAsync(done => {
it('should debounce a click event', fakeAsync(() => {
expect(component.count).toBe(0);
button.click();
expect(component.count).toBe(0);
Expand Down
10 changes: 1 addition & 9 deletions projects/ngx-debounce-click/src/ngx-debounce-click.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import {
EventEmitter,
HostListener,
Input,
Inject,
OnInit,
OnDestroy,
Output,
PLATFORM_ID
Output
} from '@angular/core';
import { isPlatformBrowser } from '@angular/common';
import { Subject, Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators';

Expand All @@ -21,11 +18,6 @@ export class NgxDebounceClickDirective implements OnInit, OnDestroy {
@Output() readonly debouncedClick = new EventEmitter<MouseEvent>();
private readonly clicks = new Subject<MouseEvent>();
private subscription: Subscription;
private isBrowser = false;

constructor(@Inject(PLATFORM_ID) platformId: string) {
this.isBrowser = isPlatformBrowser(platformId);
}

ngOnInit() {
this.listenToClicks();
Expand Down
4 changes: 1 addition & 3 deletions projects/ngx-eq/src/ngx-eq.directive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { NgxEqModule } from './ngx-eq.module';
class TestComponent {}

describe('NgxEqDirective', () => {
let component: TestComponent;
let fixture: ComponentFixture<TestComponent>;

beforeEach(async(() => {
Expand All @@ -27,10 +26,9 @@ describe('NgxEqDirective', () => {
}).compileComponents();

fixture = TestBed.createComponent(TestComponent);
component = fixture.componentInstance;
}));

it('should apply ngx-eq css class', fakeAsync(done => {
it('should apply ngx-eq css class', fakeAsync(() => {
tick();
expect(fixture.nativeElement.innerHTML).toContain('ngx-eq');
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TestComponent {
describe('NgxInputStarRatingComponent', () => {
let component: TestComponent;
let fixture: ComponentFixture<TestComponent>;
let switchEl;

beforeEach(async(() => {
TestBed.configureTestingModule({
Expand All @@ -34,7 +33,6 @@ describe('NgxInputStarRatingComponent', () => {
fixture = TestBed.createComponent(TestComponent);
component = fixture.componentInstance;
fixture.detectChanges();
switchEl = fixture.nativeElement.querySelector('.input-rating');
});

it('should create', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class TestComponent {
describe('NgxInputSwitchComponent', () => {
let component: TestComponent;
let fixture: ComponentFixture<TestComponent>;
let switchEl;

beforeEach(async(() => {
TestBed.configureTestingModule({
Expand All @@ -34,7 +33,6 @@ describe('NgxInputSwitchComponent', () => {
fixture = TestBed.createComponent(TestComponent);
component = fixture.componentInstance;
fixture.detectChanges();
switchEl = fixture.nativeElement.querySelector('.switch');
});

it('should create', () => {
Expand Down
1 change: 0 additions & 1 deletion projects/ngx-json-ld/src/ngx-json-ld.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NgxJsonLdComponent } from './ngx-json-ld.component';
import { SimpleChange } from '@angular/core';

const testSchema = {
'@context': 'http://schema.org',
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-nav-drawer/src/ngx-nav-drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class NgxNavDrawerComponent implements OnChanges, OnDestroy, OnInit {
ngOnInit() {
if (isPlatformBrowser(this.platformId)) {
this.setFixedPosition();
this.subscription = fromEvent(window, 'resize').subscribe(event =>
this.subscription = fromEvent(window, 'resize').subscribe(() =>
this.setFixedPosition()
);
}
Expand Down
1 change: 0 additions & 1 deletion projects/ngx-tabs/src/ngx-tabs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
ViewEncapsulation,
ChangeDetectionStrategy
} from '@angular/core';
import { tap } from 'rxjs/operators';

@Component({
selector: 'ngx-tabs',
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
Expand Down