har17bar
har17bar

Reputation: 884

How can I prevent prettier behavior

i want formating like this

  @Matches(
    /^[a-zA-Z0-9_.-]*$/,{
      message: 'Please try again'
    })

Prettier reformat to

  @Matches(
    /^[a-zA-Z0-9_.-]*$/,
    {
      message: 'Please try again'
    }
  )

I dont want to disable prettier, i have .prettierrc file in root for configuration

Upvotes: 1

Views: 575

Answers (2)

laviRZ
laviRZ

Reputation: 416

You need to edit the .prettierignore file in the root folder.

Upvotes: 1

Deep Shikha
Deep Shikha

Reputation: 21

To exclude files from formatting, add entries to a .prettierignore file in the project root or set the --ignore-path CLI option. .prettierignore uses gitignore syntax.

https://prettier.io/docs/en/ignore.html

Hope this helps.

Upvotes: 1

Related Questions