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

refactor: Convert most CommonJS-style import/exports to ESM #1368

Closed
wants to merge 3 commits into from

Conversation

hyperupcall
Copy link

@hyperupcall hyperupcall commented Oct 13, 2023

Short description of what this resolves:

Mixed import/export style makes things a bit more difficult to read because they have mixed semantics. Additionally, the "module style" is compiled down to CommonJS anyways, so there is no practical difference.

This also simplifies the unecessary verbosity of the type imports and require near the top of htmlhint.ts, since we do away with those CommonJS imports.

Proposed changes:

This converts all CommonJS modules in src/ that are able to be convered to static ECMAScript imports (no dynamic import).

@github-actions github-actions bot added the cli Relates to HTMLHint's command-line interface label Oct 13, 2023
@hyperupcall hyperupcall changed the title refactor: convert most CommonJS-style import/exports to ESM refactor: Convert most CommonJS-style import/exports to ESM Oct 13, 2023
@github-actions github-actions bot added the test label Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #1368 (dcf405e) into master (22c5716) will not change coverage.
Report is 4 commits behind head on master.
The diff coverage is n/a.

❗ Current head dcf405e differs from pull request most recent head 6c67a0a. Consider uploading reports for the commit 6c67a0a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1368   +/-   ##
=======================================
  Coverage   99.07%   99.07%           
=======================================
  Files           2        2           
  Lines        1627     1627           
  Branches      332      332           
=======================================
  Hits         1612     1612           
  Misses         15       15           

Continue to review full report in Codecov by Sentry.

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

@github-actions github-actions bot removed the test label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Relates to HTMLHint's command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant