maciejtreder/angular-universal-pwa

View on GitHub

Showing 7 of 11 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('Lazy component -', () => {
let component: any;
let fixture: ComponentFixture<LazyComponent>;
 
beforeEach(() => {
Severity: Major
Found in application/src/app/lazy/lazy.component.spec.ts and 1 other location - About 5 hrs to fix
application/src/app/home/home.component.spec.ts on lines 4..21

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('Home component -', () => {
let component: any;
let fixture: ComponentFixture<HomeComponent>;
 
beforeEach(() => {
Severity: Major
Found in application/src/app/home/home.component.spec.ts and 1 other location - About 5 hrs to fix
application/src/app/lazy/lazy.component.spec.ts on lines 4..21

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class WithTransferStateComponent implements OnInit {
public hits: string;
public shake: boolean = false;
 
constructor(private route: ActivatedRoute) {}
application/src/app/transfer-state/without-transfer-state.component.ts on lines 8..21

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export class WithoutTransferStateComponent implements OnInit {
public hits: string;
public shake: boolean = false;
 
constructor(private route: ActivatedRoute) {}
application/src/app/transfer-state/with-transfer-state.component.ts on lines 8..21

Function exports has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Severity: Minor
Found in application/src/karma.conf.js - About 1 hr to fix

    Function ngOnInit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    public ngOnInit(): void {
    this.router.events.pipe(filter((event) => event instanceof NavigationEnd)).subscribe((event) => {
    const snapshot: ActivatedRouteSnapshot = this.router.routerState.snapshot.root.firstChild;
     
    const title: string = snapshot.data['title'];
    Severity: Minor
    Found in application/src/app/app.component.ts - About 1 hr to fix

      Function fireBug has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      export const fireBug = () => new Promise((resolve) => {
      if (environment.firebug) {
      const fb = document.createElement('script');
      fb.type = 'text/javascript'; fb.src = '../firebug-lite/build/firebug-lite.js';
      fb.innerHTML = `
      Severity: Minor
      Found in application/src/bootstrapScripts/firebug.ts - About 35 mins to fix
      Severity
      Category
      Status
      Source
      Language