Bytes is my collection of short-form posts, tips, and things I learn as I build software.
Loading...
Loading...
ESLint Unescaped Quotes Plugin
I build a custom ESLint plugin for my personal website to prevent using
unescaped single or double quotes in JSX and instead use “smart quotes”
which are handled properly and also display consistently with the rest of
my website. The plugin is surprisingly simple, and hopefully helps relive
your fears about writing your own simple plugins like this one!
Explaining all the details of the plugin would take a bit of time, so I’m
just going to post the source code for the plugin for you to explore. It’s
mostly self explanatory, so you should be able to understand how it works
pretty easily.