diff options
| author | kj_sh604 | 2026-03-15 16:19:35 -0400 |
|---|---|---|
| committer | kj_sh604 | 2026-03-15 16:19:35 -0400 |
| commit | c4e343ce0b8d858b4cc028bf0f1ff1291007313b (patch) | |
| tree | d88d798faa14d28ed0ad4a801229eb8f3a3eabe9 /.lintstagedrc.js | |
| parent | a66698159057ebf9c4ad93dad90418d21c63b591 (diff) | |
refactor: .lintstagedrc.js
Diffstat (limited to '.lintstagedrc.js')
| -rw-r--r-- | .lintstagedrc.js | 14 |
1 files changed, 14 insertions, 0 deletions
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"], +}; |
