Replies: 1 comment 11 replies
-
I think you should use |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there 👋
Question
I'm currently writing a JavaScript code linter using SWC. I am using a parser to parse
.js
files into a module via an AST, and then usingswc:_ecmascript::visit::Visit
to visit relevant parts of the AST, applying a set ofswc_ecma_lints::rule::Rule
's on each file.Currently, I am working on an implementation of the
quotes
rule from ESLint, however I cannot seem to find a way to access the quotes within the AST. AnyStr
value only contains the contents of the string, and not the quotes surrounding it.How can I access the quotes surrounding a
Str
? Thanks in advance!Relevant Code
rules/quotes.rs
rules/mod.rs
rules/rules.rs
Beta Was this translation helpful? Give feedback.
All reactions