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:
David Luzar 2020-01-22 15:13:00 +01:00 committed by GitHub
parent bef279417e
commit 4942a452e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 314 additions and 13 deletions

15
.lintstagedrc.js Normal file
View 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"]
};