-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
bugSomething isn't workingSomething isn't workinggeneratorsIssue is linked to Otter generatorsIssue is linked to Otter generatorspriority:mediumproject:@o3r/eslint-config
Description
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/eslint-config@11.6.0-rc.2.
Run this command 3 times:
- In the app.
- In the lib.
- At root level.
Current result
- The
lintscript is missing from both the app and the libpackage.jsonfiles. As a result, runningnpm run lintat root level does not lint anything (because it runs alerna run lint, which does not find the packages scripts). - The
lintFilePatternsvalues inangular.jsonare set to"[...]/src/**/*.ts", which results in linting only.tsfiles. - The generated root
tsconfig.eslint.jsonfile extends./tsconfig, but in my case the base tsconfig file is./tsconfig.base. - In the
package.jsonfile, the following generated dep uses "latest" version:"yaml-eslint-parser": "latest".
Expected result
- We should generate a
lintscript in each app and lib to which we add the eslint config, containing"lint": "ng lint <package-name>". - We should set the
lintFilePatternsvalues inangular.jsonto 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"
]- Could we check dynamically what the base tsconfig file is, and make
tsconfig.eslint.jsonfile extend it, instead of hard coding./tsconfig? - We want the dependency to specify a more precise version, e.g.
"yaml-eslint-parser": "^1.2.2".
Additional comments
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggeneratorsIssue is linked to Otter generatorsIssue is linked to Otter generatorspriority:mediumproject:@o3r/eslint-config