12 lines
346 B
JavaScript
12 lines
346 B
JavaScript
/* eslint-disable no-undef */
|
|
/* eslint-env node */
|
|
const path = require('path');
|
|
|
|
const buildEslintCommand = (filenames) =>
|
|
`eslint --fix ${filenames.map((f) => path.relative(process.cwd(), f)).join(' ')}`;
|
|
|
|
module.exports = {
|
|
'*.{js,jsx,ts,tsx}': [buildEslintCommand, 'prettier --write'],
|
|
'*.{json,md,css,scss}': ['prettier --write'],
|
|
};
|