ESLint: under the hood

This page summarizes the projects mentioned and recommended in the original post on dev.to

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • the-super-tiny-compiler

    :snowman: Possibly the smallest compiler ever

    Now, those concepts are a whole entire world to explore, and this is out of the scope of this article. I suggest the reading of the Chapters 4, 5 and 6 of the book Crafting Interpreters by Robert Nystrom for a wider (but still practical) understanding of those subjects. Another practical great resource to look at is The SuperTiny Compiler. To explore them from a theorical point of view, you can find A LOT of resources from books or courses online.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • esprima

    ECMAScript parsing infrastructure for multipurpose analysis

    Focusing again on ESLint, the parser used by the linter is called Espree. This is an in-house parser built by the ESLint folks to fully support ECMAScript 6 and JSX on top of the already existing Esprima. The Espree module provide APIs for both tokenization and parsing that you can easily test out.

  • js

    Monorepo for the JS language tools.

    Focusing again on ESLint, the parser used by the linter is called Espree. This is an in-house parser built by the ESLint folks to fully support ECMAScript 6 and JSX on top of the already existing Esprima. The Espree module provide APIs for both tokenization and parsing that you can easily test out.

  • astexplorer

    A web tool to explore the ASTs generated by various parsers.

    The rule that I want to write will be called not-allows-underscore: the idea is to abolish the use of underscores when declaring variables or functions. It's a real dummy rule, but it should be enough to see in action the concepts that we have discussed earlier. The first thing that I would do is to go to AST Explorer, write down a code that declares variables and functions (both standard and arrows one) and take a look at what type of node is the one that encodes the identifier. Doing that, I found out that the node type of my interest is Identifier, what a surprise! 🤣. In particular, the structure of the node holds the string used as identifier in the name property.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • ESLint Understand By Doing Part 1: Abstract Syntax Trees

    2 projects | dev.to | 30 Mar 2023
  • Building a Codemod Tool for Rewriting Default Exports

    1 project | dev.to | 29 Oct 2024
  • ESLint Plugin. What was missed in the doc?

    2 projects | dev.to | 9 May 2024
  • Understanding Code Structure: A Beginner's Guide to Tree-sitter

    2 projects | dev.to | 6 Apr 2024
  • How to create your own Eslint rule with tests, boosting the DX, and code-review

    2 projects | dev.to | 27 Mar 2024

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?