darraghoriordan / eslint-plugin-nestjs-typed

Some eslint rules for working with NestJs projects
http://www.darraghoriordan.com
174 stars 34 forks source link

fix: missing null-check in `apiPropertyReturningArrayShouldSetArray` #24

Closed lucas-gregoire closed 2 years ago

lucas-gregoire commented 2 years ago

This PR fixes a missing null-check causing crashes of ESLint. The error occurs when trying to lint a class containg an infered field type. In the below example, the explicit type boolean is optional if the default value is set to false:

class TestClass {
    @Expose()
    @ApiPropertyOptional()
    thisIsABooleanProp = false;
}
darraghoriordan commented 2 years ago

:tada: This PR is included in version 3.9.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: