Closed wincent closed 2 years ago
Seeing as I just linked to here from https://github.com/liferay/generator-liferay-fragments/commit/1300901a37da8f4175ebd143ed5f277bd65ef427 — it should be noted that this ticket was created before migrating the contents of the eslint-config-liferay repo into this monorepo, and before we started using the named @liferay/
scope on npm.
Bear that in mind when reading the description above; we still want to do this, but it won't be via eslint-plugin-liferay
, but rather @liferay/eslint-plugin
. Other than that, the above all still applies.
Closing and spawned off new ticket to update existing projects, https://github.com/liferay/liferay-frontend-projects/issues/677
This is something that I have been putting off for a while, because renaming packages is a pain, but I think we'll eventually have to do it: move eslint-config-liferay to eslint-plugin-liferay.
As I explained in 5850f26d0f9e4c03872a2:
The trouble with this hack is that:
Overall, things are working for now, but this feels like a liability. It would be much better to be able to freely update ESLint without worrying about whether the hack still works, or having to deal with edge cases stemming from people using the config in different ways.
Tentative plan of action:
npm deprecate
, directing people to use eslint-plugin-liferay instead.I wish we'd known back in 2017 that a plugin would be better than a config, but we didn't and so them's the breaks. For reference, there are currently 1,187 NPM packages with the keyword "eslint-plugin" vs 809 with keyword "eslint-config". Examples of popular packages which are plugins bundling both rules and config include:
(All of which, we already use).