Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented babel-eslint dependency in @liferay/eslint-plugin #1149

Open
1 of 4 tasks
leandroaguiar-lr opened this issue Jun 30, 2023 · 0 comments
Open
1 of 4 tasks

Comments

@leandroaguiar-lr
Copy link

leandroaguiar-lr commented Jun 30, 2023

Issue type (mark with x)

  • πŸ€” Question
  • πŸ› Bug report
  • 🎁 Feature request
  • πŸ€·β€β™€οΈ Other

Description

The @liferay/eslint-plugin package uses babel-eslint as a parser, but doesn't list it as a dependency nor as a peer dependency.

I don't mind installing it in my package, but I would like for it be documented at least as a peer dependency so NPM can give me warnings when its missing.

Desired behavior:
I'm able to use @liferay/eslint-plugin's general configuration and run ESLint with it.

Current behavior:

Oops! Something went wrong! :(

ESLint: 7.32.0

Error: Failed to load parser 'babel-eslint' declared in '.eslintrc.json Β» plugin:@liferay/general': Cannot find module 'babel-eslint'
Require stack:
- /home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@liferay/eslint-plugin/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Function.resolve (node:internal/modules/cjs/helpers:116:19)
    at Object.resolve (/home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@eslint/eslintrc/lib/shared/relative-module-resolver.js:28:50)
    at ConfigArrayFactory._loadParser (/home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:929:45)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:724:43)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:665:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/home/leandro/projects/sample-liferay-eslint-plugin-babel-eslint-error/node_modules/@eslint/eslintrc/lib/config-array-factory.js:720:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)

Repro instructions (if applicable):

Other information (environment, versions etc):

  • Ubuntu 22.04.2 LTS
  • Node 18.16.1
  • NPM 9.5.1
  • eslint 7.35.0
  • @liferay/eslint-plugin 1.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant