-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore(lint): proper formatting for control flow #3003
base: rc
Are you sure you want to change the base?
Conversation
ng add @angular-eslint/schematics just does the job !
4e9f64d
to
fd1bb9a
Compare
], | ||
"extends": [ | ||
"plugin:@angular-eslint/template/recommended", | ||
"plugin:prettier/recommended" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use this exact configuration in other projects and it doesn't raise any issue. I don't understand why removing prettier/recommended
here solves anything 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me neither, I tested on several files and it makes no sense.
If I add it back, the result format is derping, if I revert all the changes and exclude eslint for formatting (and thus format with only prettier), it works fine. Now if I enable prettier only in this eslint config, I get an error due to <
being unexpected, showing that somehow it's considering that as a ts file???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the problem that
- in prettier config :
.component.html
and.page.html
files are used with the angular parser - in prettier config :
.html
files are used with the html parser - in eslint config : all
.html
files are used with the same rules ?
Maybe there should be the same split between files in eslint config ? 🤔 and .html
files would just use prettier:prettier/recommended
while .component.html
and .page.html
files would use both angular-eslint and prettier ?
Or maybe just use .html
in prettier like in the recommended config by angular eslint : https://github.com/angular-eslint/angular-eslint/blob/main/docs/CONFIGURING_ESLINTRC.md#notes-for-eslint-plugin-prettier-users
Description
Having both prettier and @angular-eslint configs for template formatting was causing conflicts and issues in the result template. Removing the angular-eslint part from settings fixed that, as well as updating lint-related deps.