Skip to content
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

Eslint complains when updating type-fest #565

Closed
angelod1as opened this issue Mar 7, 2023 · 4 comments
Closed

Eslint complains when updating type-fest #565

angelod1as opened this issue Mar 7, 2023 · 4 comments

Comments

@angelod1as
Copy link

I'm trying to update type-fest in my project, but when doing it, my eslint complains of some files inside the type-fest folder.

This is weird as it is, so I'm asking here if there's any config that I'm missing.

My .eslintignore has node_modules/ in it (and it works, I tested with different packages), but it still fails linting with the following:

node_modules/type-fest/source/camel-case.d.ts:25:32 - error TS1005: '?' expected.

25  infer FirstWord extends string,
                                  ~

node_modules/type-fest/source/camel-case.d.ts:26:42 - error TS1005: '?' expected.

26  ...infer RemainingWords extends string[],
                                            ~

node_modules/type-fest/source/join.d.ts:32:56 - error TS1005: '?' expected.

32    ...infer Rest extends ReadonlyArray<string | number>,
                                                          ~


Found 3 errors in 2 files.

Errors  Files
     2  node_modules/type-fest/source/camel-case.d.ts:25
     1  node_modules/type-fest/source/join.d.ts:32

I'd love some help debugging this. What information do you need further than this?

    "type-fest": "^3.6.1",

    "babel-eslint": "^10.1.0",
    "eslint": "^8.24.0",
    "eslint-config-next": "^13.0.2",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-cypress": "^2.12.1",
    "eslint-plugin-jest": "^26.2.2",
    "eslint-plugin-lodash": "^7.4.0",
    "eslint-plugin-no-only-tests": "^3.1.0",
    "eslint-plugin-react-hooks": "^4.6.0",

Thanks a lot in advance.

@voxpelli
Copy link
Collaborator

voxpelli commented Mar 7, 2023

error TS1005 is a TypeScript error, not an ESLint error

Which version of TypeScript are you using?

@angelod1as
Copy link
Author

"typescript": "^4.6.3",

apparently if I update it, a lot of other things in my project complains (I'm using NextJS: "next": "^12.3.1", and I can't update it).

If the case is that my typescript is outdated, then it's OK to close this issue.

@voxpelli
Copy link
Collaborator

voxpelli commented Mar 7, 2023

@angelod1as Current type-fest requires TS 4.7 as a minimum, test if you can upgrade to that at least, otherwise my recommendation would be to downgrade type-fest for now, sorry :/

@voxpelli voxpelli closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
@angelod1as
Copy link
Author

@voxpelli no problem. Thanks for the response and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants