mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00

* Add curly rule in ESLint for consistency * Fix rules * More rules * REturn * Push * no else return * prefer const * destructing
15 lines
395 B
JavaScript
15 lines
395 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 --fix" + files.filter(file => !cli.isPathIgnored(file)).join(" ")
|
|
);
|
|
},
|
|
"*.{css,scss,json,md,html,yml}": ["prettier --write"],
|
|
};
|