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

fix(eslint-plugin): use @stylistic ruleset for formatting when not using prettier #13

Conversation

Killusions
Copy link
Member

@Killusions Killusions commented Jan 15, 2025

BREAKING CHANGE: The peer-dependency @stylistic/eslint-plugin has been added to eslint-config-typescript and eslint-config-angular, please install version 2.13.0 or newer.

Currently, the eslint-config only works when using prettier and eslint-config-prettier, otherwise it fails, because all formatting related rules have been moved from typescript-eslint to stylistic. This left us with two options: Disable all formatting rules or migrate. As removing all formatting rules leads to a much degraded experience for users not also using prettier, I suggest migrating to stylistic. eslint-config-prettier will still automatically disable these rules to avoid conflicts.

@Killusions Killusions force-pushed the fix/update-ruleset-when-not-using-prettier branch from 37579dc to fea240b Compare January 15, 2025 17:22
@spike-rabbit
Copy link
Member

I don't see why we need this. The idea of this repo is to provide an opinion of how things should be formatted and linted.
We have prettier so we don't need stylistic/*.

So just disabling the rules is in my opinion what we should do.

If we the others feel like we should have stylistic stuff in here, then it should be a separate file and an optional peerDependency.

@Killusions Killusions force-pushed the fix/update-ruleset-when-not-using-prettier branch from fea240b to 4f95bf5 Compare January 15, 2025 17:40
…ing prettier

BREAKING CHANGE: The peer-dependency `@stylistic/eslint-plugin` has been added to `eslint-config-typescript` and `eslint-config-angular`, please install version 2.13.0 or newer
@Killusions Killusions force-pushed the fix/update-ruleset-when-not-using-prettier branch from 4f95bf5 to 292aa11 Compare January 15, 2025 17:42
@Killusions
Copy link
Member Author

@spike-rabbit But then we have to say we don't recommend usage without prettier, as otherwise this leads to a very much degraded experience

@timowolf
Copy link
Member

@Killusions @spike-rabbit This is what I reported already. The overall documentation shout be sharpened and the dependencies of the different linters should be explained.

@kfenner
Copy link
Member

kfenner commented Jan 17, 2025

We (@timowolf @Killusions @spike-rabbit @kfenner) decided to not introduce @stylistic and completely drop the styling rules from our angular and typescript lint configs.
Main reason is that we only use prettier in our own projects and if somebody else wants to use stylistic, they can introduce these rules on their own as we mainly want to promote prettier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants