Skip to content

Prettier cannot be opted out of #36466

Description

@muhamedkarajic

Current Behavior

I remove the prettier library from my package.json as well as .prettierrc & .prettierignore however it does not work, when I do a command like npx nx g @nx/angular:library libs/my-lib its reappering again, even if I set up my config properly in the nx.json

    "@nx/angular:library": {
      "linter": "none",
      "unitTestRunner": "none",
      "skipFormat": true
    },

I understood that "skipFormat": true is not reformatting things? However thats not what I'm looking for, I want my team to use the default vscode formatter because that one is not as aggressive as prettier.

Any clue how to fix it?

Expected Behavior

I would expect there is a way to configure to use the vscode formatter instead of prettier and that all newly created documents are formatted with the formatter I choose, not the one Nx forces me to use.

GitHub Repo

No response

Steps to Reproduce

  1. Setup a new project
  2. Remove prettier
  3. Create a library e.g. npx nx g @nx/angular:library libs/my-lib

As you will see the files .prettierrc & .prettierignore reappear

Nx Report

Node           : 23.11.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 10.22.0
daemon         : Available

nx (global)    : 22.6.4
nx             : 23.1.0
@nx/js         : 23.1.0
@nx/workspace  : 23.1.0
@nx/angular    : 23.1.0
@nx/esbuild    : 23.1.0
@nx/node       : 23.1.0
@nx/web        : 23.1.0
typescript     : 6.0.3

Failure Logs

None.

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions