Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ typings/

# next.js build output
.next

.idea/
6 changes: 6 additions & 0 deletions lib/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

set -e

if [ -z "$PROJECT_DIRECTORY" ]
then
PROJECT_DIRECTORY="."
fi

cd $PROJECT_DIRECTORY
npm install

NODE_PATH=node_modules node /action/lib/run.js
5 changes: 4 additions & 1 deletion lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ function eslint() {
const eslint = require('eslint')

const cli = new eslint.CLIEngine()
const report = cli.executeOnFiles(['.'])

const filePattern = process.env.FILE_PATTERN || '.';

const report = cli.executeOnFiles([filePattern])
// fixableErrorCount, fixableWarningCount are available too
const { results, errorCount, warningCount } = report

Expand Down