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

Update ExampleHelper.md to use const #7256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsalaidbacklife
Copy link
Contributor

The sails docs use var in most example code. This is an outdated practice as the newer alternatives of let and const offer more granular control over variable scoping in a way that is preferable 95+% of the time. The use of var in the docs gives new users the impression that sails is dated. Updating the docs to use const or occasionally let in the examples will make sails more appealing.

I'm opening this PR as a one-off for a single page in the hopes of getting feedback on whether the sails team agrees that this change is appropriate before I more holistically propose changes to a broader range of sails docs to update them similarly.

The sails docs use `var` in most example code. This is an outdated practice as the newer alternatives of `let` and `const` offer more granular control over variable scoping in a way that is preferable 95+% of the time. The use of `var` in the docs gives new users the impression that sails is dated. Updating the docs to use `const` or occasionally `let` in the examples will make sails more appealing.

I'm opening this PR as a one-off for a single page in the hopes of getting feedback on whether the sails team agrees that this change is appropriate before I more holistically propose changes to a broader range of sails docs to update them similarly.
@sailsbot
Copy link

Thanks for submitting this pull request, @itsalaidbacklife! We'll look at it ASAP.

In the mean time, here are some ways you can help speed things along:

  • discuss this pull request with other contributors and get their feedback. (Reactions and comments can help us make better decisions, anticipate compatibility problems, and prevent bugs.)
  • ask another JavaScript developer to review the files changed in this pull request. (Peer reviews definitely don't guarantee perfection, but they help catch mistakes and enourage collaborative thinking. Code reviews are so useful that some open source projects require a minimum number of reviews before even considering a merge!)
  • if appropriate, ask your business to sponsor your pull request. (Open source is our passion, and our core maintainers volunteer many of their nights and weekends working on Sails. But you only get so many nights and weekends in life, and stuff gets done a lot faster when you can work on it during normal daylight hours.)
  • make sure you've answered the "why?" (Before we can review and merge a pull request, we feel it is important to fully understand the use case: the human reason these changes are important for you, your team, or your organization.)

Please remember: never post in a public forum if you believe you've found a genuine security vulnerability. Instead, disclose it responsibly.

For help with questions about Sails, click here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants