Skip to content
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

style: fix minor formatting problems, add void to bootstrap function #1256

Merged
merged 2 commits into from
Dec 27, 2022

Conversation

devule
Copy link
Contributor

@devule devule commented Dec 9, 2022

  • remove redundant spaces in .eslintrc.js, jsconfig.json, add lf at the end of .eslintrc.js
  • add "void" to a bootstrap function call as WebStorm complains to it being async function and ignoring the returned promise

PR Checklist

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

WebStorm complains about calling asynchronous bootstrap function (main.ts) and ignoring the promise returned from it.

What is the new behavior?

void operator makes the expression return undefined so we explicitly ignore the top-level promise from bootstrap.

Does this PR introduce a breaking change?

  • Yes
  • No

removed redundant spaces in .eslintrc.js, jsconfig.json
added "void" to a bootstrap function call as WebStorm complains to it being async function and ignoring the returned promise
@eternityduck
Copy link

Nice

@@ -5,4 +5,4 @@ async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();
void bootstrap();
Copy link
Member

@micalevisk micalevisk Dec 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using void like this isn't common for user-facing nodejs project. Instead, I guess we should ignore lintting errors on application/files/**/*.{js,ts} files

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think we should use void here either

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, removed
left only formatting issues fixes

@kamilmysliwiec kamilmysliwiec merged commit 341dbe4 into nestjs:master Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants