@hi8u/lint-staged
lint-staged
config for awesome projects
Install
$ yarn add -D lint-staged @hi8u/lint-staged
Usage
// lint-staged.config.js
const { buildPrettierCmd, buildEslintCmd } = require('@hi8u/lint-staged');
/**
* @type {import("@hi8u/lint-staged").LintStagedConfig}
*/
module.exports = {
'**/*.{js,jsx,ts,tsx}': (filenames) => {
return [buildEslintCmd({ filenames, cwd: __dirname })];
},
'**/*.{json,md,mdx,css,html,yml,yaml,scss}': (filenames) => {
return [buildPrettierCmd({ filenames })];
},
};