New ESLint rules + Browserslist update + preact/preact-cli update

Hi @contributors Gladys :slight_smile:

A quick message to let you know I did a bit of spring cleaning on the Gladys frontend ESLint configuration.

In the end, we’ve already been working on v4 for more than 2 years (time flies!), and this config hadn’t changed much:

  • Meanwhile, Preact released an official ESLint config that’s really good: GitHub - preactjs/eslint-config-preact: Unopinionated baseline ESLint config for Preact and Preact CLI codebases.
  • The Synacor config we were using was no longer maintained and was missing a lot of things
  • The famous browserslist that gives ESLint the list of browsers we support wasn’t up to date at all, and prevented us from using some features that are actually available in all modern browsers
  • Preact and preact-cli were updated recently — no major new features, but their config evolved: they removed polyfills that became unnecessary, fixed quite a few small bugs, and also updated their browserslist to stop building for outdated browsers!

Anyway, these are small things but ones you need to do from time to time.

I updated the configuration in this PR:

Feel free to do a quick rebase of your PR to see if there are changes to make on your side :slight_smile:

If you have questions, this thread is the place for them!

4 Likes

Little spring cleaning with more than 16,000 lines modified!!
I wouldn’t want to be at your place when you do the cleaning, it must be wild!

2 Likes

It’s just the package-lock.json that changed a lot, it’s a generated file :wink: The PR is relatively small!