Skip to content

Docs: rewrite examples with var using const and let #19240

@rakleed

Description

@rakleed

Docs page(s)

https://github.com/search?q=repo%3Aeslint%2Feslint+path%3A%2F%5Edocs%5C%2Fsrc%5C%2Frules%5C%2F%2F+NOT+path%3A**%2F*var*+%22var+%22+&type=code

What documentation issue do you want to solve?

Many examples use var, which is considered bad practice as it often leads to errors. const and let have had good support in all browsers for a long time.

What do you think is the correct solution?

Rewrite examples that use var using const and let.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusiondocumentationRelates to ESLint's documentationgood first issueGood for people who haven't worked on ESLint beforehelp wantedThe team would welcome a contribution from the community for this issue

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions