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

Configuration rules for react broken #244

Closed
nahtnam opened this issue Aug 28, 2024 · 3 comments · Fixed by #245 or #243
Closed

Configuration rules for react broken #244

nahtnam opened this issue Aug 28, 2024 · 3 comments · Fixed by #245 or #243
Assignees
Labels
accepted The issue is accepted and a PR can be proposed. bug Something isn't working

Comments

@nahtnam
Copy link
Contributor

nahtnam commented Aug 28, 2024

Full error:

Oops! Something went wrong! :(

ESLint: 9.9.1

Configuration for rule "@eslint-react/0,off" is invalid. Each rule must have a severity ("off", 0, "warn", 1, "error", or 2) and may be followed by additional options for the rule.

You passed 'undefined', which doesn't contain a valid severity.

If you're attempting to configure rule options, perhaps you meant:

    "@eslint-react/0,off": ["error", undefined]

See https://eslint.org/docs/latest/use/configure/rules#using-configuration-files for configuring rules.

 ELIFECYCLE  Command failed with exit code 2.

Reproduced here: https://codesandbox.io/p/devbox/sheriff-broken-99vwxg

@AndreaPontrandolfo AndreaPontrandolfo added bug Something isn't working accepted The issue is accepted and a PR can be proposed. labels Aug 28, 2024
@AndreaPontrandolfo
Copy link
Owner

Thank you for the report @nahtnam !

I'm investigating. Not sure what's the problem exactly yet, but most likely it's in this piece of code ...rel1cxReact.configs.off,.

In the meantime, as a band aid, setting react: false in the SheriffOptions, will stop the crash.

@AndreaPontrandolfo
Copy link
Owner

It's very strange because the error definitely exist, but for some reason it doesn't manifest in apps\config-validation-playground.

I commented the lines regarding @eslint-react/eslint-plugin, and the error vanished, so that's definitely the culpript.

@AndreaPontrandolfo
Copy link
Owner

Soooo... removing the off configuration and defining the plugin manually fixes the issue.
So the off config is broken, not sure why.

Anyway, i'll bundle the fix with the next release.
Gonna release soon™️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue is accepted and a PR can be proposed. bug Something isn't working
Projects
None yet
2 participants