Title: Consult `package.json` contents when creating `tsconfig.json` under `tsc --init` to determine better defaults · Issue #51207 · microsoft/TypeScript · GitHub
Open Graph Title: Consult `package.json` contents when creating `tsconfig.json` under `tsc --init` to determine better defaults · Issue #51207 · microsoft/TypeScript
X Title: Consult `package.json` contents when creating `tsconfig.json` under `tsc --init` to determine better defaults · Issue #51207 · microsoft/TypeScript
Description: Bug Report 🔎 Search Terms tsc init module commonjs 🕗 Version & Regression Information 4.9.0-dev.20221017 ⏯ Playground Link n/a 💻 Code package.json { "name": "asdf", "version": "1.0.0", "description": "", "author": "", "license": "ISC", "...
Open Graph Description: Bug Report 🔎 Search Terms tsc init module commonjs 🕗 Version & Regression Information 4.9.0-dev.20221017 ⏯ Playground Link n/a 💻 Code package.json { "name": "asdf", "version": "1.0.0", "description...
X Description: Bug Report 🔎 Search Terms tsc init module commonjs 🕗 Version & Regression Information 4.9.0-dev.20221017 ⏯ Playground Link n/a 💻 Code package.json { "name": "asdf", "ve...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/51207
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consult `package.json` contents when creating `tsconfig.json` under `tsc --init` to determine better defaults","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n Please fill in each section completely. Thank you!\r\n--\u003e\r\n\r\n### 🔎 Search Terms\r\ntsc init module commonjs\r\n\u003c!--\r\n What search terms did you use when trying to find an existing bug report?\r\n List them here so people in the future can find this one more easily.\r\n--\u003e\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n4.9.0-dev.20221017\r\n\r\n### ⏯ Playground Link\r\nn/a\r\n### 💻 Code\r\n#### `package.json`\r\n```json\r\n{\r\n \"name\": \"asdf\",\r\n \"version\": \"1.0.0\",\r\n \"description\": \"\",\r\n \"author\": \"\",\r\n \"license\": \"ISC\",\r\n \"type\": \"module\",\r\n \"devDependencies\": {\r\n \"typescript\": \"^4.9.0-dev.20221017\"\r\n }\r\n}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n```\r\n\u003e npx tsc --init\r\n\r\nCreated a new tsconfig.json with: \r\n TS \r\n target: es2016\r\n module: commonjs\r\n strict: true\r\n esModuleInterop: true\r\n skipLibCheck: true\r\n forceConsistentCasingInFileNames: true\r\n\r\n\r\nYou can learn more at https://aka.ms/tsconfig\r\n```\r\n\r\n### 🙂 Expected behavior\r\nit should check the `package.json` to determine that `module` should be `nodenext` or something\r\n","author":{"url":"https://github.com/DetachHead","@type":"Person","name":"DetachHead"},"datePublished":"2022-10-18T07:30:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/51207/TypeScript/issues/51207"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8c9f7574-185b-aeb5-d755-abb6df2cc171 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C204:29AC78:28F27C3:3AF56F3:6A4D23D9 |
| html-safe-nonce | 54b4dafbad84af443bd175ee11b5dc674e9deae22f526245c7b697217c039cdc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjA0OjI5QUM3ODoyOEYyN0MzOjNBRjU2RjM6NkE0RDIzRDkiLCJ2aXNpdG9yX2lkIjoiNjEwODU5NjQwNzY1MTYwNzUxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fe0cc7c325b060d7c8e82171e45835ee36eeabe1103f9e424bc661690978442b |
| hovercard-subject-tag | issue:1412714296 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/51207/issue_layout |
| twitter:image | https://opengraph.githubassets.com/233bffd3ee33f8f2b77d4789bd1afd283389af5e5c822d5b34f8ee9ee39381ef/microsoft/TypeScript/issues/51207 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/233bffd3ee33f8f2b77d4789bd1afd283389af5e5c822d5b34f8ee9ee39381ef/microsoft/TypeScript/issues/51207 |
| og:image:alt | Bug Report 🔎 Search Terms tsc init module commonjs 🕗 Version & Regression Information 4.9.0-dev.20221017 ⏯ Playground Link n/a 💻 Code package.json { "name": "asdf", "version": "1.0.0", "description... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DetachHead |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93f17a978ee60bc4668e1d7b90e6bd2d622261fd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width