-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: tsfmt ignores extends in tsconfig #77
Comments
feat(tsfmt): add `extends` of tsconfig.json support closes #77
That was quick! Arigatou gozaimasu ! 🍻 |
can you release pls? |
wait a moment. I'll ship it in 3 hours. |
just released v4.2.0 and v5.0.0 😉 |
unfortunately it doesn't work. pls reopen tsconfig.json {
"extends": "./tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "typings"
}
} Error: tsfmt --verify
Error: [object Object]
at makeFormatCodeOptions (/Users/hotell/Devel/github/Hotell/typescript-lib-starter/node_modules/typescript-formatter/lib/provider/tsconfigjson.ts:38:15)
at next (/Users/hotell/Devel/github/Hotell/typescript-lib-starter/node_modules/typescript-formatter/lib/index.ts:52:23)
at /Users/hotell/Devel/github/Hotell/typescript-lib-starter/node_modules/typescript-formatter/lib/index.ts:53:64
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:606:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3 |
I'm working on https://github.com/vvakame/typescript-formatter/tree/fix-extends-tsconfig branch. |
sure, no worries, thx! |
just released v5.0.1. |
still doesn't work. Although I managed to make it work with slightly different config. This doesn't work:tsconfig.base.json {
"compilerOptions": {
"moduleResolution": "node",
"module": "commonjs",
"target": "es5",
"lib": [
"es2015",
"dom"
],
"allowSyntheticDefaultImports": true,
"suppressImplicitAnyIndexErrors": true,
"forceConsistentCasingInFileNames": true,
"pretty": true,
"jsx": "react",
"sourceMap": true,
"outDir": "lib"
},
"files": [
"./src/index.ts"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"buildOnSave": false
} tsconfig.json {
"extends": "./tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "typings"
}
} This does:tsconfig.base.json {
"compilerOptions": {
"moduleResolution": "node",
"module": "commonjs",
"target": "es5",
"lib": [
"es2015",
"dom"
],
"allowSyntheticDefaultImports": true,
"suppressImplicitAnyIndexErrors": true,
"forceConsistentCasingInFileNames": true,
"pretty": true,
"jsx": "react",
"sourceMap": true,
"outDir": "lib"
},
"include": [
"./src"
],
"exclude": [
"node_modules"
],
"compileOnSave": false,
"buildOnSave": false
} tsconfig.json {
"extends": "./tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "typings"
}
} SolutionI had to use -> TSFMT v 5.0.1 |
umm.. I tried with your settings. typescript-formatter/lib/utils.ts Lines 41 to 61 in d688317
|
@vvakame I think I ran into the same issue that @Hotell reported. It's true that if a file is listed directly in {
"files": [
"./ts/main.ts"
]
} And import { foo } from './module.ts';
foo();
|
when running
tsfmt --verify
within project it ignoresextends
within tsconfig.json, so user has to specify all file paths manually within terminal which is very inconvenientThe text was updated successfully, but these errors were encountered: