mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-15 14:46:35 +00:00
Add tsc and eslint to pre-commit (#9131)
This commit is contained in:
parent
d308c5d9b9
commit
83cabcac28
5
lint-staged.config.js
Normal file
5
lint-staged.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
"*.ts": () => "tsc -p tsconfig.json",
|
||||
"*.{js,ts}": "eslint --fix",
|
||||
"!(/translations)*.{js,ts,json,css,md,html}": "prettier --write",
|
||||
};
|
13
package.json
13
package.json
@ -204,7 +204,7 @@
|
||||
"gulp-zopfli-green": "^3.0.1",
|
||||
"html-minifier": "^4.0.0",
|
||||
"husky": "^1.3.1",
|
||||
"lint-staged": "^8.1.5",
|
||||
"lint-staged": "^10.5.4",
|
||||
"lit-analyzer": "^1.2.1",
|
||||
"lodash.template": "^4.5.0",
|
||||
"magic-string": "^0.25.7",
|
||||
@ -250,17 +250,6 @@
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"linters": {
|
||||
"*.{js,ts,json,css,md}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"ignore": [
|
||||
"translations/**"
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"trailingComma": "es5",
|
||||
"arrowParens": "always"
|
||||
|
Loading…
x
Reference in New Issue
Block a user