Skip to content

Remove redundant 1 after var names like var1 where no var2 exists #40180

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

Merged
merged 2 commits into from
Jul 20, 2025

Conversation

lionel-rowe
Copy link
Contributor

Description

Fixes #40178.

It's quite a big line diff, but the vast majority of the changes with git diff --word-diff-regex="." are just ... varName[-1-] ....

Motivation

It's confusing as you're looking around for a contrastive var2 variable or something else that would indicate the importance of the number 1, but there often isn't anything.

Additional details

N/A

Related issues and pull requests

Fixes #40178

@lionel-rowe lionel-rowe requested review from a team as code owners July 3, 2025 07:16
@lionel-rowe lionel-rowe requested review from Josh-Cena and wbamberg and removed request for a team July 3, 2025 07:16
@github-actions github-actions bot added Content:WebAPI Web API docs Content:JS JavaScript docs Content:Learn Learning area docs Content:Meta Content in the meta docs size/l [PR only] 501-1000 LoC changed labels Jul 3, 2025
Copy link
Contributor

github-actions bot commented Jul 3, 2025

Preview URLs (163 pages)
Flaws (13)

Note! 150 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply
Title: handler.apply()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/construct
Title: handler.construct()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/defineProperty
Title: handler.defineProperty()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/deleteProperty
Title: handler.deleteProperty()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/get
Title: handler.get()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getOwnPropertyDescriptor
Title: handler.getOwnPropertyDescriptor()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getPrototypeOf
Title: handler.getPrototypeOf()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/has
Title: handler.has()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/isExtensible
Title: handler.isExtensible()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/ownKeys
Title: handler.ownKeys()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/preventExtensions
Title: handler.preventExtensions()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/set
Title: handler.set()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/setPrototypeOf
Title: handler.setPrototypeOf()
Flaw count: 1

  • macros:
    • Macro produces link /en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler which is a redirect

(comment last updated: 2025-07-03 07:58:28)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Josh-Cena
Copy link
Member

Thanks, it will take me a while to get to it (mainly because I need to check if the variables are referenced elsewhere), but I will eventually...

@sideshowbarker sideshowbarker removed the request for review from a team July 4, 2025 05:34
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Looks awesome, thank you so much! I really appreciate your attention to detail and fixing everything en masse. Thanks for all the time you put into this.

@Josh-Cena Josh-Cena merged commit cd22b9f into mdn:main Jul 20, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs Content:Learn Learning area docs Content:Meta Content in the meta docs Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing variable naming like var1 in examples where there's no var2 to contrast with
2 participants