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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

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.

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