-
Notifications
You must be signed in to change notification settings - Fork 848
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
Modern JS: don't use var
in css-examples
#163
Comments
@teoli2003 Sir If it possible to allow me to fix this issue ? |
Just go ahead; it is yours. Don't create too big PRs, they take longer to review. |
@teoli2003 Sir Thanks for pointing this out! I completely agree with eliminating the use of 'var'. It's considered a best practice to use 'const' and 'let' for better scope management. I'll work on addressing this across the repository, replacing 'var' with the appropriate declarations. Your input is highly appreciated! |
@teoli2003 Sir, Replace extensive var usage with const/let, aligning with the best So, should I replace 'var' with 'const/let'? |
Yes. |
@teoli2003 Sir, Could you confirm that In every JS file, I will replace the var with const/let? |
With the relevant one, yes. If you are not sure, start with one file. |
@teoli2003 Sir, Issue #163 is resolved now could you please have a look at it if any issue is raised then let me know |
You need to open a pull request. |
@teoli2003 Sir I opened a pull request could you review it if any further issue is raised then let me know |
@teoli2003 Sir, could you respond to my PR? If any further issues are raised then let me know |
@teoli2003 Responded here: #171 (comment) - essentially you can't just search and replace across the examples to fix this. Because each case needs a separate check and review, it would be better if this was split across a number of PRs |
@hamishwillee Sir I appreciate the clarification. I agree that a more thorough approach is needed. I'll work on breaking down the changes into separate PRs for a more comprehensive review. Thanks for guiding me through this process. |
|
@teoli2003 Sir, if you agree, can I make changes to each file individually and then create pull requests? You mentioned that I should start with one file, it will be reviewed, and the pull request will be merged. |
Quite a few examples in this repo extensively use
var
.This is a bad practice; we have eliminated them from mdn/content (and other repos). We should do the same here: most will be simply replaced by
const
andlet
, although there may be a few more complex cases (wherevar
is used inside a scope for a variable at a higher scope)The text was updated successfully, but these errors were encountered: