Проверяем код ESLint/Prettier перед коммитом

This commit is contained in:
2026-02-12 20:28:25 +04:00
parent 8f2cae3401
commit 8cf1ddbaf5
4 changed files with 313 additions and 3 deletions

8
lint-staged.config.js Normal file
View File

@@ -0,0 +1,8 @@
export default {
'*.js': (filenames) => {
return [`eslint --max-warnings 10 --fix ${filenames.join(' ')}`, `prettier --write ${filenames.join(' ')}`];
},
'*.{json,md,yml}': (filenames) => {
return [`prettier --write ${filenames.join(' ')}`];
},
};