Skip to content

Refactor: utils.getRuleInfo #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2021
Merged

Conversation

fisker
Copy link
Contributor

@fisker fisker commented Apr 16, 2021

Make it accept object contains ast and optional scopeManager, so we can simply just pass sourceCode to it. I believe this will fix some reference searching.

@aladdin-add
Copy link
Contributor

just to confirm: sourceCode contains more than ast and scopeManager, but other properties will not be used?

I feel a little hesitate to pass the unused properties - it could be confusing. :)

@fisker
Copy link
Contributor Author

fisker commented Apr 25, 2021

just to confirm: sourceCode contains more than ast and scopeManager, but other properties will not be used?

Yes. But accessing sourceCode is cheap, almost every rule need access to it.

@aladdin-add aladdin-add merged commit 98e893b into eslint-community:master Apr 25, 2021
@fisker fisker deleted the getRuleInfo branch April 25, 2021 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants