Skip to content

Commit 4177b56

Browse files
clydinalexeagle
authored andcommitted
refactor(@angular-devkit/schematics): minor rule cleanup (#14313)
1 parent e0246e2 commit 4177b56

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

packages/angular_devkit/schematics/src/rules/base.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function mergeWith(source: Source, strategy: MergeStrategy = MergeStrateg
7070

7171

7272
export function noop(): Rule {
73-
return (tree: Tree, _context: SchematicContext) => tree;
73+
return () => {};
7474
}
7575

7676

@@ -159,12 +159,9 @@ export function forEach(operator: FileOperator): Rule {
159159
tree.overwrite(newEntry.path, newEntry.content);
160160
}
161161
});
162-
163-
return tree;
164162
};
165163
}
166164

167-
168165
export function composeFileOperators(operators: FileOperator[]): FileOperator {
169166
return (entry: FileEntry) => {
170167
let current: FileEntry | null = entry;

packages/angular_devkit/schematics/src/rules/call.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import { BaseException, isObservable, isPromise } from '@angular-devkit/core';
99
import { Observable, from, of as observableOf, throwError } from 'rxjs';
10-
import { defaultIfEmpty, last, map, mergeMap, tap } from 'rxjs/operators';
10+
import { defaultIfEmpty, last, mergeMap, tap } from 'rxjs/operators';
1111
import { Rule, SchematicContext, Source } from '../engine/interface';
1212
import { Tree, TreeSymbol } from '../tree/interface';
1313

0 commit comments

Comments
 (0)