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

[Feature]: Handle linting of root folder files via o3r/eslint-config #2687

Open
malek-benazzouz opened this issue Jan 13, 2025 · 0 comments
Open
Labels
enhancement New feature or request priority:medium

Comments

@malek-benazzouz
Copy link

malek-benazzouz commented Jan 13, 2025

Context

Today, if we setup eslint via ng add @o3r/eslint-config in an o3r generated monorepo, the linter is configured to run on the app and lib files, but the files in the root folder (such as the root /jest.config.js file) are not linted, because no config exists for the root folder files.

This also causes, as a side effect, a discrepancy between the files linted by the CI, by lint-staged, and by the IDE:

  1. CI: if you run npm run lint, files in the root folder are not linted.
  2. lint-staged: if you run the pre-commit hooks on a root folder file, lint-staged script will lint this file.
  3. IDE: lint issues in the root folder files will be raised by your IDE.

Proposal

Today, the linting of apps/libs is handled via the script "lint": "lerna run lint".

We could add to this command a parallel or subsequent process that runs eslint ./*.* to lint the root files. However, the command output will not look as readable as with the lerna command only, which may deteriorate the dev exp.

Any better suggestion is welcome.

@malek-benazzouz malek-benazzouz added enhancement New feature or request triage labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:medium
Projects
None yet
Development

No branches or pull requests

2 participants