-
-
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
Make @typescript-eslint/naming-convention ignore non alphanumeric keys #54
Conversation
I guess you could borrow the regex from here: https://github.com/yeoman/stringify-object/blob/e6ef8e2aa276f79b86a04398df273d45e838a254/index.js#L111 |
That's true, but I don't know how to capitalize "$lib", maybe it would make more sense to restrict the regex to "sentence-like" keys ( |
I'm back with a crazier edge-case: export default class Ping {
@Get()
''(): string {
//^^ Class Method name `` must match...
return 'pong'
}
} |
Disclaimer: not tested |
// Ignore `{'Retry-After': retryAfter}` type properties. | ||
selector: ['classProperty', 'objectLiteralProperty', 'classMethod', 'objectLiteralMethod', 'typeMethod'], | ||
format: null, | ||
modifiers: ["requiresQuotes"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modifiers: ["requiresQuotes"] | |
modifiers: [ | |
'requiresQuotes' | |
] |
It needs to be tested for it to be merged. |
eslint-config-xo-typescript/index.js Lines 63 to 73 in 286a88e
|
Please see #53 for context
\W
means[^a-zA-Z0-9_]
, making keys containing symbols (and thus quoted) ignored by the rule.Fixes #53