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
feat(eslint-plugin): deprecate formatting (meta.type: layout) rules #8073
feat(eslint-plugin): deprecate formatting (meta.type: layout) rules #8073
Conversation
Thanks for the PR, @JoshuaKGoldberg! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
just to confirm - all the deprecated rules are the ones that have been moved to eslint-stylistic
, right? Are there any others?
Also accepted but you should mark them all as replacedBy: ['eslint-stylistic/foo']
.
Final note (follow up?) we should add a banner to deprecated rules using this metadata and point them at the replacement docs.
Just did another pass - I did miss one, 👍 on the other two suggestions, good call! Done. |
deprecated: true, | ||
docs: { | ||
description: 'Enforce consistent spacing inside braces', | ||
extendsBaseRule: true, | ||
}, | ||
replacedBy: ['@stylistic/object-curly-spacing'], |
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.
OCD eye twitch: all the other ones you added on consecutive lines
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.
Heh, the other ones are placed before a type:
. So they somewhat don't make the sorting less alphabetical. This one doesn't have a type:
...
packages/website/plugins/generated-rule-docs/insertions/insertFormattingNotice.ts
Outdated
Show resolved
Hide resolved
04dea84
into
typescript-eslint:main
…ypescript-eslint#8073) * feat(eslint-plugin): deprecate formatting (meta.type: layout) rules * fix: whoops, forgot to commit all.ts changes * Add replacedBy * Update formatting admonition * Missed object-curly-spacing * areOptionsValid undo * Correct configs and tweak deprecation notice
PR Checklist
Overview
For every rule whose
meta
includestype: 'layout'
, addsdeprecated: true
and removes the rule from theall
config.Note that changes to the
all
config are explicitly not considered breaking. Per https://typescript-eslint.io/linting/configs (added in #5719, back in v5):