Overview of the feature request
EJS templates are widely used in the generator to produce every type of files in JHipster. However, there is currently no linting or validation applied to these templates, which can lead to inconsistencies, hard-to-detect bugs, and potential security issues in the generated output.
Since EJS mixes JavaScript logic with template syntax, errors inside templates are often only discovered after code generation, during runtime.
- Errors inside <% %> blocks are not validated
- Difficult to maintain large or complex templates
- Regressions in templates may impact multiple generated applications
Expected Benefits
- Early detection of syntax and logic errors in templates
- Improved developer experience when editing templates
- Reduced risk of regressions in generators
This work is already ongoing. It initially started as a Prettier plugin to improve overall reliability and formatting consistency, and has since evolved into a more complete linting approach with auto-fix support for both JavaScript flow control structures and EJS tags.
Related issues or PR
Overview of the feature request
EJS templates are widely used in the generator to produce every type of files in JHipster. However, there is currently no linting or validation applied to these templates, which can lead to inconsistencies, hard-to-detect bugs, and potential security issues in the generated output.
Since EJS mixes JavaScript logic with template syntax, errors inside templates are often only discovered after code generation, during runtime.
Expected Benefits
This work is already ongoing. It initially started as a Prettier plugin to improve overall reliability and formatting consistency, and has since evolved into a more complete linting approach with auto-fix support for both JavaScript flow control structures and EJS tags.
Related issues or PR