darraghoriordan / eslint-plugin-nestjs-typed

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

Error loading rule #54

Closed vizardkill closed 1 year ago

vizardkill commented 1 year ago

When executing the ESLint in my NestJS project the following error occurs: image

these are my dependencies: image

Y esta es mi configuracion de ESLint:

module.exports = {
  env: {
    es6: true,
  },
  extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@darraghor/nestjs-typed/recommended',  "plugin:prettier/recommended", "prettier"],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    project: ['./tsconfig.json'],
    sourceType: 'module',
    ecmaVersion: 'es2019',
  },
  rules: {
    eqeqeq: 'off',
    curly: 'error',
    quotes: ['error', 'single'],
    indent: [2, 2, { SwitchCase: 1 }],
    semi: ['error', 'never'],
    'array-callback-return': ['error', { allowImplicit: true }],
    'no-irregular-whitespace': ['error', { skipComments: true, skipRegExps: true, skipTemplates: true }],
    'no-multi-spaces': ['error'],
    'block-spacing': 'error',
    'keyword-spacing': ['error', { before: true, after: true }],
    'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 1, maxBOF: 1 }],
    'sort-imports': [
      'error',
      {
        ignoreCase: true,
        ignoreDeclarationSort: true,
        ignoreMemberSort: false,
        memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple'],
        allowSeparatedGroups: false
      }
    ],
    'object-curly-newline': ['error', { multiline: true }],
    'object-curly-spacing': ['error', 'always'],
    'no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: false }],
    'max-len': ['error', { tabWidth: 4, comments: 120, code: 5000 }],
    '@typescript-eslint/no-explicit-any': 'off',
    'prettier/prettier': [
      'error',
      {
        trailingComma: 'none',
        tabWidth: 2,
        semi: false,
        singleQuote: true,
        parser: 'typescript',
        eslintIntegration: true,
        endOfLine: 'auto',
        printWidth: 160,
        bracketSpacing: true
      }
    ]
  },
  plugins: ['@darraghor/nestjs-typed', 'eslint-plugin-import', 'eslint-plugin-n', 'eslint-plugin-promise'],
  ignorePatterns: ['.eslintrc.js'],
};
vizardkill commented 1 year ago

up

darraghoriordan commented 1 year ago

Without seeing your code i'm not sure what's going on here. The tests we have in place for that rule might give you an idea of what it's expecting though. See https://github.dev/darraghoriordan/eslint-plugin-nestjs-typed/blob/33bd502f5e0d8e0a8ff963a0ff6feded0969621d/src/rules/injectablesShouldBeProvided/injectableShouldBeProvided.test.ts#L1

Let me know if you can identify what you're doing differently and i'll see about fixing or adding an exception for that case.

darraghoriordan commented 1 year ago

closing - no fix