mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04: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:
parent
bef279417e
commit
4942a452e0
5 changed files with 314 additions and 13 deletions
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"]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue