Skip to content

chore: apply more eslint rules #2116

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

Merged
merged 1 commit into from
May 2, 2025
Merged

Conversation

SethFalco
Copy link
Member

@SethFalco SethFalco commented May 2, 2025

Updates our ESLint rules to make the code easier to read and maintain. I've been looking at some of the math heavy functions, and especially with so many instances of comma separated variable initializations rather than one variable per line, it's quite the slog to go through.

  • Prefer declaring/initializing variables one at a time, rather than comma separated.
  • Blocks like if, for, while etc should always use curly braces, even if it's a single line.
  • Move @typedef below import strings.
  • Update prettier to the latest version.
  • Replaces special characters in descriptions with normal double quotes (") or apostrophes (').
  • Imports are sorted in alphabetical order, applied automatic fixes but but not persisted in config.
  • Variables should prefer let or const, applied automatic fixes but not persisted in config.

@SethFalco SethFalco merged commit a8a53db into svg:main May 2, 2025
13 checks passed
@SethFalco SethFalco deleted the chore-eslint branch May 2, 2025 09:00
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.

1 participant