Comments (4)
@chimericdream You can write a glob expression to do this, and there is a similar example in the documentation:
To exclude tests folder in src, use the glob expression src/!(tests)/**/ to get the target folders.
from eslint-plugin-check-file.
That works well enough if you know the precise location of the file or folder you want to ignore, but in our case we want to ignore all __mocks__
directories in a monorepo, regardless of whether they are at package/src/__mocks__
, package/test/__mocks__
, package/__mocks__
, etc. I didn't think glob matching could do that kind of complex wildcard.
from eslint-plugin-check-file.
Here is a screenshot of an example glob that would exclude __mocks__
directories at the lowest level in the folder structure, but nowhere else. I tried variations on this pattern to see if I could match the files on top without including any of the paths on bottom, but was unable to find a valid pattern.
from eslint-plugin-check-file.
@chimericdream Could you share a minimal reproducible monorepo project so I can work on this? And it look like there is a way to work round this issue #38 (comment).
from eslint-plugin-check-file.
Related Issues (20)
- support multiple wildcard matching HOT 2
- Help with glob syntax (Next.js special routes related) HOT 9
- Question: How to check that there are no folders named "helpers" in the repo HOT 8
- [Bug?] Inconsistent matching patterns for files & folders HOT 10
- [Bug] `check-file/no-index` doesn't check e.g. `index.config.ts` HOT 2
- How to support the configuration of multiple matching rules HOT 3
- folder rule: reported multiple times (once per containing file) HOT 1
- Snake case - files starting with numbers HOT 1
- SubFolder name depending on ParentFolder name HOT 1
- 'KEBAB_CASE' fails on dot notation HOT 7
- Custom error message for filename-naming-convention rule HOT 4
- The new update still requires glob patterns to be matched regardelss of if they are used HOT 2
- Markdown file support HOT 1
- Glob to exclude __tests__ folder is not working as expected HOT 5
- Problem with check-file/folder-naming-convention HOT 1
- check-file/filename-naming-convention application is not working as expected with custom matching HOT 3
- Support for "Flat Config" HOT 4
- Support Next.js pages router naming case for file name HOT 2
- Can't set the file name convention to be with any prefix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint-plugin-check-file.