Skip to content

Commit

Permalink
feat: add --fix for lintStaged
Browse files Browse the repository at this point in the history
  • Loading branch information
longgui.wjb committed Jun 23, 2022
1 parent 36da6e2 commit f30e1b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/middleware-lint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ const handler: Handler = opts => {
// Before all logic, simple and fast
const lintStagedConfig = {
config: {
"**/*.{js,jsx,ts,tsx}": `eslint --ignore-path ${ESLINT_IGNORE_FILE_PATH} --quiet --color`,
"**/*.{js,jsx,ts,tsx}": `eslint --ignore-path ${ESLINT_IGNORE_FILE_PATH} --quiet --color${
options.autoFix ? " --fix" : ""
}`,
},
};
if (options.prettier) {
Expand Down

0 comments on commit f30e1b0

Please sign in to comment.