Coder Social home page Coder Social logo

Comments (10)

aleclarson avatar aleclarson commented on September 27, 2024 3

Have you tried adding /node_modules/ to your .gitignore?

from pretty-quick.

KenStipek avatar KenStipek commented on September 27, 2024 1

I was able to get this to work by adding /node_modules to my .prettierignore, but I first had delete the pre-commit hook I had set up and reinstall it by reinstalling husky.
Documented in the hook:

You can reinstall it using 'npm install husky --save-dev' or delete this hook

from pretty-quick.

mledom avatar mledom commented on September 27, 2024

@hansiemithun did you ever figure out what the issue was? I'm having the same issue and I can't figure out how ignore node_modules specifically node_modules/prettier/index.js

from pretty-quick.

kevinsar avatar kevinsar commented on September 27, 2024

@aleclarson @hansiemithun did adding the directory to the .prettierignore file work? Or you can possibly try adding the flag --stage to only target staged files on commits. Those seem to work for me.

from pretty-quick.

hansiemithun avatar hansiemithun commented on September 27, 2024

@mledom, @kevinsar - the .prettierignore did not work for me, I am doing the same. Staging necessary files. Not able to find a solution so far

from pretty-quick.

azz avatar azz commented on September 27, 2024

@hansiemithun this is strange because pretty-quick gets files from git, which should never list node_modules (assuming node_modules is in .gitignore).

Could you run:

$ git ls-files --others --exclude-standard

and

$ git diff --name-only --diff-filter=ACMRTUB $(git merge-base HEAD master)

to check if they output any node_modules?

from pretty-quick.

hansiemithun avatar hansiemithun commented on September 27, 2024

Error doing the second step: @azz - diff: unrecognized option --name-only'`

from pretty-quick.

azz avatar azz commented on September 27, 2024

Sorry I edited my post. Missing the git.

from pretty-quick.

hallya avatar hallya commented on September 27, 2024

@azz I have the same problem, node_modules is not print by any your commands. It is supposed to mean that my config is ok ?

from pretty-quick.

jellyfish-tom avatar jellyfish-tom commented on September 27, 2024

You probably are interested in prettiering only staged files. You can do that by passing --staged flag:

pretty-quick --staged

from pretty-quick.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.