1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00
excalidraw/.lintstagedrc.js
David Luzar 4942a452e0
Lint tweaks (#502)
* lint json files & add lint ignore list

* lint against plain console logs

* Update .lintstagedrc.js

Co-Authored-By: Lipis <lipiridis@gmail.com>

* format .tsconfig

* don't lint against console.info

* change log to console.info

Co-authored-by: Lipis <lipiridis@gmail.com>
2020-01-22 15:13:00 +01:00

16 lines
427 B
JavaScript

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,json}": files => {
return (
"eslint --max-warnings=0 " +
files.filter(file => !cli.isPathIgnored(file)).join(" ")
);
},
"*.{js,css,scss,json,md,ts,tsx,html,yml}": ["prettier --write"]
};