Skip to content

[naming-convention] Allow quoted object keys in any format #1483

@sindresorhus

Description

@sindresorhus
{
	rules: {
		'@typescript-eslint/naming-convention': [
			'error',
			{
				selector: 'default',
				format: [
					'strictCamelCase'
				],
				leadingUnderscore: 'allow',
				trailingUnderscore: 'allow'
			}
		}
	}
}
response.writeHead(413, {
	'Retry-After': retryAfterOn413
});

Expected Result

I expected the rule to ignore quoted object keys or have a way to ignore them. I think the old camelcase rule ignored such case.

Actual Result

✖   16:3   Property name Retry-After must match one of the following formats: strictCamelCase                      @typescript-eslint/naming-convention

Additional Info

Versions

package version
@typescript-eslint/eslint-plugin 2.17.0
@typescript-eslint/parser 2.17.0
TypeScript 3.7.5
ESLint 6.8.0
node 10.17.0
npm 6.13.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocumentation ("docs") that needs adding/updatingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy