René's URL Explorer Experiment


Title: [Chore]: enable @typescript-eslint/no-floating-promises · Issue #5459 · coder/code-server · GitHub

Open Graph Title: [Chore]: enable @typescript-eslint/no-floating-promises · Issue #5459 · coder/code-server

X Title: [Chore]: enable @typescript-eslint/no-floating-promises · Issue #5459 · coder/code-server

Description: What is your suggestion? To enable a new ESLint rule: @typescript-eslint/no-floating-promises Why do you want this feature? We believe it would have prevented issues like #5442 and any future issues related to floating promises. Are ther...

Open Graph Description: What is your suggestion? To enable a new ESLint rule: @typescript-eslint/no-floating-promises Why do you want this feature? We believe it would have prevented issues like #5442 and any future issue...

X Description: What is your suggestion? To enable a new ESLint rule: @typescript-eslint/no-floating-promises Why do you want this feature? We believe it would have prevented issues like #5442 and any future issue...

Opengraph URL: https://github.com/coder/code-server/issues/5459

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Chore]: enable  @typescript-eslint/no-floating-promises ","articleBody":"## What is your suggestion?\r\n\r\nTo enable a new ESLint rule: [`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises)\r\n\r\n## Why do you want this feature?\r\n\r\nWe believe it would have prevented issues like https://github.com/coder/code-server/pull/5442 and any future issues related to floating promises.\r\n\r\n## Are there any workarounds to get this functionality today?\r\n\r\nManually checking code myself to see if we have any floating promises.\r\n\r\n## Are you interested in submitting a PR for this?\r\n\r\nYes, but it might take some work. I did some initial investigation. See below:\r\n\r\n\r\n\u003cdetails>\r\n\u003csummary>Expand to see\u003c/summary>\r\n\r\nTo add this rule, we need to:\r\n1. adjust our `.eslintrc.yaml` file\r\n\r\n```diff\r\ndiff --git a/.eslintrc.yaml b/.eslintrc.yaml\r\nindex 1bbbbd09..9388ad15 100644\r\n--- a/.eslintrc.yaml\r\n+++ b/.eslintrc.yaml\r\n@@ -8,10 +8,12 @@ env:\r\n parserOptions:\r\n   ecmaVersion: 2018\r\n   sourceType: module\r\n+  project: './tsconfig.json'\r\n \r\n extends:\r\n   - eslint:recommended\r\n   - plugin:@typescript-eslint/recommended\r\n+  # - plugin:@typescript-eslint/recommended-requiring-type-checking\r\n   - plugin:import/recommended\r\n   - plugin:import/typescript\r\n   - plugin:prettier/recommended\r\n@@ -32,6 +34,7 @@ rules:\r\n   \"@typescript-eslint/explicit-module-boundary-types\": off\r\n   \"@typescript-eslint/no-explicit-any\": off\r\n   \"@typescript-eslint/no-extra-semi\": off\r\n+  \"@typescript-eslint/no-floating-promises\": 2\r\n   eqeqeq: error\r\n   import/order:\r\n     [error, { alphabetize: { order: \"asc\" }, groups: [[\"builtin\", \"external\", \"internal\"], \"parent\", \"sibling\"] }]\r\n@@ -41,3 +44,5 @@ settings:\r\n   import/resolver:\r\n     typescript:\r\n       alwaysTryTypes: true\r\n+\r\n+ignorePatterns: \"/test\"\r\n\\ No newline at end of file\r\n```\r\n2. remove `--max-warnings=0` from `lint.sh` \r\n3. fix all 16 errors \r\n\r\nBecause of an issue in ESLint -- https://github.com/eslint/eslint/issues/15010 -- it's not possible to both ignore files from being linted without  `eslint` counting them as warnings in CLI output. \r\n\r\nBUT that assumes we don't want to lint test files. If we do, we need to add the `\"./test/tsconfig.json\"` to `project`.\r\n\r\nHere are all 32 errors found by the linter (including test files):\r\n\r\n```shell\r\nyarn run v1.22.18\r\n$ ./ci/dev/lint.sh\r\n\r\n/Users/jp/dev/coder/code-server/ci/dev/watch.ts\r\n  0:0  error  Parsing error: \"parserOptions.project\" has been set for @typescript-eslint/parser.\r\nThe file does not match your project config: ci/dev/watch.ts.\r\nThe file must be included in at least one of the projects provided\r\n\r\n/Users/jp/dev/coder/code-server/src/node/heart.ts\r\n  64:7  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/main.ts\r\n  191:7  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/routes/index.ts\r\n   61:7  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  175:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/routes/vscode.ts\r\n  125:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/socket.ts\r\n  25:7   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  50:9   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  60:13  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/update.ts\r\n  45:7  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/src/node/wrapper.ts\r\n  118:7   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  166:9   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  228:7   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  233:7   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  250:11  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  272:5   error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/e2e/extensions/test-extension/extension.ts\r\n  7:9  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  9:9  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/common/emitter.test.ts\r\n  52:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  55:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/helpers.test.ts\r\n  16:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/node/app.test.ts\r\n   54:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n   73:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n   92:7  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n   95:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  107:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  119:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n  137:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/node/cli.test.ts\r\n  740:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/node/socket.test.ts\r\n  40:9  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/node/test-plugin/.eslintrc.js\r\n  0:0  error  Parsing error: \"parserOptions.project\" has been set for @typescript-eslint/parser.\r\nThe file does not match your project config: test/unit/node/test-plugin/.eslintrc.js.\r\nThe file must be included in at least one of the projects provided\r\n\r\n/Users/jp/dev/coder/code-server/test/unit/node/util.test.ts\r\n  154:5  error  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises\r\n\r\n✖ 32 problems (32 errors, 0 warnings)\r\n\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\n\u003c/details>\r\n","author":{"url":"https://github.com/jsjoeio","@type":"Person","name":"jsjoeio"},"datePublished":"2022-08-15T20:14:42Z","url":"https://github.com/coder/code-server/issues/5459"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:64a7d777-eb29-e1a9-c425-1a73e445375c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9150:2E9831:91AA67:C075F3:6B01B3DD
html-safe-nonce2b887582d549c846c7dd1bf82efe8ee18345e7a07a281916839b009dca0588bf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTUwOjJFOTgzMTo5MUFBNjc6QzA3NUYzOjZCMDFCM0REIiwidmlzaXRvcl9pZCI6IjM3OTM4MjI5NjMxNDU0ODczMjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac202aecdc4617ab210ef6241c4a8b8a66e3c91384ff7b49671e4e6a6becd78408
hovercard-subject-tagissue:1339450717
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/code-server/5459/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6868def1e29611d3a4863562f0dfac50d55a74777829639146c44d929dd88ac/coder/code-server/issues/5459
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6868def1e29611d3a4863562f0dfac50d55a74777829639146c44d929dd88ac/coder/code-server/issues/5459
og:image:altWhat is your suggestion? To enable a new ESLint rule: @typescript-eslint/no-floating-promises Why do you want this feature? We believe it would have prevented issues like #5442 and any future issue...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejsjoeio
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/code-server git https://github.com/coder/code-server.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id172953845
octolytics-dimension-repository_nwocoder/code-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172953845
octolytics-dimension-repository_network_root_nwocoder/code-server
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/code-server/issues/5459#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fissues%2F5459
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fissues%2F5459
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcode-server
Reloadhttps://github.com/coder/code-server/issues/5459
Reloadhttps://github.com/coder/code-server/issues/5459
Reloadhttps://github.com/coder/code-server/issues/5459
coderhttps://github.com/coder
code-serverhttps://github.com/coder/code-server
Codehttps://github.com/coder/code-server
Issues147 (147)https://github.com/coder/code-server/issues
Pull requests17 (17)https://github.com/coder/code-server/pulls
Discussionshttps://github.com/coder/code-server/discussions
Actionshttps://github.com/coder/code-server/actions
Projectshttps://github.com/coder/code-server/projects
Security and quality3 (3)https://github.com/coder/code-server/security
Insightshttps://github.com/coder/code-server/insights
https://github.com/coder/code-server
New issuehttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5459
New issuehttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5459
[Chore]: enable @typescript-eslint/no-floating-promises https://github.com/coder/code-server/issues/5459#top
https://github.com/jsjoeio
enhancementSome improvement that isn't a featurehttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Aug 15, 2022https://github.com/coder/code-server/issues/5459#issue-1339450717
@typescript-eslint/no-floating-promiseshttps://typescript-eslint.io/rules/no-floating-promises
#5442https://github.com/coder/code-server/pull/5442
eslint/eslint#15010https://github.com/eslint/eslint/issues/15010
jsjoeiohttps://github.com/jsjoeio
enhancementSome improvement that isn't a featurehttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Aug 15, 2022https://github.com/coder/code-server/issues/5459#event-7191286085
https://github.com/jsjoeio
jsjoeiohttps://github.com/jsjoeio
on Aug 15, 2022https://github.com/coder/code-server/issues/5459#issuecomment-1215789862
@code-asherhttps://github.com/code-asher
jsjoeiohttps://github.com/jsjoeio
on Aug 17, 2022https://github.com/coder/code-server/issues/5459#event-7207944639
code-asherhttps://github.com/code-asher
not plannedhttps://github.com/coder/code-server/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jul 12, 2024https://github.com/coder/code-server/issues/5459#event-13479892560
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/code-server/issues/5459
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/code-server/issues/5459
jsjoeiohttps://github.com/jsjoeio
enhancementSome improvement that isn't a featurehttps://github.com/coder/code-server/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.