ui5-community / generator-ui5-project

Generator for UI5-based web-apps which use the official UI5 tooling and support multiple deployment targets such as the SAP Business Technology Platform
Apache License 2.0
33 stars 25 forks source link

Duplicate entries in `.eslintrc` for project scaffolding #47

Closed wridgeu closed 2 years ago

wridgeu commented 2 years ago

Hey there, 👋

I've noticed that the .eslintrc file will always have duplicate entries (see img below) when agreeing on adding the "code assist libraries" during the project scaffolding (cmd: yo easy-ui5 project).

image

This is because these options are being set here:

https://github.com/ui5-community/generator-ui5-project/blob/126a3207bc73cc5a8049b344059e2c96310e828e/generators/app/index.js#L129-L132

even though they already exist in the base .eslintrc file for this type of generator:

https://github.com/ui5-community/generator-ui5-project/blob/126a3207bc73cc5a8049b344059e2c96310e828e/generators/app/templates/_.eslintrc#L81-L82

Would it make sense to remove these additions (plugins & extends) in the index.js? I think using JSDoc is viable even without the type-hinting from the tsconfig.json.

vobu commented 2 years ago

yeah, clean up here definitely makes sense - in favor of the explicit _.eslintrc, since its easier to maintain declarations in a file rather than in src code. Mind giving it a shot aka PR 😺?

wridgeu commented 2 years ago

@vobu great, thanks for the feedback :) created one with these small adjustments, didn't request a reviewer yet. If you wouldn't mind you can go ahead ^^