Skip to content

Commit

Permalink
[misc] code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cmoseses committed May 31, 2017
1 parent 70adda3 commit cb3c7c7
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 31 deletions.
4 changes: 2 additions & 2 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HomeworkPage } from './app.po';
import {HomeworkPage} from './app.po';

describe('homework App', function() {
describe('homework App', function () {
let page: HomeworkPage;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { browser, element, by } from 'protractor';
import {browser, element, by} from 'protractor';

export class HomeworkPage {
navigateTo() {
Expand Down
8 changes: 4 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ module.exports = function (config) {
require('angular-cli/plugins/karma')
],
files: [
{ pattern: './src/test.ts', watched: false }
{pattern: './src/test.ts', watched: false}
],
preprocessors: {
'./src/test.ts': ['angular-cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
'text/x-typescript': ['ts', 'tsx']
},
remapIstanbulReporter: {
reports: {
Expand All @@ -31,8 +31,8 @@ module.exports = function (config) {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'karma-remap-istanbul']
: ['progress'],
? ['progress', 'karma-remap-istanbul']
: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
7 changes: 4 additions & 3 deletions protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
print: function () {
}
},
useAllAngular2AppRoots: true,
beforeLaunch: function() {
beforeLaunch: function () {
require('ts-node').register({
project: 'e2e'
});
},
onPrepare: function() {
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter());
}
};
4 changes: 2 additions & 2 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-unused-variable */

import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
import {TestBed, async} from '@angular/core/testing';
import {AppComponent} from './app.component';

describe('AppComponent', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import {Component} from '@angular/core';

@Component({
selector: 'app-root',
Expand Down
13 changes: 7 additions & 6 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http';

import { AppComponent } from './app.component';
import {AppComponent} from './app.component';

@NgModule({
declarations: [
Expand All @@ -17,4 +17,5 @@ import { AppComponent } from './app.component';
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root>Loading...</app-root>
<app-root>Loading...</app-root>
</body>
</html>
8 changes: 4 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
import { AppModule } from './app/app.module';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {enableProdMode} from '@angular/core';
import {environment} from './environments/environment';
import {AppModule} from './app/app.module';

if (environment.production) {
enableProdMode();
Expand Down
5 changes: 3 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'zone.js/dist/sync-test';
import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
import { getTestBed } from '@angular/core/testing';
import {getTestBed} from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
Expand All @@ -17,7 +17,8 @@ declare var __karma__: any;
declare var require: any;

// Prevent Karma from running prematurely.
__karma__.loaded = function () {};
__karma__.loaded = function () {
};

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
Expand Down
5 changes: 4 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"lib": [
"es6",
"dom"
],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
Expand Down
20 changes: 16 additions & 4 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"curly": true,
"eofline": true,
"forin": true,
"import-blacklist": [true, "rxjs"],
"import-blacklist": [
true,
"rxjs"
],
"import-spacing": true,
"indent": [
true,
Expand Down Expand Up @@ -97,9 +100,18 @@
"check-separator",
"check-type"
],

"directive-selector": [true, "attribute", "app", "camelCase"],
"component-selector": [true, "element", "app", "kebab-case"],
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
Expand Down

0 comments on commit cb3c7c7

Please sign in to comment.