Проверяем код ESLint/Prettier перед коммитом
This commit is contained in:
8
lint-staged.config.js
Normal file
8
lint-staged.config.js
Normal 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(' ')}`];
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user