Glavin001 / Glavin001/tslint-clean-code

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

Open
#55 1 comment 1 reaction 1 assignee Claimed by @karol-majewski View on GitHub
enhancement
Dominant language
TypeScript
Stars
175
Forks
15
PR merge metrics
No merged PRs in 30d

Description

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:

```json
{
"id-length": [
true,
{
"min": 2,
"max": 10,
"exceptions": ["_"],
"check-type-parameters": false,
"check-jsx-intrinsic-elements": false
}
]
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.