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

Bug: Strange logging "can't resolve reference" after update to version 5.34.0 #5525

Closed
4 tasks done
doberkofler opened this issue Aug 22, 2022 · 14 comments · Fixed by #5531
Closed
4 tasks done

Bug: Strange logging "can't resolve reference" after update to version 5.34.0 #5525

doberkofler opened this issue Aug 22, 2022 · 14 comments · Fixed by #5531
Assignees
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@doberkofler
Copy link
Contributor

doberkofler commented Aug 22, 2022

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

Strange logging after update to version 5.34.0

can't resolve reference #/definitions/arrayOption from id #
can't resolve reference #/definitions/arrayOption from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/directiveConfigSchema from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/accessibilityLevel from id #
can't resolve reference #/definitions/modifier from id #

Reproduction Repository Link

na

Repro Steps

  1. clone the repo
  2. yarn install
  3. yarn lint

Versions

package version
@typescript-eslint/eslint-plugin 5.35.0
@typescript-eslint/parser 5.35.0
TypeScript 4.7.4
ESLint 8.22.0
node 18.7.0
@doberkofler doberkofler added bug Something isn't working triage Waiting for maintainers to take a look labels Aug 22, 2022
@jakejarvis
Copy link

Looks related to #5509?

FWIW this isn't causing any actual failures for me, just some console spam.

@ThadRasmussen
Copy link

These warnings seem to be written to stderr that causes CI with rush builds to have a non-zero exit. Hence, this rushstack comment proved useful for getting the build pipeline working again.

@cpojer
Copy link

cpojer commented Aug 23, 2022

I can also repro this on my projects, here is what the messages look like when running eslint:
Screen Shot 2022-08-23 at 9 44 58

@stevenlemon
Copy link

From (eslint's schema)[https://eslint.org/docs/latest/developer-guide/working-with-rules#options-schemas]

Note: Currently you need to use full JSON Schema object rather than array in case your schema has references ($ref), because in case of array format ESLint transforms this array into a single schema without updating references that makes them incorrect (they are ignored).

Because ban-ts-comment and others use the array schema format, they aren't able to also use the $ref format,

The change was made in this commit I wonder if we could rollback the change only for those rules using the array format?

@ts-web
Copy link

ts-web commented Aug 23, 2022

Workaround: downgrade to "@typescript-eslint/eslint-plugin": "5.33.0"

@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look labels Aug 23, 2022
@bradzacher
Copy link
Member

bradzacher commented Aug 23, 2022

I wonder if we could rollback the change only for those rules using the array format

I believe that all of our rules use the array format - so we would need to rollback everything. If we can it would be good to fix forward here by actioning #5509 considering how large that PR was it would suck to revert it and lose the website wins it introduced.

As an aside - I wonder if there's a test we can add to catch this in future?
Perhaps this would need an integration test that asserts there is no console error output?

@bradzacher bradzacher added the package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin label Aug 23, 2022
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Aug 23, 2022

👋 Sorry for the disruption folks, this was me. I'm working on a fix now.

I wonder if there's a test we can add to catch this in future?

Ironically, I did make a package that catches console outputs: console-fail-test.

Edit: Fix is in review now, #5531

@httpete
Copy link

httpete commented Aug 23, 2022

same for me, a downgrade to 53 stops it.

@stevenlemon
Copy link

Ironically, I did make a package that catches console outputs: console-fail-test.

Given that plenty of build tools fail on warnings, it would be good if this test was included warnings too.

JoshuaWilkes pushed a commit to common-fate/glide that referenced this issue Aug 24, 2022
* aws-sso provider: make options listing concurrent

* fix the typescript context error in Chakra UI

* tweak retry config to avoid hitting SSO rate limit

* boost timeout to 60s

* implement provider arg option caching

* fix eslint parsing error

see: typescript-eslint/typescript-eslint#5525

* fix lint error

Co-authored-by: meyerjrr <jrmeyer339@gmail.com>
alessandrobellesia pushed a commit to 24Consulting/interview-frontend that referenced this issue Aug 24, 2022
@typescript-eslint/eslint-plugin@5.34.0 generates a warning, 5.33.0 is ok.
typescript-eslint/typescript-eslint#5525
MrMonsk added a commit to zeus-health/ctw-component-library that referenced this issue Aug 24, 2022
@Blackwidow-sudo
Copy link

same for me, a downgrade to 53 stops it.

Hm i just tried it with the downgrade to version 5.33.0 and i still get it:
Screenshot 2022-08-24 204251

@SamHep0803
Copy link

same for me, a downgrade to 53 stops it.

Hm i just tried it with the downgrade to version 5.33.0 and i still get it: Screenshot 2022-08-24 204251

Yeah I'm also on 5.33.0 and having this issue.

@craftedsystems
Copy link

Downgrading to 5.33.0 worked for me. Check your package-lock.json. Maybe you are still using the new version. package.json is no guarantee, if you had a newer version installed before.

@doberkofler
Copy link
Contributor Author

Thank you!

@JoshuaKGoldberg
Copy link
Member

This should be fixed in @typescript-eslint/eslint-plugin@5.35.1! ✨ Please update all packages under @typescript-eslint/ in your package.jsons to the latest version, same version.

If this exact issue is still happening for you, please go through https://github.com/typescript-eslint/typescript-eslint/issues/new/choose to file a new issue. Be sure to check all versions of your installed packages.

Thanks for your patience all - and apologies again for the disruption! ❤️

FoRVaiS added a commit to FoRVaiS/node-typescript-template that referenced this issue Aug 24, 2022
The latest update fixes the "can't resolve reference" console spam

typescript-eslint/typescript-eslint#5525
0xMirim added a commit to 0xMirim/yearn-vaults-descriptions that referenced this issue Aug 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.