This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 656
feature(rome_js_analyzer): semantic rules and "no arguments" lint rule #2807
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying with
|
Latest commit: |
3273f98
|
Status: | ✅ Deploy successful! |
Preview URL: | https://af7eca51.tools-8rn.pages.dev |
Branch Preview URL: | https://feature-no-arguments.tools-8rn.pages.dev |
fb58bf1
to
37bfa11
Compare
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
ematipico
reviewed
Jul 4, 2022
@xunilrj there's an empty file that is not supposed to be there. It's called |
website/playground/src/lib.rs
Outdated
@@ -69,6 +75,9 @@ struct ErrorOutput(Vec<u8>); | |||
|
|||
impl io::Write for ErrorOutput { | |||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> { | |||
// let str = std::str::from_utf8(buf).unwrap(); | |||
// let html = ansi_to_html::convert_escaped(str).unwrap(); | |||
// self.0.write(html.as_str().as_bytes()) | |||
self.0.write(buf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these comments still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Good catch.
2808d35
to
0cd2de9
Compare
ematipico
approved these changes
Jul 5, 2022
a3a96a4
to
3273f98
Compare
28 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR creates the foundation and implements the first semantic/scoping rule of #2743. Undoubtedly the
SemanticModel
will need improvements. We can do them as we see need from the rules.Relevant changes
Query return node directly
Semantic model is accessed through RuleContext
but the method
model()
exist only if theRule
asked for the semantic model.New query type
Rules can ask to run with the semantic model with
rome_js_analyze run the in two phases
Today everything is run serially. But the opportunity to run in MT is right there!
I did a quick test and the only major problem I saw was
Rc
inside rome_rowan.performance
Speed is almost the same without the semantic model. I saw a minor increase (1/2ms) in the
input.js
of therome_cli
folder.As soon as we land more semantic lint rules, we can focus on optimization.
playground
I added two small improvements to the playground.
First, colors!
Second, timing:
this time in on the debug build. I am not good to advertise features! 😄
