You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
412 B
14 lines
412 B
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"], |
|
};
|
|
|