Skip to content

[question] .prettierignore syntax? #2964

@ahmedelgabri

Description

@ahmedelgabri

I'm trying to use .prettierignore file & I'm not sure why it's not working properly? I'm using 1.7.4

.prettierignore

path/to/file.*.js
path/to/another/file.js
path/to/folder/
path/**/to/folder/
*.min.*
public/**/
$ prettier --find-config-path ./
prettier.config.js

prettier.config.js

module.exports = {
  parser: 'flow',
  singleQuote: true,
  printWidth: 120,
  trailingComma: 'es5',
};

if I do this from the command line

$ ./node_modules/.bin/prettier --write path/to/folder/*.js
# all .js files gets formatted although the path is in .prettierignore

I tired --config-precedence file-override|prefer-file but still these files which are inside paths that are ignored are getting formatted. Not sure what is the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliIssues with Prettier's Command Line Interfacelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions