-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: [prefer-promise-reject-errors (and other rules too)] Cannot convert Symbol to string (8.6.0 regression) #9999
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
cc @abrahamguo |
99% certain the root cause is that this code right here typescript-eslint/packages/eslint-plugin/src/util/misc.ts Lines 253 to 258 in c11ca06
doesn't account for the fact that the static value can be a symbol, which will immediately throw when coerced to string |
I also get
|
Sounds good. This will be an easy fix, I will plan on opening a PR with the fix in the next 12 hours unless someone beats me to it 😄 |
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.5.2&fileType=.tsx&code=KYDwDg9gTgLgBAYwDYEMDOa4FkVgErADmAlmjFAJ4A8A0gDRwAqAfHAN4BQccYArgEZJiCOMRjAAtpgC8cAHbAA7tly0GLABQBKANxceAoSIDaAZQoT%2BEJADoxwKChjQAutvb7uUYDF5Q5cDAAFqR24lJmFla29o7OUG66%2BgC%2BHKlAA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Y6RAM0Wlo4D2AW0rJEtTgCtEZOr2gDoqDJHmLI4MAF8QWoA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
lint should pass
Actual Result
TypeError: Cannot convert a Symbol value to a string
Additional Info
8.5.0 works fine
The text was updated successfully, but these errors were encountered: