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

Add --report-unused-disable-directives to lint:eslint #812

Merged
merged 1 commit into from
Dec 6, 2022

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Dec 6, 2022

🌟 What is the purpose of this PR?

This PR makes sure that yarn lint:eslint does not exits with 0 if there are unused ESLint disable comments left in the codebase. These comments should be automatically removed on save because we have reportUnusedDisableDirectives: true in our base ESLint config. However, when we do bulk-edits, unused directives may remain as warnings and not fail the CI.

🔗 Related links

🐾 Next steps

If there is support for reportUnusedDisableDirectives: "error" upstream, we can remove the CLI option.

🛡 What tests cover this?

I tested the option manually by adding // eslint-disable-next-line in a random place. yarn fix:eslint worked equally with and without the CLI option so I only added it for lint:eslint.

@github-actions github-actions bot added area: apps > site The blockprotocol.org website, inc. Hub (app) area: apps Relates to non-content work in `apps` (area) area: crates area: libs > @local/* Affects packages in the `@local` namespace (library) area: libs > @Þ/core Affects the `@blockprotocol/core` package (library) area: libs > @Þ/graph Affects the `@blockprotocol/graph` package (library) area: libs > @Þ/hook Affects the `@blockprotocol/hook` package (library) area: libs > block-template-react Affects the `block-template-react` package (library) area: libs > block-template-html Affects the `block-template-html` package (library) area: libs > block-template-custom-element Affects the `block-template-custom-element` package (library) area: libs > block-scripts Affects the `block-scripts` package (library) area: libs > blockprotocol Affects the `blockprotocol` package (library) area: libs > create-block-app Affects the `create-block-app` package (library) area: libs > mock-block-dock Affects the `mock-block-dock` package (library) labels Dec 6, 2022
@kachkaev kachkaev marked this pull request as ready for review December 6, 2022 18:05
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #812 (d9443c5) into main (e5a1e7d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #812   +/-   ##
=======================================
  Coverage   62.56%   62.56%           
=======================================
  Files         271      271           
  Lines        4266     4266           
  Branches     1004     1004           
=======================================
  Hits         2669     2669           
  Misses       1257     1257           
  Partials      340      340           
Flag Coverage Δ
site-integration-chrome 61.50% <ø> (+0.02%) ⬆️
site-integration-firefox 61.53% <ø> (-0.17%) ⬇️
site-integration-iphone 57.07% <ø> (+0.02%) ⬆️
site-integration-pixel 59.44% <ø> (+0.02%) ⬆️
site-integration-safari 56.68% <ø> (-0.92%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@kachkaev kachkaev enabled auto-merge (squash) December 6, 2022 18:17
@kachkaev kachkaev merged commit 6811ebf into main Dec 6, 2022
@kachkaev kachkaev deleted the ak/report-unused-disable-directives branch December 6, 2022 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: apps > site The blockprotocol.org website, inc. Hub (app) area: apps Relates to non-content work in `apps` (area) area: libs > block-scripts Affects the `block-scripts` package (library) area: libs > block-template-custom-element Affects the `block-template-custom-element` package (library) area: libs > block-template-html Affects the `block-template-html` package (library) area: libs > block-template-react Affects the `block-template-react` package (library) area: libs > blockprotocol Affects the `blockprotocol` package (library) area: libs > @Þ/core Affects the `@blockprotocol/core` package (library) area: libs > create-block-app Affects the `create-block-app` package (library) area: libs > @Þ/graph Affects the `@blockprotocol/graph` package (library) area: libs > @Þ/hook Affects the `@blockprotocol/hook` package (library) area: libs > @local/* Affects packages in the `@local` namespace (library) area: libs > mock-block-dock Affects the `mock-block-dock` package (library)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants