clearlydefined / crawler

A service that crawls projects and packages for information relevant to ClearlyDefined
MIT License
43 stars 30 forks source link

Improve formatting and linting setup #538

Closed lumaxis closed 2 weeks ago

lumaxis commented 4 months ago

I stumbled over the confusingly leftover .prettierrc and took a quick look at the ESLint setup. It's now updated to the latest version and the config updated to allow ECMA version syntax and features that should closely match Node 18.

qtomlinson commented 3 months ago

Thanks for updating eslint! With eslint deprecate formatting rules, it maybe worthwhile to keep a formatter (e.g. prettier or other) in place for consistent formatting in the code base. Any thoughts?

lumaxis commented 3 months ago

@qtomlinson @elrayle I've taken on the suggestion to keep Prettier and improved the project setup so it is properly integrated now and e.g. runs automatically in CI and has good editor integration with VS Code.

The PR now also includes a commit that fixes all previous issues that Prettier fixes, so it might be easier to review this commit by commit.

Additionally, I'd suggest to only merge this after #532, so that that doesn't have to resolve a bunch of formatting issues.

Let me know what you think! If we like this setup, I'd be happy to port it to the service and website repos eventually, too.

qtomlinson commented 3 months ago

This will definitely help to ensure consistency in the code base. Thanks for putting this together!

lumaxis commented 3 months ago

As mentioned above, I'll hold off merging this until https://github.com/clearlydefined/crawler/pull/532 is in to avoid any conflict issues 🙏🏼