We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
prefer-const
The js-codemod/no-vars transform should be picking these off, but there are many left behind in places that should use const.
js-codemod/no-vars
const
For example, in product-resource-browser.js, this loop should use a const for the variant variable in its for loop:
product-resource-browser.js
variant
for
for (let variant of product.variants) { variant.disabled = this._variantDisabled(variant, product); variant.alreadyAdded = this._variantSelected(variant); if ((product.alreadyAdded === null || product.alreadyAdded) && !variant.disabled) { product.alreadyAdded = variant.alreadyAdded; } }
The text was updated successfully, but these errors were encountered:
I have noticed this mostly in for of loops, I think there must be some logic off in the transform we use for this specific case.
for of
Sorry, something went wrong.
Fix submitted to js-codemod: cpojer/js-codemod#43
js-codemod
lemonmade
No branches or pull requests
The
js-codemod/no-vars
transform should be picking these off, but there are many left behind in places that should useconst
.For example, in
product-resource-browser.js
, this loop should use aconst
for thevariant
variable in itsfor
loop:The text was updated successfully, but these errors were encountered: