Skip to content

Commit c607367

Browse files
author
Paul Vecchio
committed
Fix linting issues and ignore node_modules
1 parent f0f1640 commit c607367

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ const cli = meow(`
1414
},
1515
})
1616

17-
run(cli.input[0], cli.flags.ext)
17+
run(cli.input[0], cli.flags.ext)

src/lint-diff.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,14 @@ import { getChangedLinesFromDiff } from './lib/git'
3232
const linter = new CLIEngine()
3333
const formatter = linter.getFormatter()
3434

35-
3635
const getChangedFiles = extensions => pipeWith(
3736
then,
3837
[
3938
commitRange => exec('git', ['diff', commitRange, '--name-only', '--diff-filter=ACMR']),
4039
prop('stdout'),
4140
split('\n'),
4241
filter(file => extensions.split(',').some(ext => endsWith(ext, file))),
43-
map(path.resolve)
42+
map(path.resolve),
4443
]
4544
)
4645

@@ -54,7 +53,7 @@ const getChangedFileLineMap = curry((commitRange, filePath) => pipeWith(
5453
getDiff(commitRange),
5554
getChangedLinesFromDiff,
5655
objOf('changedLines'),
57-
assoc('filePath', filePath)
56+
assoc('filePath', filePath),
5857
]
5958
)(filePath))
6059

@@ -139,7 +138,7 @@ const reportResults = pipe(
139138
])
140139
)
141140

142-
const run = (commitRange = 'HEAD', extensions='.js') => Promise.resolve(commitRange)
141+
const run = (commitRange = 'HEAD', extensions = '.js') => Promise.resolve(commitRange)
143142
.then(getChangedFiles(extensions))
144143
.map(getChangedFileLineMap(commitRange))
145144
.then(applyLinter)

0 commit comments

Comments
 (0)