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

v3 - organize imports with eslint #657

Merged
merged 5 commits into from
Sep 17, 2024
Merged

v3 - organize imports with eslint #657

merged 5 commits into from
Sep 17, 2024

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Sep 17, 2024

Updated eslint configuration with various tools for organizing imports. Also improved typescript checking.

Highlights of the import rules defined in .eslintrc.cjs:

  • no relative imports (no-relative-import-paths/no-relative-import-paths)
    • expect for siblings, i.e. files within the same directory
  • no unused imports (unused-imports/no-unused-imports)
  • imports are ordered alphabetically (ascending) and grouped based on location type (import/order)
    • builtin
    • external
    • internal
    • sibling, parent
    • index
    • unknown
  • members within an import are sorted based on type (sort-imports)

Some rules have not been included yet, to reduce the scope of this PR. These have been mentioned in separate issues: #659 #660

Also added npm run fix to run linting (npm run lint) and formatting (npm run format) in one command.

Checklist

Please ensure that you’ve completed the following checkpoints before submitting your pull request:

  • Documentation: Relevant documentation has been added or updated (if applicable).
  • Testing: Have you tested your changes thoroughly?

Copy link

vercel bot commented Sep 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 10:54am
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 10:54am

Copy link
Contributor

@anemne anemne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me🙏

@mathiazom mathiazom merged commit b17baf5 into v3 Sep 17, 2024
6 checks passed
@mathiazom mathiazom deleted the chore/v3-organize-imports branch September 17, 2024 12:13
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.

3 participants