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

Fails when checking code with eslint-disable comments of unknown rules. #100

Closed
brabeji opened this issue Mar 7, 2024 · 4 comments · Fixed by #102
Closed

Fails when checking code with eslint-disable comments of unknown rules. #100

brabeji opened this issue Mar 7, 2024 · 4 comments · Fixed by #102
Labels
bug Something isn't working

Comments

@brabeji
Copy link
Contributor

brabeji commented Mar 7, 2024

When trying to determine which library causes check-es-compat to fail, it's necessary to run it on unminified code. This code can contain eslint-disable disabling rule unknown to es-compat.

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function _eventFromIncompleteOnError(msg, url, line, column) {
...

This causes to fail with Definition for rule not found.

@robatwilliams
Copy link
Owner

Interesting, thanks for reporting.

It seems this has come up with ESLint before in eslint/eslint#14851, but no action was taken.

I think using noInlineConfig in the CLI code should stop it - https://eslint.org/docs/latest/use/configure/rules#disabling-inline-comments https://github.com/robatwilliams/es-compat/blob/master/packages/check-es-compat/bin/cli.mjs

You could try that quickly by modifying the file in your node_modules.

@robatwilliams robatwilliams added the bug Something isn't working label Mar 7, 2024
@brabeji
Copy link
Contributor Author

brabeji commented Mar 7, 2024

@robatwilliams haha I'm just in the middle of creating a PR, just a sec.

@brabeji
Copy link
Contributor Author

brabeji commented Mar 7, 2024

I think using noInlineConfig in the CLI code should stop it

That indeed worked. 👍

@robatwilliams
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants