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 linting rule to sort imports #3220

Merged
merged 7 commits into from
Feb 5, 2025
Merged

Add linting rule to sort imports #3220

merged 7 commits into from
Feb 5, 2025

Conversation

matthieusieben
Copy link
Contributor

@matthieusieben matthieusieben commented Dec 10, 2024

This change allow imports to be cleaned and sorted automatically on file save. It also adds an engine property to NodeJS packages, ensuring proper compatibility for users of our packages.

  • Adds eslint-plugin-import recommended rules to eslint config
  • Adds import/order rule to force consistent ordering
  • Adds eslint-plugin-n to make sure the features we use are consistent with the node version we support (>=18.7.0)
  • Adds engines: { node: ">=18.7.0" } to all packages meant for NodeJS

Note

The supported NodeJS version is currently stated to be 18.0.0 but our code relies on features only available since 18.7.0. For this reason, the engines fields was updated to require NodeJS 18.7.0.

Note

This PR adds an engine field to all NodeJS packages to ensure that users of the @atproto packages can be notified by their package manager if their version of NodeJS might cause compatibility issues.

@matthieusieben matthieusieben force-pushed the msi/eslint-import branch 2 times, most recently from 643fc06 to 2944f2e Compare January 27, 2025 02:17
@matthieusieben matthieusieben force-pushed the msi/eslint-import branch 2 times, most recently from 04b6d5b to bc2783d Compare February 5, 2025 08:53
@matthieusieben matthieusieben merged commit 61dc0d6 into main Feb 5, 2025
10 checks passed
@matthieusieben matthieusieben deleted the msi/eslint-import branch February 5, 2025 14:07
@github-actions github-actions bot mentioned this pull request Feb 5, 2025
matthieusieben added a commit that referenced this pull request Feb 5, 2025
* Add linting rule to sort imports

* remove spacing between import groups

* changeset

* changeset

* prettier config fine tuning

* forbid use of deprecated imports

* tidy
matthieusieben added a commit that referenced this pull request Feb 5, 2025
* Add linting rule to sort imports

* remove spacing between import groups

* changeset

* changeset

* prettier config fine tuning

* forbid use of deprecated imports

* tidy
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