Skip to content

How to disable lint/style/useNamingConvention for object properties that are out of my control? #4898

Answered by Conaclos
mkvlrn asked this question in Q&A
Discussion options

You must be logged in to vote

It is currently not possible to configure what you want.
I could advise relaxing the convention for object literal properties:

	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true,
			"style": {
				"useNamingConvention": {
					"level": "error",
					"options": {
						"conventions": [
							{
								"selector": {
									"kind": "objectLiteralProperty"
								},
								"formats": ["camelCase", "snake_case"]
							}
						]
					}
				}
			}
		}
	},

Another possibility is to add exceptions for some property names:

	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true,
			"style": {
				"useNamingConvention": {
					"level": "error",
					"options": {
		…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@mkvlrn
Comment options

@Conaclos
Comment options

@mkvlrn
Comment options

@Conaclos
Comment options

@mkvlrn
Comment options

Answer selected by mkvlrn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants