Astro support landed


Sheriff release v16
Sheriff continues its quest to conquer the JS ecosystem!
Sheriff extends support for Astro
This release introduces support for Astro projects, thanks to Yosuke Ota’s libraries eslint-plugin-astro and astro-eslint-parser.
The integration is provided out-of-the-box, meaning nothing has to be configured on the user side. Sheriff will automatically detect Astro projects and run the appropriate rules. All you have to do is upgrade Sheriff to this version.
As of Sheriff v19, Astro support has been moved behind an option.
This integration presented significant challenges, as the pertinent ESLint plugins are still experimental and also because this integration provides JSX-relevant ESLint rules inside .astro
files, meaning that we are now parsing .astro
files (in a TypeScript-aware way) and thus we must provide Astro and React relevant rules inside them, which has not been trivial.
Sheriff meets Algolia
The Sheriff documentation website has now a full-text search powered by Algolia Docsearch (generously provided for free by the open-source projects sponsorship by Algolia), rendering the documentation easier than ever to navigate.
The “Ask AI” feature didn’t make it in this release. There aren’t yet solid solutions in this space.
Sheriff integrates eslint-plugin-fsecond
Finally, as the last treat, I’ve integrated my newest ESLint plugin, fsecond
, as the successor to my old eslint-plugin-f
.
fsecond
adds 2 new rules:
fsecond/prefer-destructured-optionals
: enforces placing optional parameters to the end of the function signature as destructured objects.fsecond/valid-event-listener
: warns against incorrect usage ofaddEventListener
methods, or, optionally, enforce using auseEventListener
hook in React projects.
What’s Next
The commitment to improving Sheriff remains strong. Here is a glimpse of what is on the horizon:
- Performance Improvements: Potential performance enhancements will be analyzed to ensure that Sheriff runs even smoother, even on lower-end devices.
- Website Codebase Update: Plans are in place to update the website to Docusaurus 3.0, modernizing the docs website codebase.
- Expanded Library Support: Adding support for more integrations is under consideration, with potential candidates for inclusion including GraphQL, MDX, and Vue.
Conclusion
As always, if you feel like contributing, feel free to propose suggestions or pull-requests. If you just want to show appreciation, leave a star on GitHub!
We are dedicated to ensuring Sheriff becomes even more adaptable and feature-rich. Stay tuned for further updates and enhancements!