Fine ESLint plugin, it should be considered required for using class-validator. :)
I'm using this with a non-NestJS project, though, where null values on JSON objects need to be defined explicitly as null rather than being left as undefined.
The all-properties-have-explicit-defined rule is triggering on lines in my class such as this:
@IsString()
externalId!: string | null;
I'm currently littering my project with eslint-disable-next-line, but that never sits well with me. I do not want to disable the rule as I do have other properties that can be undefined and the rule is helping me find and assign them IsOptional.
Would it be possible to add an option to the rule, e.g. null-is-required, to work around my situation?
Fine ESLint plugin, it should be considered required for using class-validator. :)
I'm using this with a non-NestJS project, though, where
null
values on JSON objects need to be defined explicitly asnull
rather than being left asundefined
.The
all-properties-have-explicit-defined
rule is triggering on lines in my class such as this:I'm currently littering my project with
eslint-disable-next-line
, but that never sits well with me. I do not want to disable the rule as I do have other properties that can be undefined and the rule is helping me find and assign themIsOptional
.Would it be possible to add an option to the rule, e.g.
null-is-required
, to work around my situation?