mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-11-10 11:35:52 +01:00
b7a6ceba68
* make eslint styleguide into warnings & drop no-else-return * reintroduce max-warnings=0 * remove unnecessary eslint line disable * reintroduce no-else-return rule
15 lines
413 B
JavaScript
15 lines
413 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}": files => {
|
|
return (
|
|
"eslint --max-warnings=0 --fix " + files.filter(file => !cli.isPathIgnored(file)).join(" ")
|
|
);
|
|
},
|
|
"*.{css,scss,json,md,html,yml}": ["prettier --write"],
|
|
};
|