Conversation
|
I would like to see if we can address these issues in generated code rather then disabling the ts-checks. |
|
For start, I see validation rules in generated module: validationMessages: [
{ name: 'required', message: (err, field) => $localize `:@@validators.required:${field?.templateOptions?.label}:property-name: is required` }]where |
This reverts commit 9503bd2.
|
Done those two changes. However, we also need to deal with field. Changing field to _field will be a bit more complex as it's sometimes needed, sometimes not. But when I manually changed field to _field, the code builds with --noUnusedParameters, so we are close. As for --noUnusedLocals true, it looks like it's fixed if we'd remove private method applyOptionally, which I don't see used anywhere. Can I just remove it? |
In order to enable stricter rules in tsconfig, as shown below, we need to disable those ts checks in generated code
"compilerOptions": {
"noUnusedLocals": true,
"noUnusedParameters": true,