8 New ESLint Rules - Jest

Maintaining an ESLint config has several benefits, a significant one being seeing new rules as they become available. ESLint shapes the way we use JavaScript, and now TypeScript too. As I prepared for the latest release of my own ESLint config, I became aware of several new and helpful rules for testing with Jest. In this post, I’ll dive into what some of these new rules are and some considerations for why they aren’t added to the recommended options. ...

September 9, 2019 · 5 min · Skyler Lemay

Shaping JavaScript Usage with ESLint

I have used ESLint for a long time, often extending the recommended rules from various plugins. I only read a rule’s documentation if I wasn’t sure why it was being flagged in the linter. Last month I read through and manually set 381 ESLint rules, reading the accompanying docs for each rule. I discovered that ESLint is more than enforcing community guidelines on code quality. It also helps to shape use of the language as a whole and through project specific rule usage. ...

May 23, 2019 · 7 min · Skyler Lemay

How to Manage Snapshots with ESLint

Snapshots are still an assertion, but can become broad ones. Favor specific assertions where workable. Jest Snapshots can be a valuable utility for monitoring code changes for UI components. They can also become a scourge if they become too large. The line between the two isn’t always clear. Snapshots don’t offer a clear mechanism to determining how large they are. This makes it easy to create large snapshots that are hard to diff. ...

March 18, 2019 · 3 min · Skyler Lemay