Commit
Fixes: #118
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,10 +24,16 @@ import {Options} from './cli'; | |
* Run tslint with the default configuration. Returns true on success. | ||
* @param options gts options | ||
* @param files files to run linter on | ||
* @param fix automatically fix linter errors | ||
* @param fix automatically fix linter errors. Ignored when options.dryRun is | ||
* set. | ||
*/ | ||
export function lint( | ||
options: Options, files: string[] = [], fix = false): boolean { | ||
if (options.dryRun && fix) { | ||
options.logger.log('lint: skipping auto fix since --dry-run was passed'); | ||
fix = false; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ofrobots
Author
Contributor
|
||
} | ||
|
||
if (files.length > 0) { // manually provided filenames. | ||
const rcs = files.map(file => { | ||
// Different config files may apply to each file. | ||
|
@ofrobots hey there, I've got a question out of curiosity. Why this
fix
is being set? Isn't it in local scope anyway?