File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
packages/@angular/cli/tasks Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import * as ts from 'typescript';
99// @ignoreDep tslint - used only for type information
1010import * as tslint from 'tslint' ;
1111import { requireProjectModule } from '../utilities/require-project-module' ;
12+ import { stripBom } from '../utilities/strip-bom' ;
1213
1314const SilentError = require ( 'silent-error' ) ;
1415const Task = require ( '../ember-cli/lib/models/task' ) ;
@@ -167,14 +168,10 @@ function getFilesToLint(
167168}
168169
169170function getFileContents ( file : string ) : string {
170- let contents : string ;
171-
172171 // NOTE: The tslint CLI checks for and excludes MPEG transport streams; this does not.
173172 try {
174- contents = fs . readFileSync ( file , 'utf8' ) ;
173+ return stripBom ( fs . readFileSync ( file , 'utf-8' ) ) ;
175174 } catch ( e ) {
176175 throw new SilentError ( `Could not read file "${ file } ".` ) ;
177176 }
178-
179- return contents ;
180177}
You can’t perform that action at this time.
0 commit comments