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

Can't set preference for 'constructor' in tagNamePreference due to upstream issue #537

Closed
edg2s opened this issue May 13, 2020 · 5 comments · Fixed by #539
Closed

Can't set preference for 'constructor' in tagNamePreference due to upstream issue #537

edg2s opened this issue May 13, 2020 · 5 comments · Fixed by #539
Labels

Comments

@edg2s
Copy link
Contributor

edg2s commented May 13, 2020

In the Wikimedia config, we want to allow @class and @constructor.

This should be possible with the following config:

{
  "tagNamePreference": {
    "class": "class",
    "constructor": "constructor"
  }
}

However due to an upstream issue (eslint/eslint#13289) it is impossible to use settings keys that exist on Object.prototype (so constructor, toString etc.).

@brettz9
Copy link
Collaborator

brettz9 commented May 13, 2020

Would you like us to solve this in an HTML-JavaScripty way, and use className as an alias for "class"?

@brettz9
Copy link
Collaborator

brettz9 commented May 13, 2020

Oh, I see the issue is with constructor, sorry, not keywords. Any suggestions on an API?

@edg2s
Copy link
Contributor Author

edg2s commented May 13, 2020

Perhaps"_constructor" as a workaround? I assume @_name is not allowed?

I've submitted a patch upstream, but if we want to maintain compatibility back to 6.0.0, we'll need some sort of workaround.

@brettz9
Copy link
Collaborator

brettz9 commented May 13, 2020

Unfortunately, jsdoc allows anything that is not whitespace (\S). But that means the key could at least be "constructor tags" or something like that. I guess that would be the most accommodating.

@gajus
Copy link
Owner

gajus commented May 14, 2020

🎉 This issue has been resolved in version 25.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants