Skip to content
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

Add ESLint Curly Rule #174

Merged
merged 6 commits into from
Mar 2, 2022
Merged

Add ESLint Curly Rule #174

merged 6 commits into from
Mar 2, 2022

Conversation

lewis-sqa
Copy link
Contributor

@lewis-sqa lewis-sqa commented Mar 2, 2022

This PR Includes

  • Added ESLint curly rule.
  • Applied auto fixes.
  • Fixed ESLint configuration in examples/react
  • Updated ESLint deps.

Notes

  • I've written JavaScript code in the past where I sometimes omitted curlys (not consistently since multi-line blocks aren't supported unlike other languages such as Python), and it became quite difficult to later read code this way (as the ESLint docs also states) and I would often miss the body of the if statements when glancing over methods.
  • In some respects, it's a similar approach to the default setting of allow-parens and arrowParens - while you can omit the parenthesises but it's more consistent, easier to modify and (arguably) more readable to apply them all the time.
  • Ran into a weird issue in the React example where I'm getting key prop errors. It's apparently fixed but no luck after upgrading the package.

@lewis-sqa lewis-sqa merged commit b1e46e2 into dev Mar 2, 2022
@lewis-sqa lewis-sqa deleted the eslint-curly-rule branch March 2, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants