microsoft / parallel-prettier

Concurrent prettier runner
MIT License
203 stars 19 forks source link

Not respecting `.prettierignore` #25

Open thernstig opened 10 months ago

thernstig commented 10 months ago

pprettier does not seem to ignore node_modules by default, but Prettier does that, see https://prettier.io/docs/en/ignore.html.

@mixer/parallel-prettier version 2.0.3 / prettier version 2.8.3

Example output when not having added node_modules to .prettierignore

> pprettier --check "**/*.{css,html,js,json,jsonc,ts,yaml}"
⠸ Starting...
Error: Cannot find module '@ajv-validator/config/prettierrc.json'
Require stack:
- /home/user1/code/dragon/node_modules/prettier/index.js
- /home/user1/code/dragon/node_modules/@mixer/parallel-prettier/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at resolve (node:internal/modules/helpers:187:19)
    at Object.transform (/home/user1/code/dragon/node_modules/prettier/index.js:18421:34)
    at run (/home/user1/code/dragon/node_modules/prettier/third-party.js:8418:53)
    at async cacheWrapper (/home/user1/code/dragon/node_modules/prettier/third-party.js:8294:22)
    at async Explorer.search (/home/user1/code/dragon/node_modules/prettier/third-party.js:8407:24)
    at async Promise.all (index 0) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/user1/code/dragon/node_modules/prettier/index.js',
    '/home/user1/code/dragon/node_modules/@mixer/parallel-prettier/dist/index.js'
  ]
}

Error: Cannot find module '@ajv-validator/config/prettierrc.json'
Require stack:
- /home/user1/code/dragon/node_modules/prettier/index.js
- /home/user1/code/dragon/node_modules/@mixer/parallel-prettier/dist/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at resolve (node:internal/modules/helpers:187:19)
    at Object.transform (/home/user1/code/dragon/node_modules/prettier/index.js:18421:34)
    at run (/home/user1/code/dragon/node_modules/prettier/third-party.js:8418:53)
    at async cacheWrapper (/home/user1/code/dragon/node_modules/prettier/third-party.js:8294:22)
    at async Explorer.search (/home/user1/code/dragon/node_modules/prettier/third-party.js:8407:24)
    at async Promise.all (index 0) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/user1/code/dragon/node_modules/prettier/index.js',
    '/home/user1/code/dragon/node_modules/@mixer/parallel-prettier/dist/index.js'
  ]
}
node_modules/collect-v8-coverage/index.js
node_modules/colord/colord.d.ts
node_modules/colord/index.js
...