mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 13:52:36 +00:00
Modify lint-staged - Run prettier and eslint only on changed files
This commit is contained in:
+10
-1
@@ -1,3 +1,12 @@
|
||||
module.exports = {
|
||||
"*.{js,jsx,ts,tsx}": () => "run-s check:* lint"
|
||||
"*.{js,jsx,ts,tsx}": filenames => {
|
||||
// Escape filenames and join by space
|
||||
const joinedFilenames = filenames.map(str => `"${str}"`).join(" ");
|
||||
return [
|
||||
"run-s check:!(format)",
|
||||
`npm run check:format -- ${joinedFilenames}`,
|
||||
`npm run _lint -- ${joinedFilenames}`
|
||||
];
|
||||
// `run-s check:!(format) "check:format -- ${joinedFilenames}" "_lint -- ${joinedFilenames}"`;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user