This repository was archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 653
chore(rome_analyzer): declare rules with version #2891
Merged
Merged
Conversation
This file contains hidden or 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
3519cd8
to
442095f
Compare
Deploying with
|
Latest commit: |
a485559
|
Status: | ✅ Deploy successful! |
Preview URL: | https://ac6f4992.tools-8rn.pages.dev |
Branch Preview URL: | https://feature-rule-version.tools-8rn.pages.dev |
Parser conformance results on ubuntu-latestjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
leops
reviewed
Jul 18, 2022
MichaReiser
reviewed
Jul 19, 2022
crates/rome_js_analyze/src/analyzers/js/no_async_promise_executor.rs
Outdated
Show resolved
Hide resolved
442095f
to
d34326b
Compare
leops
approved these changes
Jul 19, 2022
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.
Summary
This adds once of the nice to have listed in #2835
Proposed on discord: https://discord.com/channels/678763474494423051/978209399120216076/987343929231941673
The PR changes how the
declare_rule
is defined. Now the shape is different and it has a struct-like syntax:It also accepts another field, which is a possible deprecation reason. This will be useful in the future, when we want to ditch or change rules. It's not used anywhere yet, other than being part of the metadata:
The small downside of this approach is that the version is hardcoded, so the developer has to make sure to put the correct next version (usually the next minor). But, for now, I think it's a small price to pay compared on setting workflows and branches for multiple websites.
I also tweaked a bit the
documentation
cargo alias to include alsorome_js_formatter
, which will be deployed once the PR is merged.I also moved the codegen of the configuration in another command called
cargo codegen configuration
. Having it in a separate command fixed an issue on CI, now some rules that were "missed" locally are now correctly added. I plan to add this command in the CI in another PR, to see if actually fixed the issue.Test Plan
Check the rendered result