forked from VilledeMontreal/angular-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: update to Angular v17 broke linter #2
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
…l#222 Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
DevSallSa
added a commit
that referenced
this pull request
Jun 19, 2025
* feat: update to angular 17 * feat: update eslint version * fix: linting errors * feat: remove deprecated lint package * feat: remove deprecated lint rules * fix: eslint rules compliance error * ci: change node image * refactor: replace deprecated type * refactor: replace deprecated type from storybook-angular * ci: update github actions versions * fix: broken lint command when upgrading to Angular v17 VilledeMontreal#222 * ci: run build job before lint job to fix linting error --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
DevSallSa
added a commit
that referenced
this pull request
Jun 20, 2025
* feat: update to angular 17 * feat: update eslint version * fix: linting errors * feat: remove deprecated lint package * feat: remove deprecated lint rules * fix: eslint rules compliance error * ci: change node image * refactor: replace deprecated type * refactor: replace deprecated type from storybook-angular * ci: update github actions versions * fix: broken lint command when upgrading to Angular v17 VilledeMontreal#222 * ci: run build job before lint job to fix linting error --------- Signed-off-by: DevSallSa <mrsallsa@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL;DR
Context
Based on Olivier’s PR (VilledeMontreal#221),
I updated the Angular version to v17 and fixed the following issue: VilledeMontreal#222.
The lint error was caused by several factors :
villedemontreal/lint-configwhich is incompatible with current ESLint versioneslint,typescript-eslintandangular-eslintpackagesExplanation
The Lint job failed because it ran before the build job in GitHub Actions.
The Storybook sub-project depends on the built version of
angular-uiand without it, TypeScript cannot resolve certain imports.For example, the following code will fail during linting:
with the following error in GitHub Actions :
As
angular-uiis developed inside this project, it doesn't appear inpackage.jsonnor innode_modules.In that case, Typescript will look in the
dist/folder to find the lib. These types are only available after the build step, as they reside in thedist/folder but currently as the lint command is ran before the build command, thedist/folder does not exist.Step to reproduce in local
npm cidist/folder doesn't exist in the root folder. Delete it otherwisenpm run lint=> The error will occurrednpm run build && npm run lint=> the lint will pass without error (only warnings)Why now ?
Because of
eslint,typescript-eslintandangular-eslintversions supported by Angular v17 which may include breaking changes or enforce stricter best practices.The solution
To resolve this, we can either :
Or
This PR implements the first solution to minimize code changes.