Skip to content

Commit

Permalink
Bug fixed in npx execution while autofix is true
Browse files Browse the repository at this point in the history
  • Loading branch information
yousufkalim committed Jul 5, 2022
1 parent c8e4d41 commit 1038085
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ All notable changes to this project will be documented in this file.
> - Internal
> - Unreleased
## v2.0.1

#### Bug Fixes

- Bug fixed in npx execution while autofix is true

## v2.0.0

#### Features
Expand Down
4 changes: 3 additions & 1 deletion 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 package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-action",
"version": "2.0.0",
"version": "2.0.1",
"description": "Run ESLint on files changed in a pull request with inline error and warning annotations",
"author": "yousufkalim",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion src/eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ export const runEslint = async (inputs: Inputs): Promise<void> => {

// Running prettier and eslint --fix on the files
await exec(`npx prettier --write ${files.join(' ')} --config ./.prettierrc`);
await exec(`npx eslint --fix ${files.join(' ')} ${inputs.eslintArgs.join(' ')}`);

// Executing eslint
execOptions.splice(1, 0, '--fix');
await exec('node', execOptions);
} else {
// Executing eslint
await exec('node', execOptions);
Expand Down

0 comments on commit 1038085

Please sign in to comment.