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

build: fix lint errors and introduce CI check #1277

Merged
merged 5 commits into from Mar 14, 2022

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Mar 14, 2022

While working on a different task, I tried running npm run lint:fix in hopes of making sure my PR was clean and tidy. It generated ... a lot of unrelated changes. This PR does a few things:

  • Runs npm run lint:fix to capture low hanging fruit
  • Manually fixes issues standard couldn't automatically fix
  • Introduces a new CI check to ensure the linter passes

Happy to discuss any changes!

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #1277 (e6c090c) into main (5a0bf7e) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1277      +/-   ##
==========================================
- Coverage   94.11%   94.11%   -0.01%     
==========================================
  Files          44       44              
  Lines        4097     4096       -1     
==========================================
- Hits         3856     3855       -1     
  Misses        241      241              
Impacted Files Coverage Δ
lib/fetch/index.js 77.66% <ø> (ø)
lib/llhttp/llhttp.wasm.js 100.00% <ø> (ø)
lib/llhttp/llhttp_simd.wasm.js 100.00% <ø> (ø)
lib/pool-stats.js 100.00% <ø> (ø)
lib/balanced-pool.js 97.61% <100.00%> (ø)
lib/core/connect.js 100.00% <100.00%> (ø)
lib/core/util.js 98.47% <100.00%> (ø)
lib/fetch/dataURL.js 96.52% <100.00%> (ø)
lib/fetch/util.js 76.00% <100.00%> (ø)
lib/mock/mock-interceptor.js 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a0bf7e...e6c090c. Read the comment docs.

@JustinBeckwith
Copy link
Contributor Author

I'm at a bit of a loss .... npm run lint passes locally with the latest LTS release, but seems to be not passing in CI!? I'll keep poking, but wondering if others have any ideas.

@KhafraDev
Copy link
Member

KhafraDev commented Mar 14, 2022

sameOrigin is a utility method exported in lib/fetch/util.js; error wasn't caught before because the previous condition isn't possible. It definitely isn't a global 😄.

edit: fixed in 09f00fb?

@JustinBeckwith
Copy link
Contributor Author

yuuuuuup, that was it :) I was thinking "surely this isn't just broken" :)

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 2d7059b into nodejs:main Mar 14, 2022
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants