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

id-length rule should be able to ignore JSX intrinsic elements #55

Open
karol-majewski opened this issue May 13, 2018 · 1 comment
Open
Assignees

Comments

@karol-majewski
Copy link
Contributor

karol-majewski commented May 13, 2018

Currently, every exception for the id-length rule must be passed explicitly as a string. My proposal would be to allow exceptions based on their kind, not only the literal value.

As mentioned in #40, one possible improvement to the rule configuration would be to allow all type parameters to be excluded from checking. It seems like intrinsic elements would be a welcome addition, given the amount of HTML tags otherwise provided manually.

An example configuration object might look like this:

{
  "id-length": [
    true,
    {
      "min": 2,
      "max": 10,
      "exceptions": ["_"],
      "check-type-parameters": false,
      "check-jsx-intrinsic-elements": false
    }
  ]
}
@Glavin001
Copy link
Owner

Glavin001 commented May 13, 2018

Good idea! I also find id-length problematic for intrinsic tag names when using JSX. Pull Requests welcome! 👍

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

No branches or pull requests

2 participants