Skip to content

Conversation

@Zamiell
Copy link
Contributor

@Zamiell Zamiell commented Oct 6, 2025

This is a follow-up to my previous PR.

Hopefully all changes should be obvious, if not I can elaborate further. The PR looks bigger than it really is because I had to change from sync --> async.

Note that the PR is failing lint because of test coverage, but IMHO adding tests for a Prettier config seems anti-value to the codebase, since there are many different types of Pretter configs (cjs/mjs/json/yaml). The code seems already straightforward enough.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

I don't see a "re-request review" button, so I'll comment here that I implemented your proposed change now.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

I addressed your previous comment in my last two commits, which:

  • Added 3 tests for "lf" and "crlf" inside the Prettier config.
  • Refactored the tests to all be in the same file, since they are all testing the getEndOfLine function.

Edit - Let me look into the rest of the CI failures.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

It looks like the snapshots are failing now since I moved the file where the tests are located. Do you know how to fix that?

Edit - Nevermind, I just blew away the existing snapshot. Now I have 1 test error left to debug on my side.

@bmish bmish changed the title feat: use Prettier to detect end of line feat: use Prettier to detect end of line in addition to EditorConfig Oct 6, 2025
@bmish bmish added the enhancement New feature or request label Oct 6, 2025
@bmish
Copy link
Owner

bmish commented Oct 6, 2025

Awesome. Can you add "Fixes #x" to link any issues fixed by this in the PR description?

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

I don't actually think that this PR fixes any issues/bugs. It may help with #725 and #726, but I don't think it fixes either one.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

By the way, I would actually guess that my last PR (#802) fixes #726, but we would need to confirm with MikeMcC399.

Copy link
Owner

@bmish bmish left a comment

Choose a reason for hiding this comment

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

Thanks!

@bmish bmish merged commit c0ad58b into bmish:main Oct 6, 2025
13 checks passed
@bmish
Copy link
Owner

bmish commented Oct 6, 2025

@Zamiell do you have any other immediate improvements planned now or should I publish the release?

@Zamiell Zamiell deleted the fix-newline-issue-2 branch October 6, 2025 18:04
@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

I do have immediate improvements but wouldn't it be best to release anyway? I think some open source projects (like eslint-plugin-jsdoc) automatically publish in-between every PR, which makes it easier for end-users to test for regressions (i.e. Alice reports that 8.1.3 broke something but 8.1.2 works fine, and then you would know it was from an exact PR).

@bmish
Copy link
Owner

bmish commented Oct 6, 2025

Yes that's fine. I'll publish now.

@Zamiell
Copy link
Contributor Author

Zamiell commented Oct 6, 2025

@bmish Sounds good. Also, can you respond to this? #347 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants