-
Notifications
You must be signed in to change notification settings - Fork 0
[DO NOT MERGE] [FEAT] Pre Commit Hook #4
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
base: master
Are you sure you want to change the base?
Conversation
Пример ошибки можно скрином? |
Мне кажется ты с конфигом lintstagerc перемудрил, я думаю надо просто next lint ./src что-то типа такого |
|
||
module.exports = { | ||
'./src/**/*' : (filenames) => [ | ||
`next lint --fix --file ${filenames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А просто по директории src нельзя?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вся фишка именно в том, чтобы линтились только закомиченные файлы, если в прехуке просто прописать линтинг, все отлинченные файлы надо будет добавлять вторым комитом. Можно скостылить прехук:
yarn eslint --fix --quiet \"./src/**/*\"
yarn prettier --write \"./src/**/*\"
git add .
git commit -m 'chore: linted'
но это будет доп коммит на каждый коммит с неконтроллируемым выбором файлов, мне такое не нравится.
/* пройдет по первому уровню вложенности, /**/* пройдет по всем файлам во всех подпапках
В статьях и туторах у всех все работает, я как обычно об стену долблюсь 😢
Ну я хз чо с виндой делать на линухе все ок работает |
Мб версию попробовать даунгрейднуть ? |
Забей на это, я поресерчу что можно на винде с этим поделять, берись за бизнес фичи, это пока подождет |
Story
Problem
How to Reproduce
Linux Users
Для успешного срабатывания:
Для ошибки: