Skip to main content

2 posts tagged with "eslint"

View All Tags

Astro support landed

· 2 min read
Andrea Pontrandolfo
Sheriff author, Tech Lead @ Velasca
Sheriff BlogPost PosterSheriff BlogPost Poster

Sheriff release v16

Sheriff continues his quest to conquer the JS ecosystem.

Sheriff extends support for Astro

This release introduces support for Astro.js, thanks to ota-meshi 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.

This integration presented significant challenges, as the pertinent ESLint plugins are still in experimental status 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 provide Astro and React relevant rules inside them. This 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 . The documentation is now easier than ever to navigate.

The "Ask AI" feature, instead, didn't make it in this release. There aren't yet solid solutions in this space, for now.

Sheriff integrates Fsecond

Finally, as the last treat, my newest eslint-plugin, fsecond was integrated in Sheriff.

Fsecond adds 2 new rules:

  • fsecond/prefer-destructured-optionals: enforce placing optional parameters to the end of the function signature as destructured objects
  • fsecond/valid-event-listener: enforce using a useEventListener utility function instead of addEventListener methods, or, optionally, you can disable that behaviour and the rule will just warn against incorrect usage of addEventListener methods

What's Next

The commitment to improving Sheriff remains strong. Here's a glimpse of what's 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: Support for additional libraries is under consideration, with potential candidates for integration including GraphQL, MDX, and Vue.

Conclusion

As always, if you feel like contributing, feel free to propose suggestions or pull-requests. And if you just want to show appreciation, leave a star on Github.

Sheriff is actively dedicated to becoming even more adaptable and feature-rich. Stay tuned for further updates and enhancements!

A new home for Sheriff

· 3 min read
Andrea Pontrandolfo
Sheriff author, Tech Lead @ Velasca
Sheriff BlogPost PosterSheriff BlogPost Poster

Sheriff release v14

Sheriff, the ESLint sharable config, has exciting news to share!
With a complete rebranding, a restructured codebase, and exciting plans ahead, Sheriff is set to become an even more essential tool for ensuring code quality and consistency in projects.
Let's walkthrough the key changes of this release.

Restructured Codebase in a monorepo

The codebase has been restructured into a monorepo setup with Turborepo + pnpm workspaces, as it allows for the management of multiple related packages under a single repository, streamlining the development process and enabling better coordination between different parts of the project.

As a side-effect, the project now relies on changesets to manage semantic versioning, in place of semantic-release.

Complete Rebranding

New Docs

The documentation has been fully revamped, moving on from Gitbook to Docusaurus, a modern documentation framework.
Whether a newcomer or a seasoned user, the documentation is more accessible and easier to navigate, with a sidebar that allows for quick access to the different sections.
Also, a special Rules page was carefully crafted to let users explore in detail all the rules that Sheriff enables.

Visit the new docs at this link.

The beginning of a fresh era for Sheriff is marked by a new logo, that features the iconic ESLint logo and a shield.

Sheriff Logo

New Blog

A brand-new blog is now available, where I'll keep sharing updates on the projects as it grows along.

What's Next

The focus remains on continuously improving the tool, making it more adaptable, and responding to the evolving needs of the development community.
Looking ahead, several exciting developments are in store:

  • Astro Support: In the continuous effort to integrate more eslint-plugins into Sheriff, the next in line is eslint-plugin-astro.
  • Searchbar: full-text search, powered by Algolia in the new docs.
  • Ask AI: along with the new searchbar will come an "Ask AI bot" feature. Details on this one are still being worked on.

Conclusion

With this much-needed facelift, Sheriff is ready to keep growing. With a new documentation hub powered by Docusaurus, logo, and blog in place, Sheriff is set to provide an even more exceptional ESLint sharable config experience.
If you want to help feel free to propose new features, both for the config and the docs, or report any bug you might come across.
Stay tuned for updates and insights on the new blog!