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

Deal with unused eslint-disable directives. #3516

Closed
ericpromislow opened this issue Dec 1, 2022 · 2 comments · Fixed by #3653
Closed

Deal with unused eslint-disable directives. #3516

ericpromislow opened this issue Dec 1, 2022 · 2 comments · Fixed by #3653
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@ericpromislow
Copy link
Contributor

ericpromislow commented Dec 1, 2022

Actual Behavior

We're now getting eslint errors about unused eslint-disable-next-line directives.

Steps to Reproduce

Run npm run lint:typescript:nofix

Result

Warnings like

/Users/ericp/workspace/rancher/desktop/pkg/rancher-desktop/utils/childProcess.ts
   18:1  warning  Unused eslint-disable directive (no problems were reported from 'no-redeclare')
  147:1  warning  Unused eslint-disable directive (no problems were reported from 'no-redeclare')

Expected Behavior

We used to not get warnings, although that might have been a mistake if the directive wasn't on.

Rancher Desktop Version

1.7.0 dev

Rancher Desktop K8s Version

Happens on all platforms.

@ericpromislow ericpromislow added the kind/bug Something isn't working label Dec 1, 2022
@ericpromislow ericpromislow self-assigned this Dec 1, 2022
@ericpromislow ericpromislow added this to the Next milestone Dec 1, 2022
@ericpromislow
Copy link
Contributor Author

Upstream bug: nuxt/eslint#243

This bug doesn't affect CI because if these are the only warnings the code emits, it exits with status 0. But if you run eslint with the --report-unused-disable-directives option, you get errors instead of warnings, and the linter exists with status 1. But we don't use that flag anywhere.

I'll push a draft-PR with the changes, but it still doesn't make sense. Maybe some directives aren't taking effect because we haven't enabled the change (see the PR), but when we do enable it, we still get unused-directive warnings.

@ericpromislow
Copy link
Contributor Author

We stopped processing the disable-directives at 2f4887a (Thu Mar 10 15:17:50 2022 -0800) -- the preceding commit 7203f7d might have introduced the problem, but I can't run npm i with it because of dependency problems.

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