BotBuilder-Samples
BotBuilder-Samples copied to clipboard
Minor indentation issue - javascript_nodejs/03.welcome-users/bots/welcomeBot.js
Sample information
- Sample type: [Incorrect indentation]
- Sample language: [nodejs]
- Sample name: <03.welcome-users>
Describe the bug
We are citing from this sample in this article.
The code snippet (javascript_nodejs/03.welcome-users/bots/welcomebot.js?range=65-88) seems not indent correctly.
Expected behavior
Format the indentation.
Screenshots

Additional context
If the lines of this snippet will be changed, please let us know.
[bug]
Hmm, took a look at the .onMembersAdded() method that you have in question, and its indentation looks fine to me.
Perhaps you're referencing the indentation going on in LN 76 - 79, the 2nd message sent?
- It's sending a longer block of text in its message, hence the string concatenation :heavy_check_mark:
- Best done this way, instead of 1 long string, to not have 1 line that's excessively long with extreme horizontal scrolling w/o wrap
- For example, to compare, in our Python SDK's linting rules, it specifies that 1 line can have a max of 120 characters (max-line-length=120)
- LNs 77 - 79 are also properly indented in this string concatenation, to show that it's a continuation of LN 76
- As for the indentation sizes themselves, if you compare the eslint rules set in the botbuilder-js repo, it specifies that indentation should be 4 spaces :heavy_check_mark:
.onMembersAdded()'s indentation all follow 4-space indentation rule
Resolving issue as indentation looks good in sample
Thank you! @Zerryth