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

Merged
merged 32 commits into from
Oct 2, 2024

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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/new-eslint/deploys/66fd8c80944c770008bc438f
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/hi-eslint/deploys/66fd8c80ff999d0008c0f0c9
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/ja-eslint/deploys/66fd8c800434c60008fefc8a
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/zh-hans-eslint/deploys/66fd8c802291080008b44f1a
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/fr-eslint/deploys/66fd8c80bf5d30000800d5a2
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/pt-br-eslint/deploys/66fd8c80aeb826000814a303
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/de-eslint/deploys/66fd8c8075dc4a00080fcdea
😎 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 5e85697
🔍 Latest deploy log https://app.netlify.com/sites/es-eslint/deploys/66fd8c80aec24c0008ea82d5
😎 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
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

Copy link
Member

Choose a reason for hiding this comment

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

I like the second one. 👍


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 15 commits September 19, 2024 11:14
@nzakas
Copy link
Member

nzakas commented Sep 30, 2024

@captbaritone just checking in on this. It looks like there's some feedback that hasn't been addressed. Do you have a timetable for revisiting?

@captbaritone
Copy link
Contributor Author

@nzakas Thanks for the ping, I had a bit of writers block on the new conclusion, but I've reworked it and am now quite happy with it. Curious to hear any further feedback you have on this most recent draft.

nzakas
nzakas previously approved these changes Oct 2, 2024
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.

This is looking really good. I just left a few suggestions for grammar improvements.

I really like the new conclusion, as well.

I'll probably schedule this for some time next week.

@captbaritone
Copy link
Contributor Author

Sounds good, and thanks for all your feedback, it has greatly improved the post.

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.

LGTM. I'll work on getting this scheduled.

@nzakas nzakas merged commit a26d0e4 into eslint:main Oct 2, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

3 participants