darraghoriordan / eslint-plugin-nestjs-typed

Some eslint rules for working with NestJs projects
http://www.darraghoriordan.com
171 stars 34 forks source link

filterFromPaths doesn't work #141

Closed kosiakMD closed 8 months ago

kosiakMD commented 8 months ago

I have next rule:

'@darraghor/nestjs-typed/injectable-should-be-provided': [
  'error',
  {
    src: ['src/**/*.ts'],
    filterFromPaths: ['node_modules', '.test.', '.spec.', 'jest.config.ts', 'tsconfig.spec.json', 'tsconfig.scripts.json'],
  },
],

and got next error

> nx run api:lint

Linting "api"...

 >  NX   Error while loading rule '@darraghor/nestjs-typed/injectable-should-be-provided': No files matching 'src/**/*.ts' were found.

   Occurred while linting /..****../..[projectRootfolder]../apps/api/jest.config.ts
   Pass --verbose to see the stacktrace.

--verbose add stacktrace, here is first lines:

Error: Error while loading rule '@darraghor/nestjs-typed/injectable-should-be-provided': All files matched by '**/*.ts' are ignored.
Occurred while linting /..****../..[projectRootfolder]../apps/api/jest.config.ts
    at FileEnumerator.iterateFiles (/..****../..[projectRootfolder]../node_modules/eslint/lib/cli-engine/file-enumerator.js:326:27)