-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Should use standard '@typescript-eslint/' prefix for rule names, not 'ts/' #115
Comments
@lachlancollins FYI |
Hi @JoshuaKGoldberg , sorry I missed this! I'm surprised anyone is trying out this config outside of the TanStack repos! I was largely following antfu's config, and I see you've also submitted an issue there. I'm not too fussed by the prefix either way - ideally we would just use a config maintained by someone else, but there are some things in the antfu config that were too different from the existing TanStack eslint setups. |
For context, Josh reached out to me because he wants to help us upgrade to TypeScript eslint v8 beta, and since |
Ahhh makes sense! It looks like ESLint v8.57.0 is still supported by the typescript-eslint v8 beta, so we could upgrade that here without too much difficulty. @JoshuaKGoldberg I'm very happy if you want to submit a PR to change the prefix or anything else :) |
Yup, exactly!
Awesome, thanks! Will do now. 🚀 |
Describe the bug
The new ESLint flat config allows assigning any arbitrary prefix you want for rule names. The prefix used in the
plugins
object:config/packages/config/src/eslint/index.js
Lines 44 to 46 in 2935da9
...is then what the rules are referred to as in
rules
:config/packages/config/src/eslint/typescript.js
Lines 4 to 6 in 2935da9
Steps to reproduce
import { tanstackConfig } from '@tanstack/config/eslint'
in aneslint.config.js
ts/array-type
, not@typescript-eslint/array-type
Expected behavior
The recommended preset configs from typescript-eslint use a
'@typescript-eslint/'
prefix, not'ts/'
. So if you try to, say, use both@tanstack/config/eslint
andtypescript-eslint
in a config:...you'll get each rule running and reporting twice:
Change request: can we switch the prefix to
'@typescript-eslint/'
?How often does this bug happen?
Every time
Screenshots or Videos
No response
TanStack Config version
0.9.2
TypeScript version
No response
Additional context
I realize the
ts/
prefix is much easier to read+write than the super verbose@typescript-eslint/
. But we're stuck with@typescript-eslint/
in typescript-eslint because that's what everyone's been using for years.We in typescript-eslint have previously surfaced feedback to ESLint core that prefix duplication is a known user pain: eslint/eslint#17766. But there isn't a way to lock down and/or deduplicate the prefixes (yet?).
Keeping to the standard prefix makes it easier to use standard shared configs: #114.
The text was updated successfully, but these errors were encountered: