SAP / generator-easy-ui5

Meta-generator various project types within the UI5 Universe
https://blogs.sap.com/2021/04/09/easy-ui5-3.0-from-community-contributions-to-community-plugins/
Apache License 2.0
230 stars 72 forks source link

The ".eslintignore" file is no longer supported #144

Closed alxsap closed 1 day ago

alxsap commented 2 months ago

Easy-Ui5 version:

Run yo easy-ui5 --plugins to print all relevant version strings

Node.js: v18.19.0
yeoman-environment: 3.19.3
generator-easy-ui5: 3.8.1
home: C:\Program Files\nvm\v18.19.0\node_modules\generator-easy-ui5
pluginsHome: C:\Users\D036706\.npm\_generator-easy-ui5\plugin-generators

Available generators:
× An error occured while running easy-ui5:app#prompting
Error easy-ui5 --plugins

Cannot read properties of null (reading '1')

(hmm, also here an error)

OS/version:

Windows 11

Browser/version (+device/version):

Steps to reproduce the problem:

  1. Run yo easy-ui5 project with defaults, in a blank folder.

What is the expected result?

Project generated and yo finishes with success message.

What happens instead?

Project generated (completely?) and yo ends with this error message. It seems the generated .eslintignore is not accepted anymore by eslint. Instead a eslint.config.js is expected.

> myui5app@0.0.1 lint-fix
> eslint ./**/webapp/**/*.js --fix && prettier --plugin=@prettier/plugin-xml --write ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern

(node:50400) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 9.0.0

Error: Could not find config file.
    at locateConfigFileToUse (C:\SAPDevelop\git\training\ui5\ui5-tools-test\com.myorg.myui5app\node_modules\eslint\lib\eslint\eslint.js:349:21)
    at async calculateConfigArray (C:\SAPDevelop\git\training\ui5\ui5-tools-test\com.myorg.myui5app\node_modules\eslint\lib\eslint\eslint.js:384:49)
    at async ESLint.lintFiles (C:\SAPDevelop\git\training\ui5\ui5-tools-test\com.myorg.myui5app\node_modules\eslint\lib\eslint\eslint.js:814:25)
    at async Object.execute (C:\SAPDevelop\git\training\ui5\ui5-tools-test\com.myorg.myui5app\node_modules\eslint\lib\cli.js:461:23)
    at async main (C:\SAPDevelop\git\training\ui5\ui5-tools-test\com.myorg.myui5app\node_modules\eslint\bin\eslint.js:165:22)
× An error occured while running ui5-project:app#end
Error easy-ui5 project

Any other information? (attach screenshot if possible)

henriquemattos commented 2 months ago

I came here to report the same ticket:

> eslint ./**/webapp/**/*.js --fix && prettier --plugin=@prettier/plugin-xml --write ./**/webapp/**/*.{js,xml} --no-error-on-unmatched-pattern

(node:46559) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 9.1.1

Error: Could not find config file.
    at locateConfigFileToUse (./node_modules/eslint/lib/eslint/eslint.js:350:21)
    at async calculateConfigArray (./node_modules/eslint/lib/eslint/eslint.js:385:49)
    at async ESLint.lintFiles (./node_modules/eslint/lib/eslint/eslint.js:815:25)
    at async Object.execute (./node_modules/eslint/lib/cli.js:500:23)
    at async main (./node_modules/eslint/bin/eslint.js:153:22)
✖ An error occured while running ui5-project:app#end
Error easy-ui5 project 

Command failed with exit code 2: npm run lint-fix

I'm creating a PR now and will reference this.

nicoschoenteich commented 2 months ago

Thanks for reporting. We are currently working on a complete rewrite of the generator-ui5-project (which you are using here) and will fix this.

henriquemattos commented 2 months ago

@nicoschoenteich should we then use the mentioned project instead of this one?

petermuessig commented 1 month ago

The Easy UI5 generator is a skeleton which aggregates multiple templates from the UI5 community which can be found in the ui5-community github org with the prefix generator-ui5-: https://github.com/ui5-community/?q=generator-ui5-&type=all&language=&sort=

In your case the generator-ui5-project is used inside Easy UI5 to scaffold your project. It should be used via the Easy UI5 generator and not standalone. Issues should be ideally reported in the sub-generators.

@nicoschoenteich maybe we should adopt the create issue hint to explain this in more detail.