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

Make @typescript-eslint/naming-convention ignore non alphanumeric keys #54

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
const getNamingConventionRule = ({isTsx}) => ({
'@typescript-eslint/naming-convention': [
'error',
{
// Ignore `{'Retry-After': retryAfter}` type properties.
selector: ['classProperty', 'objectLiteralProperty', 'classMethod', 'objectLiteralMethod', 'typeMethod'],
format: null,
modifiers: ["requiresQuotes"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
modifiers: ["requiresQuotes"]
modifiers: [
'requiresQuotes'
]

},
{
/// selector: ['variableLike', 'memberLike', 'property', 'method'],
// Note: Leaving out `parameter` and `typeProperty` because of the mentioned known issues.
Expand All @@ -14,12 +20,7 @@ const getNamingConventionRule = ({isTsx}) => ({
].filter(Boolean),
// We allow double underscore because of GraphQL type names and some React names.
leadingUnderscore: 'allowSingleOrDouble',
trailingUnderscore: 'allow',
// Ignore `{'Retry-After': retryAfter}` type properties.
filter: {
regex: '[- ]',
match: false
}
trailingUnderscore: 'allow'
},
{
selector: 'typeLike',
Expand Down