Skip to content

Commit 1ae9b65

Browse files
committed
linting
1 parent a5adae2 commit 1ae9b65

File tree

4 files changed

+20
-19
lines changed

4 files changed

+20
-19
lines changed

packages/angular-cli/models/webpack-build-typescript.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export const getWebpackNonAotConfigPartial = function(projectRoot: string, appCo
3737
new webpack.ContextReplacementPlugin(/.*/, appRoot, lazyModules),
3838
new atl.ForkCheckerPlugin(),
3939
]
40-
}
40+
};
4141
};
4242

4343
export const getWebpackAotConfigPartial = function(projectRoot: string, appConfig: any) {
@@ -59,5 +59,5 @@ export const getWebpackAotConfigPartial = function(projectRoot: string, appConfi
5959
genDir: path.join(projectRoot, appConfig.outDir, 'ngfactory')
6060
}),
6161
]
62-
}
62+
};
6363
};

packages/ast-tools/src/route-utils.spec.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ describe('route utils', () => {
195195
});
196196
it('inserts into the correct array', () => {
197197
let editedFile = new InsertChange(mainFile, 124, ', [ HTTP_PROVIDERS, {provide: [BAR]}]');
198-
return editedFile.apply(NodeHostNodeHostNodeHostNodeHostNodeHost)
198+
return editedFile.apply(NodeHost)
199199
.then(() => nru.applyChanges(nru.bootstrapItem(mainFile, routes, toBootstrap)))
200200
.then(() => readFile(mainFile, 'utf8'))
201201
.then(content => {
@@ -205,7 +205,7 @@ describe('route utils', () => {
205205
});
206206
it('throws an error if there is no or multiple bootstrap expressions', () => {
207207
let editedFile = new InsertChange(mainFile, 126, '\n bootstrap(moreStuff);');
208-
return editedFile.apply(NodeHostNodeHostNodeHostNodeHostNodeHost)
208+
return editedFile.apply(NodeHost)
209209
.then(() => nru.bootstrapItem(mainFile, routes, toBootstrap))
210210
.catch(e =>
211211
expect(e.message).toEqual('Did not bootstrap provideRouter in' +
@@ -214,7 +214,7 @@ describe('route utils', () => {
214214
});
215215
it('configures correctly if bootstrap or provide router is not at top level', () => {
216216
let editedFile = new InsertChange(mainFile, 126, '\n if(e){bootstrap, provideRouter});');
217-
return editedFile.apply(NodeHostNodeHostNodeHostNodeHostNodeHost)
217+
return editedFile.apply(NodeHost)
218218
.then(() => nru.applyChanges(nru.bootstrapItem(mainFile, routes, toBootstrap)))
219219
.then(() => readFile(mainFile, 'utf8'))
220220
.then(content => {
@@ -299,7 +299,7 @@ export default [\n { path: 'new-route', component: NewRouteComponent }\n];`);
299299
});
300300
it('inserts under parent, mid', () => {
301301
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
302-
return editedFile.apply(NodeHostNodeHost).then(() => {
302+
return editedFile.apply(NodeHost).then(() => {
303303
options.dasherizedName = 'details';
304304
options.component = 'DetailsComponent';
305305
return nru.applyChanges(
@@ -324,7 +324,7 @@ export default [
324324
});
325325
it('inserts under parent, deep', () => {
326326
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
327-
return editedFile.apply(NodeHostNodeHost).then(() => {
327+
return editedFile.apply(NodeHost).then(() => {
328328
options.dasherizedName = 'sections';
329329
options.component = 'SectionsComponent';
330330
return nru.applyChanges(
@@ -360,7 +360,7 @@ export default [
360360
]
361361
}\n`;
362362
let editedFile = new InsertChange(routesFile, 16, paths);
363-
return editedFile.apply(NodeHostNodeHost).then(() => {
363+
return editedFile.apply(NodeHost).then(() => {
364364
options.dasherizedName = 'about';
365365
options.component = 'AboutComponent_1';
366366
return nru.applyChanges(
@@ -383,7 +383,7 @@ export default [
383383
});
384384
it('throws error if repeating child, shallow', () => {
385385
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
386-
return editedFile.apply(NodeHostNodeHost).then(() => {
386+
return editedFile.apply(NodeHost).then(() => {
387387
options.dasherizedName = 'home';
388388
options.component = 'HomeComponent';
389389
return nru.addPathToRoutes(routesFile, _.merge({route: '/home'}, options));
@@ -393,7 +393,7 @@ export default [
393393
});
394394
it('throws error if repeating child, mid', () => {
395395
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
396-
return editedFile.apply(NodeHostNodeHost).then(() => {
396+
return editedFile.apply(NodeHost).then(() => {
397397
options.dasherizedName = 'about';
398398
options.component = 'AboutComponent';
399399
return nru.addPathToRoutes(routesFile, _.merge({route: 'home/about/'}, options));
@@ -403,7 +403,7 @@ export default [
403403
});
404404
it('throws error if repeating child, deep', () => {
405405
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
406-
return editedFile.apply(NodeHostNodeHost).then(() => {
406+
return editedFile.apply(NodeHost).then(() => {
407407
options.dasherizedName = 'more';
408408
options.component = 'MoreComponent';
409409
return nru.addPathToRoutes(routesFile, _.merge({route: 'home/about/more'}, options));
@@ -413,7 +413,7 @@ export default [
413413
});
414414
it('does not report false repeat', () => {
415415
let editedFile = new InsertChange(routesFile, 16, nestedRoutes);
416-
return editedFile.apply(NodeHostNodeHost).then(() => {
416+
return editedFile.apply(NodeHost).then(() => {
417417
options.dasherizedName = 'more';
418418
options.component = 'MoreComponent';
419419
return nru.applyChanges(nru.addPathToRoutes(routesFile, _.merge({route: 'more'}, options)));
@@ -448,7 +448,7 @@ export default [
448448
},\n { path: 'trap-queen', component: TrapQueenComponent}\n`;
449449

450450
let editedFile = new InsertChange(routesFile, 16, routes);
451-
return editedFile.apply(NodeHostNodeHost).then(() => {
451+
return editedFile.apply(NodeHost).then(() => {
452452
options.dasherizedName = 'trap-queen';
453453
options.component = 'TrapQueenComponent';
454454
return nru.applyChanges(
@@ -475,10 +475,10 @@ export default [
475475
it('resolves imports correctly', () => {
476476
let editedFile = new InsertChange(routesFile, 16,
477477
`\n { path: 'home', component: HomeComponent }\n`);
478-
return editedFile.apply(NodeHostNodeHost).then(() => {
478+
return editedFile.apply(NodeHost).then(() => {
479479
let editedFile = new InsertChange(routesFile, 0,
480480
`import { HomeComponent } from './app/home/home.component';\n`);
481-
return editedFile.apply(NodeHostNodeHost);
481+
return editedFile.apply(NodeHost);
482482
})
483483
.then(() => {
484484
options.dasherizedName = 'home';
@@ -507,7 +507,7 @@ export default [
507507
{ path: 'details', component: DetailsComponent }
508508
]
509509
}`);
510-
return editedFile.apply(NodeHostNodeHost).then(() => {
510+
return editedFile.apply(NodeHost).then(() => {
511511
let editedFile = new InsertChange(routesFile, 0,
512512
`import { AboutComponent } from './app/about/about.component';
513513
import { DetailsComponent } from './app/about/details/details.component';

packages/webpack/src/loader.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as path from 'path';
22
import * as ts from 'typescript';
33
import {NgcWebpackPlugin} from './plugin';
4-
import {Host, MultiChange, ReplaceChange, insertImport} from '@angular-cli/ast-tools';
4+
import {MultiChange, ReplaceChange, insertImport} from '@angular-cli/ast-tools';
55

66
// TODO: move all this to ast-tools.
77
function _findNodes(sourceFile: ts.SourceFile, node: ts.Node, kind: ts.SyntaxKind,
8-
keepGoing: boolean = false): ts.Node[] {
8+
keepGoing = false): ts.Node[] {
99
if (node.kind == kind && !keepGoing) {
1010
return [node];
1111
}

tests/e2e/setup/100-npm-link.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default function (argv: any) {
3232
});
3333
}))
3434
.then(() => npm('link'))
35-
.then(() => process.chdir(oldCwd))
35+
.then(() => process.chdir(oldCwd));
36+
})
3637
.then(() => exec(process.platform.startsWith('win') ? 'where' : 'which', 'ng'));
3738
}

0 commit comments

Comments
 (0)