Replies: 6 comments 5 replies
-
#6246 made me realise that if we fix it, users do have a workaround for distributing plugins, albeit a contrived one. If users distribute plugins inside "extends packages", the consumer of the package cannot really determine which files the plugins should operate on anymore. That might be acceptable for some use cases, especially within organisations, but I wouldn't recommend it as a means for general distribution. |
Beta Was this translation helpful? Give feedback.
-
I strongly agree with keeping custom rules internal and avoiding broad plugin distribution. ESLint’s history shows that plugin sprawl leads to fragmentation, config conflicts, and maintenance headaches. We should be cautious of any advocacy for pushing for plugins at all costs—often, this comes from a place of not having to have dealt with the real complexity this creates. Biome’s simplicity and cohesion are worth protecting; teams should keep their own rules private and not repeat past mistakes. |
Beta Was this translation helpful? Give feedback.
-
What’s difficult, I think, is that there’s definitely an advantage to having software-specific linting rules—like for Storybook, Next, Turborepo, or React Testing Library, which helps you lint their own custom software. We just don’t want the custom distributions people would inevitably try to make. That's where all the complexity comes from. Maybe there’s a way to allow the former, but disallow the latter? |
Beta Was this translation helpful? Give feedback.
-
Indeed it would be more interesting to have things builtin than just look how eslint does and try to plugin-ize the whole world with 2400 extra packages. That beeing said, as the existence of plugins says, there allways will be niche use cases, or internal policies that will not be covered by those. Maybe a good place to start is just having a place (discussion, repo, .. you name it) where users can share their patterns. |
Beta Was this translation helpful? Give feedback.
-
We have a design-system repo with UI components, and we have some rules for the usage of those components, for now, we can use extends as a workaround, so the downstream projects will receive the plugins, but doesn't feel scalable. The plugins belong to the design system, the user is the downstream project, but the design-system shouldn't have any knowledge of the other biome settings the project uses. It also don't make sense to make our default config extends the ds settings, because not all projects use the design system, it's kinda messy right now to reuse enough, but not too much, it's a really thin line. If the design-system could provide it as an extra export on the components package, and just reference it as the package name, that would be perfect for our use case. |
Beta Was this translation helpful? Give feedback.
-
I think, inability to distribute linting rules via npm will lead to distribution of just plugin files. With message like "As long as Biome doesn't support npm plugins, copy-paste those files in your codebase and include them in your biome.json file". This may lead to even bigger "fragmentation, config conflicts, and maintenance headaches". Earlier was already mentioned that software-specific linting rules exists — like for Storybook, Next, Turborepo, or React Testing Library. But those are all well known and quite popular libraries. There are less known libraries, which provides their linting rules, for example Effector — I bet maybe just few of Biome maintaners even knows about this state manager. Are you going to embrace all possible libraries' custom linting rules? Will every change in rules for some library, I don't even know and don't use, be a bump new Biome version (because all rules a baked-in)? Who will decide what library's rules are worth including into Biome binary? Will you establish some "barrier measures" for libraries, let's say, stars count? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Since v2, Biome now supports plugins via GritQL, however users can't distribute/share these plugins at the moment.
The initial idea behind this plugin system was to provide users the ability to create custom rules for their own projects. These rules would make sense only within an organisation or project, and shouldn't be shared or distributed to people outside the organisation or project.
If users need to share a plugin inside an org, nowadays, git submodules are a valid alternative. However, what if a user wants to use
npm
to distribute their plugins? Is it a valid case for Biome? What about rules inside monorepos?Before jumping into discussions and saying "yes, plugins everywhere", I advise you forget for a moment the ESLint plugin model and take a step back.
One of the reasons users love Biome is that, unlike the ESLint plugin model, they don't need to install plugins to get their project up and running. What does this mean? Here are a few wins:
IMHO, language isn't a factor. While JavaScript (for future plugins) might be easier to learn and would get us easier contributions, I think language is just a medium, and eventually developers may/need to learn different languages.
Biome has recently started shipping rules that are framework-specific. While there's the argument that rules that belong a specific library/framework should belong to a plugin, we believe that native rules are faster, and offer a better DX overall.
Beta Was this translation helpful? Give feedback.
All reactions