Skip to content

Commit 1714e87

Browse files
fix lint issues
1 parent a415ca0 commit 1714e87

File tree

9 files changed

+85
-74
lines changed

9 files changed

+85
-74
lines changed

src/app/app.component.html

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,31 @@
33
<h1>
44
Welcome to {{ title }}!
55
</h1>
6-
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
6+
<img width="300"
7+
alt="Angular Logo"
8+
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
79
</div>
810
<h2>Here are some links to help you start: </h2>
911
<ul>
1012
<li>
11-
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
13+
<h2>
14+
<a target="_blank"
15+
rel="noopener"
16+
href="https://angular.io/tutorial">Tour of Heroes</a>
17+
</h2>
1218
</li>
1319
<li>
14-
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
20+
<h2>
21+
<a target="_blank"
22+
rel="noopener"
23+
href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a>
24+
</h2>
1525
</li>
1626
<li>
17-
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
27+
<h2>
28+
<a target="_blank"
29+
rel="noopener"
30+
href="https://blog.angular.io/">Angular blog</a>
31+
</h2>
1832
</li>
19-
</ul>
20-
33+
</ul>

src/app/app.component.spec.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
import { TestBed, async } from '@angular/core/testing';
2-
import { AppComponent } from './app.component';
3-
describe('AppComponent', () => {
4-
beforeEach(async(() => {
5-
TestBed.configureTestingModule({
6-
declarations: [
7-
AppComponent
8-
],
9-
}).compileComponents();
10-
}));
11-
it('should create the app', async(() => {
12-
const fixture = TestBed.createComponent(AppComponent);
13-
const app = fixture.debugElement.componentInstance;
14-
expect(app).toBeTruthy();
15-
}));
16-
it(`should have as title 'app'`, async(() => {
17-
const fixture = TestBed.createComponent(AppComponent);
18-
const app = fixture.debugElement.componentInstance;
19-
expect(app.title).toEqual('app');
20-
}));
21-
it('should render title in a h1 tag', async(() => {
22-
const fixture = TestBed.createComponent(AppComponent);
23-
fixture.detectChanges();
24-
const compiled = fixture.debugElement.nativeElement;
25-
expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
26-
}));
1+
import { TestBed, async } from "@angular/core/testing";
2+
import { AppComponent } from "./app.component";
3+
describe("AppComponent", () => {
4+
beforeEach(async(() => {
5+
TestBed.configureTestingModule({
6+
declarations: [
7+
AppComponent
8+
],
9+
}).compileComponents();
10+
}));
11+
it("should create the app", async(() => {
12+
const fixture = TestBed.createComponent(AppComponent);
13+
const app = fixture.debugElement.componentInstance;
14+
expect(app).toBeTruthy();
15+
}));
16+
it(`should have as title 'app'`, async(() => {
17+
const fixture = TestBed.createComponent(AppComponent);
18+
const app = fixture.debugElement.componentInstance;
19+
expect(app.title).toEqual("app");
20+
}));
21+
it("should render title in a h1 tag", async(() => {
22+
const fixture = TestBed.createComponent(AppComponent);
23+
fixture.detectChanges();
24+
const compiled = fixture.debugElement.nativeElement;
25+
expect(compiled.querySelector("h1").textContent).toContain("Welcome to app!");
26+
}));
2727
});

src/app/app.component.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component } from '@angular/core';
1+
import { Component } from "@angular/core";
22

33
@Component({
4-
selector: 'app-root',
5-
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.scss']
4+
selector: "app-root",
5+
templateUrl: "./app.component.html",
6+
styleUrls: ["./app.component.scss"]
77
})
88
export class AppComponent {
9-
title = 'app';
9+
title = "app";
1010
}

src/app/app.module.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { BrowserModule } from '@angular/platform-browser';
2-
import { NgModule } from '@angular/core';
1+
import { BrowserModule } from "@angular/platform-browser";
2+
import { NgModule } from "@angular/core";
33

44

5-
import { AppComponent } from './app.component';
5+
import { AppComponent } from "./app.component";
66

77

88
@NgModule({
9-
declarations: [
10-
AppComponent
11-
],
12-
imports: [
13-
BrowserModule
14-
],
15-
providers: [],
16-
bootstrap: [AppComponent]
9+
declarations: [
10+
AppComponent
11+
],
12+
imports: [
13+
BrowserModule
14+
],
15+
providers: [],
16+
bootstrap: [AppComponent]
1717
})
1818
export class AppModule { }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const environment = {
2-
production: true
2+
production: true
33
};

src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
// The list of which env maps to which file can be found in `.angular-cli.json`.
55

66
export const environment = {
7-
production: false
7+
production: false
88
};

src/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { enableProdMode } from '@angular/core';
2-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1+
import { enableProdMode } from "@angular/core";
2+
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
33

4-
import { AppModule } from './app/app.module';
5-
import { environment } from './environments/environment';
4+
import { AppModule } from "./app/app.module";
5+
import { environment } from "./environments/environment";
66

77
if (environment.production) {
8-
enableProdMode();
8+
enableProdMode();
99
}
1010

1111
platformBrowserDynamic().bootstrapModule(AppModule)
12-
.catch(err => console.log(err));
12+
.catch(err => console.log(err));

src/polyfills.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
/** Evergreen browsers require these. **/
4545
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46-
import 'core-js/es7/reflect';
46+
import "core-js/es7/reflect";
4747

4848

4949
/**
@@ -53,12 +53,10 @@ import 'core-js/es7/reflect';
5353
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5454

5555

56-
5756
/***************************************************************************************************
5857
* Zone JS is required by Angular itself.
5958
*/
60-
import 'zone.js/dist/zone'; // Included with Angular CLI.
61-
59+
import "zone.js/dist/zone"; // Included with Angular CLI.
6260

6361

6462
/***************************************************************************************************

src/test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

3-
import 'zone.js/dist/long-stack-trace-zone';
4-
import 'zone.js/dist/proxy.js';
5-
import 'zone.js/dist/sync-test';
6-
import 'zone.js/dist/jasmine-patch';
7-
import 'zone.js/dist/async-test';
8-
import 'zone.js/dist/fake-async-test';
9-
import { getTestBed } from '@angular/core/testing';
3+
import "zone.js/dist/long-stack-trace-zone";
4+
import "zone.js/dist/proxy.js";
5+
import "zone.js/dist/sync-test";
6+
import "zone.js/dist/jasmine-patch";
7+
import "zone.js/dist/async-test";
8+
import "zone.js/dist/fake-async-test";
9+
import { getTestBed } from "@angular/core/testing";
1010
import {
11-
BrowserDynamicTestingModule,
12-
platformBrowserDynamicTesting
13-
} from '@angular/platform-browser-dynamic/testing';
11+
BrowserDynamicTestingModule,
12+
platformBrowserDynamicTesting
13+
} from "@angular/platform-browser-dynamic/testing";
1414

1515
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
1616
declare const __karma__: any;
1717
declare const require: any;
1818

1919
// Prevent Karma from running prematurely.
20-
__karma__.loaded = function () {};
20+
__karma__.loaded = function () { };
2121

2222
// First, initialize the Angular testing environment.
2323
getTestBed().initTestEnvironment(
24-
BrowserDynamicTestingModule,
25-
platformBrowserDynamicTesting()
24+
BrowserDynamicTestingModule,
25+
platformBrowserDynamicTesting()
2626
);
2727
// Then we find all the tests.
28-
const context = require.context('./', true, /\.spec\.ts$/);
28+
const context = require.context("./", true, /\.spec\.ts$/);
2929
// And load the modules.
3030
context.keys().map(context);
3131
// Finally, start Karma to run the tests.

0 commit comments

Comments
 (0)