Skip to content

Commit dd384fe

Browse files
authored
FIX: add fix all target to lefthook to support bin/lint --fix (#36644)
1 parent 4223288 commit dd384fe

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

bin/lint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ class LefthookLinter
131131
end
132132

133133
if files == EVERYTHING
134-
# Run fix-staged on all files (no file filtering)
135-
run_lefthook_command("fix-staged", [])
134+
# Run fix-all on all files (no file filtering)
135+
run_lefthook_command("fix-all", [])
136136
elsif files.empty?
137137
puts "No files to fix, exiting."
138138
else

lefthook.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ fix-staged:
100100
- "Gemfile"
101101
run: bundle exec stree write Gemfile {staged_files}
102102

103+
fix-all:
104+
parallel: false
105+
commands:
106+
prettier:
107+
run: pnpm lint:prettier:fix
108+
eslint:
109+
run: pnpm lint:js:fix
110+
ember-template-lint:
111+
run: pnpm lint:hbs:fix
112+
stylelint:
113+
run: pnpm lint:css:fix
114+
rubocop:
115+
run: bundle exec rubocop --force-exclusion -A
116+
103117
lints:
104118
parallel: true
105119
commands:

0 commit comments

Comments
 (0)