-
-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list-staged taking more than 1/4 of day to just check few files in windows #1297
Comments
Hey, looks like you have eg. can you try removing the |
removing |
There's a dot in the other command as well: |
You can change Configuration 2 to: const lintCommand = (filenames) =>
`next lint --cache --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}`
module.exports = {
'src/**/*.{ts,tsx,css}': ['prettier --write'],
'src/**/*.{ts,tsx}': [lintCommand, () => 'yarn ts'],
} Since prettier and eslint are both making changes to typescript files at the same time, there can be race conditions. A better config may be: const lintCommand = (filenames) =>
`next lint --cache --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}`
module.exports = {
'src/**/*.{ts,tsx}': ['prettier --write', lintCommand, () => 'yarn ts'],
'src/**/*.{css}': ['prettier --write'],
} |
Description
I have configured lint-staged.config.js
Configuration 1
Configuration 2
expand to view package.json contents
Notes
Debug Logs
expand to view
Environment
lint-staged
:"^13.0.3"The text was updated successfully, but these errors were encountered: