Skip to content

Experimental CLI does not support max_line_length from .editorconfig #71

Description

@HolgerJeromin

Environments:

  • Prettier Version: 3.6.0
  • Running Prettier via: CLI
  • Runtime: Node
  • Operating System: Windows

Steps to reproduce:

..\node_modules\.bin\prettier.cmd --ignore-path ../.prettierignore --write .
and
..\node_modules\.bin\prettier.cmd --ignore-path ../.prettierignore --experimental-cli --write .
produces the same output. Hurray.

But having max_line_length = 120 in .editorconfig is not handled in experimental-cli.

Activity

  1. transferred this issue fromprettier/prettieron Jun 23, 2025
  2. fabiospampinato commented on Jun 23, 2025

    @fabiospampinato
    Collaborator

    Interesting 🤔

    That is indeed not supported at the moment in the thing we are using for parsing .editorconfig files.

    Interestingly there's no mention of this property in EditorConfig's own website, but it seems mentioned in their wiki, that's why I didn't know this existed.

    It should be an easy fix, thanks for reporting the issue 👍

  3. HolgerJeromin commented on Jun 23, 2025

    @HolgerJeromin
    Author

    ref https://prettier.io/docs/options#print-width
    and other references to editorconfig at this page.

  4. fisker commented on Jun 23, 2025

    @fisker
    Member

    While we are on this, please support "off"

    https://github.com/prettier/prettier/blob/75bdb5d5de50308c396657dcbda70b60798f5d09/src/config/editorconfig/editorconfig-to-prettier.js#L48

    Though there is an open issue about this, prettier/prettier#17514, let's just align with the current behavior of Prettier.

  5. fabiospampinato commented on Jun 23, 2025

    @fabiospampinato
    Collaborator

    @fisker is there an issue in editorconfig's repo tracking that? 🤔 Is "off" documented in Prettier's docs?

  6. fisker commented on Jun 23, 2025

    @fisker
    Member

    is there an issue in editorconfig's repo tracking that?

    As far as I know, there is not.

    Is "off" documented in Prettier's docs?

    No, it's undocumented, but it's better to stay the way it works. We properly not going to do anything about prettier/prettier#17514.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions