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

Fix some const -> let, and some let -> const #18734

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

rubiesonthesky
Copy link
Contributor

Summary

There were some vars that were changed to "const" when they should have been "let". Fixed few "lets" with "const" where applicable. (Used @lionralfs 's eslint setup to spot them)

Motivation

Supporting details

Related issues

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@rubiesonthesky rubiesonthesky requested a review from a team as a code owner July 24, 2022 13:13
@rubiesonthesky rubiesonthesky requested review from jpmedley and removed request for a team July 24, 2022 13:13
@github-actions github-actions bot added the Content:WebAPI Web API docs label Jul 24, 2022
@lionralfs
Copy link
Contributor

Glad that my setup could help someone else :)

I'm assuming you're using prefer-const to spot these? I'm seeing a total of 1916 prefer-const problems in Web/API.

@rubiesonthesky
Copy link
Contributor Author

Glad that my setup could help someone else :)

I'm assuming you're using prefer-const to spot these? I'm seeing a total of 1916 prefer-const problems in Web/API.

Well, actually I turned that one off since I there is some other task about it and they should all be fixed manually. I used recommended settings but prefer-constand no-var off. :)

  extends: [
    "eslint:recommended"
  ],

@lionralfs
Copy link
Contributor

Oh I see. It took me a few minutes to realize why these weren't showing up for me, turns out these are errors in files that I've added to my .eslintignore due to non-trivial syntax errors.

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

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

👍

@teoli2003 teoli2003 merged commit babc779 into mdn:main Jul 26, 2022
@rubiesonthesky rubiesonthesky deleted the let-const-fixes branch July 26, 2022 08:47
@OnkarRuikar
Copy link
Contributor

Now all the unwanted vars in the mdn/content have been removed (#16614, #16662).
It would be great if we run this again one more time.

@teoli2003
Copy link
Contributor

(We still have one PR incoming for the Learn/ section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants