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

View file

@ -24,15 +24,34 @@
"@types/react": "16.9.17",
"@types/react-color": "3.0.1",
"@types/react-dom": "16.9.4",
"eslint-plugin-json-format": "2.0.1",
"husky": "4.0.10",
"lint-staged": "10.0.0",
"node-sass": "4.13.1",
"prettier": "1.19.1",
"rewire": "^4.0.1",
"rewire": "4.0.1",
"typescript": "3.7.5"
},
"eslintConfig": {
"extends": "react-app"
"extends": "react-app",
"plugins": [
"json-format"
],
"settings": {
"json/sort-package-json": false
},
"rules": {
"no-console": [
"warn",
{
"allow": [
"warn",
"error",
"info"
]
}
]
}
},
"homepage": "https://excalidraw.com",
"husky": {
@ -40,15 +59,6 @@
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,css,scss,json,md,ts,tsx,html,yml}": [
"prettier --write",
"git add"
],
"*.{js,ts,tsx}": [
"eslint --max-warnings 0"
]
},
"main": "src/index.js",
"name": "excalidraw",
"scripts": {
@ -56,7 +66,7 @@
"build-node": "./scripts/build-node.js",
"eject": "react-scripts eject",
"fix": "npm run prettier -- --write",
"prettier": "prettier \"**/*.{js,css,scss,json,md,ts,tsx,html,yml}\"",
"prettier": "prettier \"**/*.{js,css,scss,json,md,ts,tsx,html,yml}\" --ignore-path=.eslintignore",
"start": "react-scripts start",
"test": "npm run test:app",
"test:app": "react-scripts test --env=jsdom --passWithNoTests",