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

Formatter: Add end of line configuration option #7061

Closed
MichaReiser opened this issue Sep 2, 2023 · 2 comments · Fixed by #7566
Closed

Formatter: Add end of line configuration option #7061

MichaReiser opened this issue Sep 2, 2023 · 2 comments · Fixed by #7566
Assignees
Labels
cli Related to the command-line interface formatter Related to the formatter

Comments

@MichaReiser
Copy link
Member

Add a end-of-line configuration option similar to Prettier and editorconfig that allows configuring the preferred line ending. The option supports the following value:

  • lf [Default]
  • crlf
  • cr
  • Auto

Making Lf the default over Auto is to avoid accidentally mixing line endings in a project see.

@MichaReiser MichaReiser added the formatter Related to the formatter label Sep 2, 2023
@MichaReiser MichaReiser added this to the Formatter: Beta milestone Sep 2, 2023
@MichaReiser MichaReiser added the cli Related to the command-line interface label Sep 2, 2023
@MichaReiser MichaReiser self-assigned this Sep 15, 2023
@jet-c-21
Copy link

jet-c-21 commented Dec 3, 2024

does this feature online right now? how can I set LF as default in my pyproject.toml?

@dhruvmanila
Copy link
Member

@jet-c-21 https://docs.astral.sh/ruff/settings/#format_line-ending

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface formatter Related to the formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants