-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@angular/cli):
ng lint
option format not work properly if using…
… alias
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ng } from '../../utils/process'; | ||
import { writeFile } from '../../utils/fs'; | ||
import { getGlobalVariable } from '../../utils/env'; | ||
import { oneLine } from 'common-tags'; | ||
|
||
export default function () { | ||
// Skip this in Appveyor tests. | ||
if (getGlobalVariable('argv').appveyor) { | ||
return Promise.resolve(); | ||
} | ||
|
||
const fileName = 'src/app/foo.ts'; | ||
|
||
return Promise.resolve() | ||
.then(() => writeFile(fileName, 'const foo = "";\n')) | ||
.then(() => ng('lint', '-t=stylish', '--force')) | ||
.then(({ stdout }) => { | ||
if (!stdout.match(/1:13 quotemark " should be '/)) { | ||
throw new Error(oneLine` | ||
Expected to match "1:13 quotemark " should be '" | ||
in ${stdout}. | ||
`); | ||
} | ||
}); | ||
} |