From c4e343ce0b8d858b4cc028bf0f1ff1291007313b Mon Sep 17 00:00:00 2001 From: kj_sh604 Date: Sun, 15 Mar 2026 16:19:35 -0400 Subject: refactor: .lintstagedrc.js --- .lintstagedrc.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .lintstagedrc.js (limited to '.lintstagedrc.js') diff --git a/.lintstagedrc.js b/.lintstagedrc.js new file mode 100644 index 0000000..612d4c3 --- /dev/null +++ b/.lintstagedrc.js @@ -0,0 +1,14 @@ +const { CLIEngine } = require("eslint"); + +// see https://github.com/okonet/lint-staged#how-can-i-ignore-files-from-eslintignore- +// for explanation +const cli = new CLIEngine({}); + +module.exports = { + "*.{js,ts,tsx}": files => { + return ( + "eslint --max-warnings=0 --fix " + files.filter(file => !cli.isPathIgnored(file)).join(" ") + ); + }, + "*.{css,scss,json,md,html,yml}": ["prettier --write"], +}; -- cgit v1.2.3