Skip to content

feat: add excludeFromChecks config property#235

Draft
rainerhahnekamp wants to merge 1 commit intosoftarc-consulting:mainfrom
rainerhahnekamp:feat/exclude-from-checks
Draft

feat: add excludeFromChecks config property#235
rainerhahnekamp wants to merge 1 commit intosoftarc-consulting:mainfrom
rainerhahnekamp:feat/exclude-from-checks

Conversation

@rainerhahnekamp
Copy link
Collaborator

Closes #234

@sonarqubecloud
Copy link

@checkmatez
Copy link

This feature would be greatly appreciated. Any status updates?

@kiss-bence-gde-mit
Copy link

When will this happen?

My project has a very simple configuration yet it shows node_modules in listing which is annoying

Config:

import { SheriffConfig, anyTag, sameTag } from '@softarc/sheriff-core';

export const config: SheriffConfig = {
  excludeRoot: true,
  enableBarrelLess: true,
  entryFile: 'src/main.ts',
  modules: {
    'src/app': {
      'features/<feature>': 'feature:<feature>',
      core: 'core',
      shared: 'shared',
    },
    'api/<api>': 'api:<api>',
  },
  depRules: {
    root: [sameTag, anyTag],
    noTag: [sameTag],
    'feature:*': [sameTag, 'core', 'shared'],
    core: [anyTag],
    shared: [anyTag],
    'api:*': [anyTag],
  },
};

List result:

sheriff list

This project contains 81 modules:

. (root)
├── src\app\shared (shared)
├── api\odin (api:odin)
├── node_modules@babel\core\src\config\files (noTag)
├── node_modules@mswjs\interceptors\src (noTag)
├── node_modules@mswjs\interceptors\src\interceptors\ClientRequest (noTag)
├── node_modules@mswjs\interceptors\src\interceptors\fetch (noTag)
├── node_modules@mswjs\interceptors\src\interceptors\WebSocket (noTag)
├── node_modules@mswjs\interceptors\src\interceptors\XMLHttpRequest (noTag)
├── node_modules@mswjs\interceptors\src\utils\node (noTag)
├── node_modules@pnpm\config.env-replace (noTag)
├── node_modules@pnpm\network.ca-file (noTag)
├── node_modules\ajv\lib\compile\codegen (noTag)
├── node_modules\ajv\lib\compile (noTag)
├── node_modules\ajv\lib\compile\validate (noTag)
├── node_modules\ajv\lib\refs\json-schema-2019-09 (noTag)
├── node_modules\ajv\lib\refs\json-schema-2020-12 (noTag)
├── node_modules\ajv\lib\standalone (noTag)
├── node_modules\ajv\lib\types (noTag)
├── node_modules\ajv\lib\vocabularies\applicator (noTag)
├── node_modules\ajv\lib\vocabularies\core (noTag)
├── node_modules\ajv\lib\vocabularies\discriminator (noTag)
├── node_modules\ajv\lib\vocabularies\dynamic (noTag)
├── node_modules\ajv\lib\vocabularies\format (noTag)
├── node_modules\ajv\lib\vocabularies\jtd (noTag)
├── node_modules\ajv\lib\vocabularies\unevaluated (noTag)
├── node_modules\ajv\lib\vocabularies\validation (noTag)
├── node_modules\ajv-formats\src (noTag)
├── node_modules\comment-parser\src (noTag)
├── node_modules\comment-parser\src\parser (noTag)
├── node_modules\comment-parser\src\parser\tokenizers (noTag)
├── node_modules\comment-parser\src\stringifier (noTag)
├── node_modules\comment-parser\src\transforms (noTag)
├── node_modules\compare-versions\src (noTag)
├── node_modules\css-select\src (noTag)
├── node_modules\css-select\src\pseudo-selectors (noTag)
├── node_modules\css-what\src (noTag)
├── node_modules\eslint-interactive\src\action (noTag)
├── node_modules\eslint-interactive\src\fix (noTag)
├── node_modules\eslint-interactive\src\formatter (noTag)
├── node_modules\eslint-interactive\src (noTag)
├── node_modules\eslint-interactive\src\scene (noTag)
├── node_modules\eventsource\src (noTag)
├── node_modules\eventsource-parser\src (noTag)
├── node_modules\html-entities\src (noTag)
├── node_modules\htmlparser2\node_modules\entities\src (noTag)
├── node_modules\htmlparser2\src (noTag)
├── node_modules\jsdoc-type-pratt-parser\src (noTag)
├── node_modules\msw\src\browser (noTag)
├── node_modules\msw\src\core (noTag)
├── node_modules\msw\src\iife (noTag)
├── node_modules\msw\src\native (noTag)
├── node_modules\msw\src\node (noTag)
├── node_modules\parse5\node_modules\entities\src (noTag)
├── node_modules\parse5-html-rewriting-stream\node_modules\entities\src (noTag)
├── node_modules\piscina\src (noTag)
├── node_modules\piscina\src\task_queue (noTag)
├── node_modules\piscina\src\worker_pool\balancer (noTag)
├── node_modules\piscina\src\worker_pool (noTag)
├── node_modules\rettime\src (noTag)
├── node_modules\rxjs\src\ajax (noTag)
├── node_modules\rxjs\src\fetch (noTag)
├── node_modules\rxjs\src (noTag)
├── node_modules\rxjs\src\operators (noTag)
├── node_modules\rxjs\src\testing (noTag)
├── node_modules\rxjs\src\webSocket (noTag)
├── node_modules\tldts (noTag)
├── node_modules\tldts-core (noTag)
├── node_modules\until-async\src (noTag)
├── node_modules\zod\src (noTag)
├── node_modules\zod\src\locales (noTag)
├── node_modules\zod\src\mini (noTag)
├── node_modules\zod\src\v3\benchmarks (noTag)
├── node_modules\zod\src\v3 (noTag)
├── node_modules\zod\src\v4\classic (noTag)
├── node_modules\zod\src\v4\core (noTag)
├── node_modules\zod\src\v4 (noTag)
├── node_modules\zod\src\v4\locales (noTag)
├── node_modules\zod\src\v4\mini (noTag)
├── node_modules\zod\src\v4-mini (noTag)
├── node_modules\zod-to-json-schema\dist-test-v3\types (noTag)
└── node_modules\zod-to-json-schema\dist-test-v4\types (noTag)

@HermannBjorgvin
Copy link

+1 this would be nice to have, the sheriff is checking my .vscode/chrome folder where I keep the user directory for my browser I use for debugging. Would be much appreciated to get this version

@rainerhahnekamp
Copy link
Collaborator Author

@kiss-bence-gde-mit

Exclusion from node_modules will be enabled by default. I have to verify that there aren't some edge cases, where node_modules is actually a source folder and has to be importet (honestly, I am pretty sure that there is none).

@HermannBjorgvin

Got it. In your case though, I think the proper place should be the ESLint config because I don't think your source code has imports to .vscode. So there should be some entry in the documentation which explains the ESLint approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: Add excludeFromChecks

4 participants