-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked 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.package: typescript-eslintIssues related to the typescript-eslint packageIssues related to the typescript-eslint package
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
In examples of eslint.config.mjs, add:
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
+ /** @type {FlatConfig.ConfigArray} */
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
);
(or whatever there actually should be)
(or add this as a separate FAQ item or something)
Affected URL(s)
Additional Info
I request this for the following 2 reasons:
- My repositories use types as much as possible, and whenever I have to write .mjs files, I always add
typethere, for typescript to check them also - without appropriate type annotation, typescript reports;
TS2742: The inferred type of config cannot be named without a reference to
.pnpm/@[email protected][email protected][email protected]/node_modules/@typescript-eslint/utils/ts-eslint
. This is likely not portable. A type annotation is necessary.
While 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 and portable but was unable to find any issues that would give me even a hint at what should be the correct @type.
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workinglocked 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.package: typescript-eslintIssues related to the typescript-eslint packageIssues related to the typescript-eslint package