question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.prettierignore not picked up when not in root folder

See original GitHub issue

The following folder structure works for the .prettierrc, but the .prettierignore does not apply. Do I need to move the prettier settings to the root of the project? Because this would mean a discrepancy between eslint & prettier. When placed in subfolders, .eslintignore works as expected.

Folder stucture:

- projectdir
  - sub_project1
    - .prittierrc
    - .prittierignore
  - sub_projec2
    - ...
  - sub_projec3
    - ...

The .prettierrc file:

{
  "singleQuote": true,
  "trailingComma": "all"
}

The .prettierignore file:

# Ignore everything, just to test
**/*
*
**

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dguocommented, May 24, 2019

Here is the relevant Prettier issue: https://github.com/prettier/prettier/issues/4081

1reaction
CiGitcommented, Nov 8, 2018

We would implement that if prettier implements it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring Code - Prettier
Use .prettierignore to ignore (i.e. not reformat) certain files and folders completely. Use “prettier-ignore” comments to ignore parts of files.
Read more >
.prettierignore not working | The AI Search Engine You Control
Ignore file in project root as expected by prettier. Both multi-root & non multi-root. Tried everything found in other issues. Open side panel....
Read more >
How can I target a nested directory in .prettierignore?
After some more searching, I found this solution, ... #ignore all /* #but don't ignore files or directories at root called src !/src...
Read more >
Prettier: support .prettierignore : WEB-32711 - YouTrack
json file or is in the root directory of the project (if there is no pacakge.json). This is because the console 'prettier' tool...
Read more >
Prettier - Nova Extensions - Panic Inc.
Supports standard Prettier configuration, and .prettierignore files. ... Fixes project Prettier not getting found when using npm v7.0.0 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found