Skip to content

Support Configuration Overrides for the experimental cli. #70

@Standard8

Description

@Standard8

I've been trying out the new experimental CLI, and it is indeed seeming to be a lot faster.

Something I've noticed is that it appears there's no current support for Configuration Overrides. I suspect it just hasn't been added yet, which is fine, but as I couldn't see an existing issue for it, I thought I'd file one for helping with tracking.

STR

  1. Set up a repo with a .prettierrc.js such as the one below:
module.exports = {
  arrowParens: "avoid",
  endOfLine: "lf",
  printWidth: 80,
  tabWidth: 2,
  trailingComma: "es5",
  overrides: [
    {
      files: "*.css",
      options: {
        parser: "css",
        // Using a larger printWidth to avoid wrapping selectors.
        printWidth: 160,
      },
    },
  ],
};
  1. Run the formatter

Expected Results

The CSS files are formatted correctly, with line width 160.

Actual Results

The CSS files are formatted with line width 80.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions