-
Checking the options for the rule I couldn't figure out how to not have warns raised in properties that are defined in imported libs, for example, zod's RawCreateParams when defining zod schemas: A big enough schema could have a dozen of those, and disabling each by comment is not viable. The argument for that is defined in zod like this: export type RawCreateParams = {
errorMap?: ZodErrorMap;
invalid_type_error?: string;
required_error?: string;
message?: string;
description?: string;
} | undefined; For now I'm overriding my schema files to disable the rule, but I would like to keep the rule on and have it not affect types coming from zod or any other imported lib. Is there a way to do this that I really missed in the docs? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
cc @Conaclos |
Beta Was this translation helpful? Give feedback.
-
It is currently not possible to configure what you want. "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": {
"conventions": [
{
"selector": {
"kind": "objectLiteralProperty"
},
"match": "invalid_type_error|required_type_error|(.*)"
}
]
}
}
}
}
}, |
Beta Was this translation helpful? Give feedback.
It is currently not possible to configure what you want.
I could advise relaxing the convention for object literal properties:
Another possibility is to add exceptions for some property names: