module.exports = { // Type check TypeScript files '**/*.(ts|tsx)': () => 'yarn tsc --noEmit', // Lint and format TypeScript and JS files '**/*.(ts|tsx|js)': filenames => [ `yarn eslint --fix ${filenames.join(' ')}`, `yarn prettier --write ${filenames.join(' ')}`, ], // Format MarkDown and JSON '**/*.(md|json)': filenames => `yarn prettier --write ${filenames.join(' ')}`, }