Skip to content

Commit

Permalink
Update src/content/drafts/code-review-nit-to-ecosystem-improvements.md
Browse files Browse the repository at this point in the history
Co-authored-by: Nicholas C. Zakas <[email protected]>
  • Loading branch information
captbaritone and nzakas authored Sep 19, 2024
1 parent 595908f commit cb0089e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To answer these questions, it helps to review the timeline of events.
* **May 2020:** I posted to an internal group asking the Flow team about it. The answer was that Flow, like TypeScript, is not sound. For example `arr[x]` is typed as non-nullable but might actually be undefined at runtime. Flow had implemented these checks in the past, but they caused major issues by telling people their null checks were safe to remove when they were not, so they removed the checks. [Brad Zacher](https://zacher.com.au/) happened to see the post and chimed in with an observation that a syntactic approach, rather than a type based one, could be safe even if it was less powerful.
* **August 2020:** I implemented the syntactic validation approach as an internal ESLint rule and realized it generalized beyond null checks to all constant comparisons. I ran it in Meta’s mono-repo and found it identified several hundred existing bugs.
* **October 2020:** Brad Zacher suggested I propose it as a new core rule in ESLint. [I did](https://github.com/eslint/eslint/issues/13752), and they [liked the idea](https://github.com/eslint/eslint/issues/13752#issuecomment-729125654).
* Nov. 2021-Apr. 2022: [Rewrote it for open source](https://github.com/eslint/eslint/pull/15296), which took a surprising amount of effort due to different positions on things like JSX and style.
* **November 2021 - April 2022:** I [rewrote the rule for open source](https://github.com/eslint/eslint/pull/15296), which took a surprising amount of effort due to different positions on things like JSX and style.
* July 2022: Decided I wanted to write a blog post about it. The ESLint team was redoing their site at the time and looking for more blog content, so they asked if I wanted to write the [post on the official blog](https://eslint.org/blog/2022/07/interesting-bugs-caught-by-no-constant-binary-expression/).
* Nov. 2023: The blog post made the [front page of Hacker News](https://news.ycombinator.com/item?id=38196644). The post was likely shared by someone who read a [Tweet](https://twitter.com/captbaritone/status/1722290945633443973) I posted sharing that it was going to be enabled by default in ESLint 9.0.0
* April 2024: Rule finally ships as enabled by default in [ESLint 9.0.0](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/). It had to wait for a new major version since adding default rule is a breaking change.
Expand Down

0 comments on commit cb0089e

Please sign in to comment.