File tree 2 files changed +26
-1
lines changed
packages/@angular/cli/commands
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export default Command.extend({
37
37
} ,
38
38
{
39
39
name : 'format' ,
40
- alias : 't' ,
40
+ aliases : [ 't' ] ,
41
41
type : String ,
42
42
default : 'prose' ,
43
43
description : oneLine `
Original file line number Diff line number Diff line change
1
+ import { ng } from '../../utils/process' ;
2
+ import { writeFile } from '../../utils/fs' ;
3
+ import { getGlobalVariable } from '../../utils/env' ;
4
+ import { oneLine } from 'common-tags' ;
5
+
6
+ export default function ( ) {
7
+ // Skip this in Appveyor tests.
8
+ if ( getGlobalVariable ( 'argv' ) . appveyor ) {
9
+ return Promise . resolve ( ) ;
10
+ }
11
+
12
+ const fileName = 'src/app/foo.ts' ;
13
+
14
+ return Promise . resolve ( )
15
+ . then ( ( ) => writeFile ( fileName , 'const foo = "";\n' ) )
16
+ . then ( ( ) => ng ( 'lint' , '-t=stylish' , '--force' ) )
17
+ . then ( ( { stdout } ) => {
18
+ if ( ! stdout . match ( / 1 : 1 3 q u o t e m a r k " s h o u l d b e ' / ) ) {
19
+ throw new Error ( oneLine `
20
+ Expected to match "1:13 quotemark " should be '"
21
+ in ${ stdout } .
22
+ ` ) ;
23
+ }
24
+ } ) ;
25
+ }
You can’t perform that action at this time.
0 commit comments