dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.75k stars 746 forks source link

style: `var` -> `let` and `const` codemod #4444

Closed gaiety-deque closed 1 month ago

gaiety-deque commented 1 month ago

adds no-var rule to eslint (this also pairs well with the already enabled prefer-const and no-redeclare)

Who else does this?

Why do this?

Gaiety's explanation: "let works the way most devs think var works. scope leaking and variable hoisting is a messy confusing idea, JS got updated for a reason" also it's 2024, this isn't too controversial anymore

<< Describe the changes >>

Closes:

gaiety-deque commented 1 month ago

Closing this in favor of doing smaller PR's piece by piece over time, but I'll reference the changes here as the ultimate goal.