8000 Docs: Misleading statement: "Contains all of `stylistic`, along with additional stylistic rules that require type information." · Issue #11211 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

Docs: Misleading statement: "Contains all of stylistic, along with additional stylistic rules that require type information." #11211

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

Closed
2 tasks done
bjenkins-partstech opened this issue May 13, 2025 · 2 comments
Labels
documentation Documentation ("docs") that needs adding/updating fix: user error issue was fixed by correcting the configuration / correcting the code

Comments

@bjenkins-partstech
Copy link

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

* Contains all of `stylistic`, along with additional stylistic rules that require type information.

This statement led me to think that I wouldn't need any @stylistic/* packages and that by using the tseslint.configs.stylisticTypeChecked config I would get stylistic lint errors out of the box.

Affected URL(s)

https://typescript-eslint.io/users/configs/#stylistic-type-checked

Additional Info

It may also be worthwhile to provide an example for those looking to use both typescript-eslint and stylistic.

It was rather challenging for me to come up with this:

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import stylistic from '@stylistic/eslint-plugin-ts'
//import stylisticJsx from '@stylistic/eslint-plugin-jsx'

export default tseslint.config(
    eslint.configs.recommended,
    tseslint.configs.recommendedTypeChecked,
    tseslint.configs.stylisticTypeChecked,
    stylistic.configs.all,
    {
        "languageOptions": {
            "parser": tseslint.parser,
            "parserOptions": {
                //"project": "./tsconfig.json",
                "projectService": true,
                "tsconfigRootDir": import.meta.dirname
            }
        },
        "plugins": {
            "@stylistic/ts": stylistic,
            //"@stylistic/jsx": stylisticJsx
        }
    }
);
@bjenkins-partstech bjenkins-partstech added triage Waiting for team members to take a look documentation Documentation ("docs") that needs adding/updating labels May 13, 2025
@bradzacher
Copy link
Member

This statement led me to think that I wouldn't need any @stylistic/* packages

We do not include rules from other plugins in our configs. Those plugins have their own setups and their own configs which you can use by following their docs.

The page mentions "stylistic" because the name of the config is exactly that - "stylistic" and "stylisticTypeChecked".

If we included @stylistic/* then we would explicitly call that out for you, but note that the page makes no mention of that project at all.

@bradzacher bradzacher closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2025
@bradzacher bradzacher added fix: user error issue was fixed by correcting the configuration / correcting the code and removed triage Waiting for team members to take a look labels May 13, 2025
@bjenkins-partstech bjenkins-partstech changed the title Docs: Incorrect statement: "Contains all of stylistic, along with additional stylistic rules that require type information." Docs: Misleading statement: "Contains all of stylistic, along with additional stylistic rules that require type information." May 14, 2025
@bjenkins-partstech
Copy link
Author

I had to read that 3 times before I came to the realization that you were just using the plain ol' adjective stylistic and not the package stylistic they were so intertwined in my head.

Fair enough, makes sense now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation ("docs") that needs adding/updating fix: user error issue was fixed by correcting the configuration / correcting the code
Projects
None yet
Development

No branches or pull requests

2 participants
0