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
The one const rule 13.2 says
Use one const or let declaration per variable // bad // (compare to above, and try to spot the mistake) const items = getItems(), goSportsTeam = true, dragonball = 'z'; // good const items = getItems(); const goSportsTeam = true; const dragonball = 'z';
Use one const or let declaration per variable
// bad // (compare to above, and try to spot the mistake) const items = getItems(), goSportsTeam = true, dragonball = 'z'; // good const items = getItems(); const goSportsTeam = true; const dragonball = 'z';
But the destructure rule requires declaring multiple variables per const
// good function getFullName(user) { const { firstName, lastName } = user;
Seems inconsistent?!??
The text was updated successfully, but these errors were encountered:
Fair point; the wording could be better. "Use one const or let declaration per variable or assignment" seems like it would cover destructuring?
const
let
Sorry, something went wrong.
@ljharb - I've raised PR for this - #1927
No branches or pull requests
The one const rule 13.2 says
But the destructure rule requires declaring multiple variables per const
Seems inconsistent?!??
The text was updated successfully, but these errors were encountered: