Skip to content

Commit

Permalink
fix: file format
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkyao committed Nov 1, 2018
1 parent 93b8ffe commit c40f387
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,13 +887,11 @@ export async function lint(project: string, detail: boolean, debug: boolean, fil

for (const sourceFile of program.getSourceFiles()) {
let file = sourceFile.fileName
if (!file.includes('node_modules')) {
if (!file.includes('node_modules') && (!files || files.includes(file))) {
file = path.relative(process.cwd(), file)
if (!files || files.includes(file)) {
sourceFile.forEachChild(node => {
handleNode(node, file, sourceFile)
})
}
sourceFile.forEachChild(node => {
handleNode(node, file, sourceFile)
})
}
}

Expand Down

0 comments on commit c40f387

Please sign in to comment.