Is always attempting to format node_modules
See original GitHub issueeven when I try explicitly ignoring the folder
scripts: {
"format": "prettier-eslint \"./**/*.js\" --ignore \"./node_modules/**\" --write"
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Why do Node modules go into .staging folder? - Stack Overflow
I have an Electron app that I'm trying to install node modules for. When I run npm install , it creates the node_modules...
Read more >cannot find module [Node npm Error Solved] - freeCodeCamp
If you get this error, the solution is always in the error. The module (package) not found is always specified in the format...
Read more >How To Use Node.js Modules with npm and package.json
The Node.js Package Manager (npm) is the default and most popular ... JSON is a standard format used for sharing, based on JavaScript ......
Read more >CommonJS modules | Node.js v19.3.0 Documentation
When a file is run directly from Node.js, require.main is set to its module . That means that it is possible to determine...
Read more >Documentation - ECMAScript Modules in Node.js - TypeScript
This setting controls whether .js files are interpreted as ES modules or CommonJS modules, and defaults to CommonJS when not set. When a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I am also running into this issue. An initial poke at the source code seems to indicate that
prettier-eslint-cliis honoring the.eslintignorefile that is shipped with installed NPM modules. I added someconsole.infos insideisFilePathMatchedByEslintignore, just before thereturn, and here is a snippet of the output:You can see when the parser is looping through
punycode, it is using the project.eslintignore. But when its looping througfsevents, it picks up the.eslintignorefile contained in thefseventsmodule which is configured only to ignore its owndistdirectory.Because
fseventsisn’t ignoringnode_moduleson its own,prettier-eslint-clistarts to process all of the dependencies offsevents.I want to say that the way
prettier-eslint-clitreats nested.eslintignorepaths seems like a bug to me. I would think that the project settings should trump anything nested within it. Is this the expected behavior?It’s unclear this is an issue with the package. Feel free to investigate further.