lint-staged ignores tsconfig.json when it called through husky hooks (see "Steps to reproduce")
Steps to reproduce Create these files (test.js, tsconfig, package.json):test.ts
export class Test {
static get observedAttributes() {
return ['foo'];
}
}
tsconfig.json
{ "compilerOptions": { "target": "ESNEXT" } }
package.json
{ "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.{js,ts}": [ "tsc --noEmit" ] } }Then on command line write:
// everything works fine (it uses tsconfig.json)!tsc --noEmit
// throw an error because it ignores tsconfig.jsongit commit
// error TS1056: Accessors are only available when targeting ECMAScript 5 and higher
lint-staged
: v10.1.0AhmadrezaHK, bryan-hoang, vitalets, gentlee, murilogok and 16 more
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4