Skip to content
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

fix: detect rules exported using a variable #233

Merged

Conversation

bmish
Copy link
Member

@bmish bmish commented Dec 7, 2021

Updates our rules to detect rules that are defined in variables, which is a style I have seen used by some eslint plugins:

const rule = { meta: {}, create(context) {} }; 
export default rule;
const rule = { meta: {}, create(context) {} }; 
module.exports = rule;

Follow-up to previous work around detecting additional types of rules and variables used inside rules:

Note that this could be considered either a fix or a breaking change since it will result in additional rules detected by our rules in some plugins.

Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit ae68f6b into eslint-community:master Dec 8, 2021
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