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

[Bug]: Issues in o3r/eslint-config generated config #2686

Open
malek-benazzouz opened this issue Jan 13, 2025 · 0 comments
Open

[Bug]: Issues in o3r/eslint-config generated config #2686

malek-benazzouz opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working priority:medium

Comments

@malek-benazzouz
Copy link

malek-benazzouz commented Jan 13, 2025

Package name

eslint-config-otter

Package version

11.6.0-rc.2

Reproduction steps

Add the o3r eslint config to a monorepo containing an app and a lib, via the following command:
ng add @o3r/[email protected].

Run this command 3 times:

  • In the app.
  • In the lib.
  • At root level.

Current result

  1. The lint script is missing from both the app and the lib package.json files. As a result, running npm run lint at root level does not lint anything (because it runs a lerna run lint, which does not find the packages scripts).
  2. The lintFilePatterns values in angular.json are set to "[...]/src/**/*.ts", which results in linting only .ts files.
  3. The generated root tsconfig.eslint.json file extends ./tsconfig, but in my case the base tsconfig file is ./tsconfig.base.
  4. In the package.json file, the following generated dep uses "latest" version: "yaml-eslint-parser": "latest".

Expected result

  1. We should generate a lint script in each app and lib to which we add the eslint config, containing "lint": "ng lint <package-name>".
  2. We should set the lintFilePatterns values in angular.json to the following value:
"lintFilePatterns": [
  "<apps_or_libs>/<app_or_lib_name>/**/*.{m,c,}{j,t}s",
  "<apps_or_libs>/<app_or_lib_name>/**/*.json",
  "<apps_or_libs>/<app_or_lib_name>/**/*.html"
]
  1. Could we check dynamically what the base tsconfig file is, and make tsconfig.eslint.json file extend it, instead of hard coding ./tsconfig?
  2. We want the dependency to specify a more precise version, e.g. "yaml-eslint-parser": "^1.2.2".

Additional comments

No response

@malek-benazzouz malek-benazzouz added bug Something isn't working triage labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants