generator-easy-ui5 icon indicating copy to clipboard operation
generator-easy-ui5 copied to clipboard

The ".eslintignore" file is no longer supported

Open alxsap opened this issue 10 months ago • 4 comments

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.

> [email protected] 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)

alxsap avatar Apr 11 '24 06:04 alxsap

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.

henriquemattos avatar Apr 26 '24 10:04 henriquemattos

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.

nicoschoenteich avatar Apr 26 '24 11:04 nicoschoenteich

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

henriquemattos avatar Apr 26 '24 13:04 henriquemattos

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.

petermuessig avatar May 13 '24 05:05 petermuessig