QuiiBz / sherif

Opinionated, zero-config linter for JavaScript monorepos
MIT License
912 stars 14 forks source link

Sherif not working with pnpm excluded packages #24

Closed lachlancollins closed 1 year ago

lachlancollins commented 1 year ago

Hi @QuiiBz , thanks for creating such an amazing tool! I'm running into a bug using this in the TanStack Query repo.

The pnpm-workspace.yaml file lists excluded packages, shown below:

packages:
  - 'packages/**'
  - 'integrations/**'
  - 'examples/react/**'
  - 'examples/solid/**'
  - 'examples/svelte/**'
  - 'examples/vue/**'
  - '!examples/vue/2*'
  - '!examples/vue/nuxt*'
  - '!packages/react-query/build/**'

Sherif throws the following error:

 ⨯ error Failed to collect packages
   Error while reading "./!examples/vue/2": No such file or directory (os error 2)
QuiiBz commented 1 year ago

Thanks for the kind words! This seems kinda related to #23. Additionally, we don't support yet ! to exclude paths from the workspace, definitely something that should be added.

I'll take a look at both issues this weekend.

QuiiBz commented 1 year ago

Released in https://github.com/QuiiBz/sherif/releases/tag/v0.5.0!