2
0

.lintstagedrc.js 422 B

123456789101112131415
  1. const { CLIEngine } = require("eslint");
  2. // see https://github.com/okonet/lint-staged#how-can-i-ignore-files-from-eslintignore-
  3. // for explanation
  4. const cli = new CLIEngine({});
  5. module.exports = {
  6. "*.{js,ts,tsx}": (files) => {
  7. return (
  8. "eslint --max-warnings=0 --fix " +
  9. files.filter((file) => !cli.isPathIgnored(file)).join(" ")
  10. );
  11. },
  12. "*.{css,scss,json,md,html,yml}": ["prettier --write"],
  13. };