Skip to content

Commit

Permalink
Convert read file to string
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsousaio committed Jul 26, 2022
1 parent 220fde5 commit cae0d54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export const runEslint = async (inputs: Inputs): Promise<void> => {

const ig = ignore();
if (fs.existsSync('.eslintignore')) {
ig.add(fs.readFileSync('.eslintignore', 'utf8'));
ig.add(fs.readFileSync('.eslintignore', 'utf8').toString());
}

const files = changedFiles
.filter((filename) => {
const isFileSupported = inputs.extensions.find((ext) => filename.endsWith(`.${ext}`));
return isFileSupported;
})
.filter(ig.ignores);
.filter((filename) => ig.ignores(filename));

if (files.length === 0) {
notice('No files found. Skipping.');
Expand Down

0 comments on commit cae0d54

Please sign in to comment.