Title: Incorrect indentation on new line after return statement · Issue #25582 · microsoft/TypeScript · GitHub
Open Graph Title: Incorrect indentation on new line after return statement · Issue #25582 · microsoft/TypeScript
X Title: Incorrect indentation on new line after return statement · Issue #25582 · microsoft/TypeScript
Description: TypeScript Version: 2.7+ (first commit: d49491b) VS Code does not repro. Try Visual Studio 2017 or run my fourslash test from below Search Terms: smart indent Code function foo() { return; // hit enter here // new line is indented correc...
Open Graph Description: TypeScript Version: 2.7+ (first commit: d49491b) VS Code does not repro. Try Visual Studio 2017 or run my fourslash test from below Search Terms: smart indent Code function foo() { return; // hit e...
X Description: TypeScript Version: 2.7+ (first commit: d49491b) VS Code does not repro. Try Visual Studio 2017 or run my fourslash test from below Search Terms: smart indent Code function foo() { return; // hit e...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/25582
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect indentation on new line after return statement","articleBody":"TypeScript Version: 2.7+ (first commit: d49491b3a71a4b561d9a6ecb7dc397d3beba3193)\r\n\r\nVS Code does not repro. Try Visual Studio 2017 or run my fourslash test from below\r\n\r\n**Search Terms:** smart indent \r\n\r\n**Code**\r\n```ts\r\nfunction foo() {\r\n return; // hit enter here\r\n // new line is indented correctly\r\n\r\n if (true) {\r\n return; // hit enter here\r\n // new line is NOT indented correctly\r\n }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\nLine is indented 8 characters after the `return` statement within the `if` statement\r\n\r\n**Actual behavior:**\r\nLine is only indented 4 characters\r\n\r\n**Test:**\r\n```\r\ngit pull https://github.com/minestarks/TypeScript.git smartindentbug\r\njake test test=smartIndentReturn lint=false\r\n```","author":{"url":"https://github.com/minestarks","@type":"Person","name":"minestarks"},"datePublished":"2018-07-11T16:51:38Z","url":"https://github.com/microsoft/TypeScript/issues/25582"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7a434857-b166-680c-bdf2-755f1231fb3b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC7E:4BB79:29CDF0B:3568660:6B01AF9E |
| html-safe-nonce | 3ac5a3ca23141446e30bc70df8648e6a0ae9af48c5e5dfa388f44c1366deb451 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzdFOjRCQjc5OjI5Q0RGMEI6MzU2ODY2MDo2QjAxQUY5RSIsInZpc2l0b3JfaWQiOiIzOTg5MDMxODAzNzI5MDYzODM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 661b9fd0797f28baae07a2872bc6234b6cc0ebdd6ac56fa6c68929ef2b40f215 |
| hovercard-subject-tag | issue:340324706 |
| 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/25582/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fab03712842cd2b2acca60abb854f4c8d9e3dcb6ab9c8c94e9b826275bdaf57e/microsoft/TypeScript/issues/25582 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fab03712842cd2b2acca60abb854f4c8d9e3dcb6ab9c8c94e9b826275bdaf57e/microsoft/TypeScript/issues/25582 |
| og:image:alt | TypeScript Version: 2.7+ (first commit: d49491b) VS Code does not repro. Try Visual Studio 2017 or run my fourslash test from below Search Terms: smart indent Code function foo() { return; // hit e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | minestarks |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width