The scopes are not necessarily represented in the AST, like that's a concept, it's not part of the syntax. And so we actually do scope analysis as part of running the ESLint on a file as well. A rule can say, okay, give me the scope that's related to this particular node. That scope then contains things like variable declarations, variable references, and stuff like that that you can use to implement that no shadow rule that you mentioned.
In this supper club episode of Syntax, Wes and Scott talk with Nicholas Zakas about his creation of ESLint, what’s coming up in ESLint, and his work as a coach and mentor for programmers.
Show Notes
××× SIIIIICK ××× PIIIICKS ×××
Shameless Plugs
Tweet us your tasty treats