Integrate auto-fixing of ESLint errors to before-commit hook

This commit is contained in:
Rene Saarsoo 2020-09-21 15:46:22 +03:00
parent 4585884c0c
commit f0fcdb0949
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,8 @@
},
"lint-staged": {
"src/**/*.ts": [
"prettier --write --"
"prettier --write --",
"eslint --fix"
]
},
"husky": {

View File

@ -16,7 +16,7 @@ const rangeTss = (duration: number, from: number, to: number): number => {
let score = 0;
const step = 1;
for (let i = 0; i < duration; i += step) {
let intensity = from + (to - from) * (i / duration);
const intensity = from + (to - from) * (i / duration);
score += steadyTss(step, intensity);
}
return score;