-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
documentationDocumentation ("docs") that needs adding/updatingDocumentation ("docs") that needs adding/updatingfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
Description
Before You File a Documentation Request Please Confirm You Have Done The Following...
- I have looked for existing open or closed documentation requests that match my proposal.
- I have read the FAQ and my problem is not listed.
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
}
}
);
Metadata
Metadata
Assignees
Labels
documentationDocumentation ("docs") that needs adding/updatingDocumentation ("docs") that needs adding/updatingfix: user errorissue was fixed by correcting the configuration / correcting the codeissue was fixed by correcting the configuration / correcting the codelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.