AlessioGr / payload-plugin-lexical

Extends payload CMS with Meta's lexical RichText editor - a much more advanced and customizable richtext editor
MIT License
144 stars 6 forks source link

ESLint #28

Closed 58bits closed 1 year ago

58bits commented 1 year ago

I guess this is more of a suggestion than an issue per se - but, after a weekend of hacking on Lexical, Payload, and some of the plugins you've created here, I think it might help in terms of overall code quality if you followed the Payload ESLint setup - https://github.com/payloadcms/payload - or even the eslint-config-standard-with-typescript module.

Payload even have their own npm package @trbl/eslint-config and so you could just drop their .eslintrc.js into the project.

There were a few other things I noticed that I'd be glad to lend a hand with if you fancied chatting.

AlessioGr commented 1 year ago

I thiink their ESLint setup is subject to change, as they probably want to switch to a prettier setup eventually. Payload is also using a completely different eslint setup for one of their official plugins vs. their main repository.

So, might make sense to either wait or switch to something like the airbnb ESLint config over giving up prettier

58bits commented 1 year ago

We've used the airbnb eslint typescript plugin in the past - but have now switched to eslint-config-standard-with-typescript - which we find works really well along with a few custom rules. I'll share our setup with you.

I ran this project through that configuration and the results were pretty interesting.