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

docs: fix linebreak-style examples #18262

Merged
merged 1 commit into from Apr 10, 2024
Merged

Conversation

fasttime
Copy link
Member

@fasttime fasttime commented Apr 4, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[X] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

This PR fixes an issue in the examples of the linebreak-style rule, which are supposed to show the differences between Unix style LF line breaks vs. Windows style CRLF line breaks.

Because of our .gitattributes repo settings, CRLF line breaks are converted to LF line breaks automatically, so rule examples with CRLF line breaks are currently broken (link).

To fix the problem, I added a provision to replace LF with CRLF when the is a \r\n sequence at the end of a line in a rule example.

Is there anything you'd like reviewers to focus on?

Any better solution to fix the examples?

@eslint-github-bot
Copy link

Hi @fasttime!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.

  • The commit message tag wasn't recognized. Did you mean "docs", "fix", or "feat"?
  • There should be a space following the initial tag and colon, for example 'feat: Message'.

To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page.

Read more about contributing to ESLint here

@github-actions github-actions bot added the documentation Relates to ESLint's documentation label Apr 4, 2024
Copy link

netlify bot commented Apr 4, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 718d463
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/660ec33301ccf0000826c832
😎 Deploy Preview https://deploy-preview-18262--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fasttime fasttime changed the title fix linebreak-style examples docs: fix linebreak-style examples Apr 4, 2024
@fasttime fasttime marked this pull request as ready for review April 4, 2024 15:26
@fasttime fasttime requested a review from a team as a code owner April 4, 2024 15:26
Copy link
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

LGTM. I'll leave it open for others to review

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM.

@nzakas nzakas merged commit e1e305d into main Apr 10, 2024
19 checks passed
@nzakas nzakas deleted the fix-linebreak-style-examples branch April 10, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

3 participants