-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
@typescript-eslint/naming-convention: add HTTP headers to ignorelist #44
Comments
Does the rule have this ability? |
You could add a RegExp to match words with the |
I don't think that's a good idea. It's messy and it will also make non-header properties with the same name not be linted. |
I think keys from other libraries should be allowed in general. Other libraries have their defined keys in options and so on and I cant those keys from this side. Because of this I disabled this rule for most of my projects because two of my most used libraries have keys that are not written in the same way xo wants them to be. This results in hundreds of errors which made me prefer to just disable the rule at all. Which is sad as I like the idea of enforcing variable style. |
Any updates on this? |
No, but luckily I've since changed my mind about header naming. Since Node.js & the HTTP spec say headers are case-insensitive I am now of the opinion that header names should instead be enforced to be totally lowercase. |
HTTP headers and other common words (ex.
POST
orGET
) should be added to an ignorelist so the camelcase validator doesn't trigger for them.The text was updated successfully, but these errors were encountered: