-
Notifications
You must be signed in to change notification settings - Fork 488
Open
Labels
Description
I am using -PspotlessIdeHook to have spotless format all files that lint-staged detects. So, before a commit succeeds, lint-staged triggers spotless individually for each file since the -PspotlessIdeHook parameter accepts single files only. For interested parties - this is my lint-staged configuration:
module.exports = {
'*.{js,scss,md,ts,json,yml,yaml,html}': (filenames) =>
filenames.map((filename) => `./gradlew spotlessApply "-PspotlessIdeHook=${filename}"`),
};
Although this approach works, the duration of which is quite underwhelming as gradle needs to start all-over for each file. It would be nice to be able to pass entire batches of file names to spotless (alternatively make lint-staged obsolete).
joharei, ragurney, SettingDust, ttyniwa, scana and 4 more