mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 15:31:04 +02:00
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>
This commit is contained in:
15
.lintstagedrc.js
Normal file
15
.lintstagedrc.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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"]
|
||||
};
|
Reference in New Issue
Block a user