Skip to content

Audit rules to ensure correct behavior when no meta object present #181

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

Closed
bmish opened this issue Sep 23, 2021 · 3 comments · Fixed by #225
Closed

Audit rules to ensure correct behavior when no meta object present #181

bmish opened this issue Sep 23, 2021 · 3 comments · Fixed by #225

Comments

@bmish
Copy link
Member

bmish commented Sep 23, 2021

This is a bit of an edge case but I suspect some rules aren't handling it properly. Ensure each rule has tests of this situation.

Note: this does not block the upcoming major release.

@aladdin-add
Copy link
Contributor

aladdin-add commented Sep 23, 2021

function-style rules were not recommended (and not documented?), not sure it's worth too many efforts to cover it.

and, we already have rule prefer-object-rule.

@bmish
Copy link
Member Author

bmish commented Sep 24, 2021

I was actually referring to object-style rules that are missing a meta object, as below:

module.exports = {
  create() {}
}

It's rare that a rule would be left like this, but especially when writing a new rule, the meta object might not be added yet, so we want to make sure existing rules don't crash.

@aladdin-add
Copy link
Contributor

aladdin-add commented Sep 24, 2021

👍 makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants