Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: blog: Code review nit to ecosystem improvements #629

Open
wants to merge 28 commits into
base: main
Choose a base branch
from

Conversation

captbaritone
Copy link
Contributor

Prerequisites checklist

What is the purpose of this pull request?

Add a blog post reflecting on how ESLint helped a small nit I noticed in code review grow into a fundamental ecosystem improvement shipping in the newest version of TypeScript.

What changes did you make? (Give an overview)

Added a blog post

Related Issues

I previously submitted a blog post about this rule: https://github.com/eslint/eslint.org/pull/240/files

Is there anything you'd like reviewers to focus on?

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for new-eslint ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/66ec6b58ae418400086ebce8
😎 Deploy Preview https://deploy-preview-629--new-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for hi-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/66ec6b58e68a990008e5e706
😎 Deploy Preview https://deploy-preview-629--hi-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for ja-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/66ec6b58aaf45200089d879c
😎 Deploy Preview https://deploy-preview-629--ja-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for zh-hans-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/zh-hans-eslint/deploys/66ec6b583a159b00088247d5
😎 Deploy Preview https://deploy-preview-629--zh-hans-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for fr-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/66ec6b583fb86f00084fb204
😎 Deploy Preview https://deploy-preview-629--fr-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit ebd4167
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/66ea094bc8871e00088e0fe9
😎 Deploy Preview https://deploy-preview-629--es-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for pt-br-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/66ec6b58e68a990008e5e70a
😎 Deploy Preview https://deploy-preview-629--pt-br-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for de-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/66ec6b58a6425200090d4c13
😎 Deploy Preview https://deploy-preview-629--de-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 17, 2024

Deploy Preview for es-eslint ready!

Name Link
🔨 Latest commit dbf625e
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/66ec6b588dbb430008fa2453
😎 Deploy Preview https://deploy-preview-629--es-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

captbaritone and others added 6 commits September 18, 2024 17:06
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Co-authored-by: Amaresh  S M  <amareshsm13@gmail.com>
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together. I feel like this is a great story that a lot of folks will enjoy. I left some suggestions for cleaning up grammar and formatting.

I also noted that I think it would be helpful to briefly explain what the rule does and the type of errors it picks up so folks don't have to click a link to get that context.

And I also left a note on the conclusion, which I think can be expanded a bit to review more of the specifics of this story.

---
layout: post
title: "Code review nit to ecosystem improvements"
teaser: "Reflecting on the power of lint rules"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little more oomph:

Suggested change
teaser: "Reflecting on the power of lint rules"
teaser: "How implementing my first ESLint rule led to changes in how people write JavaScript"

Copy link
Contributor Author

@captbaritone captbaritone Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not my first ESLint rule, but my first core ESLint rule. What do you think about:

How implementing my first core ESLint rule led to changes in how people write JavaScript

Or

How implementing an ESLint rule led to changes in how people write JavaScript


The two events are connected, because that moment in code review four years ago led me to write [a lint rule](https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/) which was part of the inspiration for the TypeScript features.

Given the protracted timeline and the many intermediate steps I thought it would be interesting to reflect on what led to this observation in code review snowballing into what I feel is a significant impact to a large number of developers, and why I think the snowball could continue to grow.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a run-on sentence. I've taken a stab at breaking it up while trying to keep the original meaning.

Suggested change
Given the protracted timeline and the many intermediate steps I thought it would be interesting to reflect on what led to this observation in code review snowballing into what I feel is a significant impact to a large number of developers, and why I think the snowball could continue to grow.
Given the protracted timeline and the many intermediate steps, I thought it would be interesting to reflect on how we got here. How did this observation in one code review snowball into a significant positive impact to developers? And why does this snowball continue to grow?

Four years ago, while doing a code review at work, I was surprised that [Flow](https://flow.org/) had not warned about a null check that had become unnecessary. This month [TypeScript 5.6](https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/#disallowed-nullish-and-truthy-checks1) released with validation rules that disallows nullish and truthy checks which uncovered nearly 100 existing bugs in the top 800 TypeScript repos on GitHub.

The two events are connected, because that moment in code review four years ago led me to write [a lint rule](https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/) which was part of the inspiration for the TypeScript features.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before going into the timeline, I think it would be helpful to introduce the rule and show an example of an error it detects. So maybe a "What does the no-constant-binary-expression rule do?" section.


## Conclusion

Solving problems fundamentally requires the combined insights of many people, the persistence of stubborn individuals, active communication, a community that learns from each other, and often a lot of patience. But if you can make it happen, fundamental solutions scale really well. They apply broadly, can be adapted into other tools and domains, and improve the state of the world not just for developers but to the users those developers serve.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see this conclusion expanded to talk a bit about the specifics of this story: how a group of developers discovered something that would be generally useful inside a company (for-profit), then used an open source (not-for-profit) project to spread that knowledge independently, ultimately reaching another company (for-profit), that then spread into another open source project (not-for-profit?), to reach an even larger audience.

captbaritone and others added 5 commits September 19, 2024 11:11
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
captbaritone and others added 15 commits September 19, 2024 11:14
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Implementing
Development

Successfully merging this pull request may close these issues.

3 participants