-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Docs: add type annotation for tseslint.config()
usage examples
#10508
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
Comments
Could you please provide a reproduction for the error you're seeing? |
Uh oh! @MonstraG, the image you shared is missing helpful alt text. Check #10508 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
|
it seeeeeems that for writing: /** @type {import("typescript-eslint/dist/config-helper").InfiniteDepthConfigWithExtends} */
const a = {
files: [],
rules: {},
}
/** @type {import("typescript-eslint/dist/config-helper").InfiniteDepthConfigWithExtends} */
const b = {
files: [],
rules: {},
}
export const appConfig = tseslint.config(a, b); could work, but of course that's from |
Your This is a highly unusual setup and not recommended for obvious reasons and is why you're getting the error. TS is trying to generate a We can fix this on our side so that it "just works" |
Wow, what timing! I just hit this on my own monorepo with a https://github.com/JoshuaKGoldberg/create/tree/4814c13a2f27200b6ebda1f377a94708ce520534 |
Before You File a Documentation Request Please Confirm You Have Done The Following...
Suggested Changes
In examples of
eslint.config.mjs
, add:(or whatever there actually should be)
(or add this as a separate FAQ item or something)
Affected URL(s)
https://typescript-eslint.io/getting-started/
Additional Info
I request this for the following 2 reasons:
type
there, for typescript to check them alsoWhile the error sounds important, I would still be raising this issue even if error was not there.
Additionally, I don't actually know what to write there, and never could I find this information. I searched for
jsdoc
,type annotations
,ConfigArray
andportable
but was unable to find any issues that would give me even a hint at what should be the correct@type
.The text was updated successfully, but these errors were encountered: