Skip to content

Failed to load plugin '@angular-eslint' declared in '.eslintrc.json#overrides[0]': Class extends value undefined is not a constructor or nul #4013

Closed
@KrakenTyio

Description

@KrakenTyio

I have this issue after upgradin to ts-eslint 5.0.0

eslint/eslint#15149 they forward me here

log

TypeError: Failed to load plugin '@angular-eslint' declared in '.eslintrc.json#overrides[0]': Class extends value undefined is not a constructor or null
Referenced from: /home/stano/projects/docker/cross-app/.eslintrc.json

TypeError: Failed to load plugin '@angular-eslint' declared in '.eslintrc.json#overrides[0]': Class extends value undefined is not a constructor or null
Referenced from: /home/stano/projects/docker/cross-app/.eslintrc.json
    at Object.<anonymous> (/home/stano/projects/docker/cross-app/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/CLIEngine.js:12:34)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/stano/projects/docker/cross-app/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/index.js:14:14)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
Process finished with exit code -1
"dependencies": {
    "@agm/core": "~3.0.0-beta.0",
    "@angular/animations": "~12.2.10",
    "@angular/cdk": "~12.2.9",
    "@angular/common": "~12.2.10",
    "@angular/compiler": "~12.2.10",
    "@angular/core": "~12.2.10",
    "@angular/elements": "~12.2.10",
    "@angular/forms": "~12.2.10",
    "@angular/localize": "~12.2.10",
    "@angular/platform-browser": "~12.2.10",
    "@angular/platform-browser-dynamic": "~12.2.10",
    "@angular/router": "~12.2.10",
    "@ckeditor/ckeditor5-angular": "~2.0.2",
    "@ckeditor/ckeditor5": "bart-sk/ckeditor5",
    "@formio/angular": "~5.1.1",
    "@ngrx/effects": "~12.4.0",
    "@ngrx/store": "~12.4.0",
    "@sentry/angular": "~6.13.3",
    "@sentry/tracing": "~6.13.3",
    "@syncfusion/ej2-angular-documenteditor": "~19.3.45",
    "angular-email-editor": "~0.9.0",
    "core-js": "~3.18.3",
    "create-hmac": "~1.1.7",
    "croppie": "~2.6.5",
    "dom-autoscroller": "~2.3.4",
    "dwt": "~17.1.12",
    "file-saver": "~2.0.5",
    "formiojs": "~4.13.7",
    "lodash-es": "~4.17.21",
    "luxon": "~2.0.2",
    "md5": "~2.3.0",
    "moment": "~2.29.1",
    "moment-timezone": "~0.5.33",
    "ngx-clipboard": "~14.0.1",
    "ngx-stripe": "~12.5.0",
    "node-interval-tree": "~1.3.3",
    "normalize.css": "~8.0.1",
    "pdfmake": "~0.2.2",
    "perfect-scrollbar": "~1.5.2",
    "resize-observer-polyfill": "~1.5.1",
    "rrule": "~2.6.8",
    "rxjs": "~6.6.7",
    "socket.io-client": "~4.3.0",
    "sortablejs": "~1.14.0",
    "trust1connector": "~3.0.0",
    "tslib": "~2.3.1",
    "xlsx": "~0.17.3",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-builders/custom-webpack": "~12.1.3",
    "@angular-devkit/build-angular": "~12.2.10",
    "@angular-eslint/builder": "~12.5.0",
    "@angular-eslint/eslint-plugin": "~12.5.0",
    "@angular-eslint/eslint-plugin-template": "~12.5.0",
    "@angular-eslint/schematics": "~12.5.0",
    "@angular-eslint/template-parser": "~12.5.0",
    "@angular/cli": "~12.2.10",
    "@angular/compiler-cli": "~12.2.10",
    "@angular/language-service": "~12.2.10",
    "@ngrx/store-devtools": "~12.4.0",
    "@ngtools/webpack": "~12.2.10",
    "@sentry/cli": "~1.69.1",
    "@stripe/stripe-js": "~1.19.1",
    "@testing-library/angular": "~10.11.0",
    "@testing-library/user-event": "~13.3.0",
    "@types/core-js": "~2.5.5",
    "@types/create-hmac": "~1.1.0",
    "@types/croppie": "~2.6.1",
    "@types/dwt": "~16.1.2",
    "@types/file-saver": "~2.0.3",
    "@types/googlemaps": "~3.43.3",
    "@types/jasmine": "~3.9.1",
    "@types/jasminewd2": "~2.0.10",
    "@types/karma": "~6.3.1",
    "@types/lodash-es": "~4.17.5",
    "@types/md5": "~2.3.1",
    "@types/mocha": "~9.0.0",
    "@types/modernizr": "~3.5.3",
    "@types/node": "~16.11.0",
    "@types/pdfmake": "~0.1.19",
    "@types/sortablejs": "~1.10.7",
    "@types/svg-sprite-loader": "~3.9.4",
    "@types/webpack-dev-server": "~4.3.1",
    "@types/webpack-env": "~1.16.3",
    "@types/youtube": "~0.0.46",
    "@typescript-eslint/eslint-plugin": "~5.0.0",
    "@typescript-eslint/parser": "~5.0.0",
    "chalk": "~4.1.2",
    "codelyzer": "~6.0.2",
    "cross-env": "~7.0.3",
    "eslint": "~8.0.1",
    "eslint-config-prettier": "~8.3.0",
    "eslint-plugin-ngrx": "~1.46.2",
    "eslint-plugin-prettier": "~4.0.0",
    "eslint-plugin-rxjs": "~3.3.7",
    "eslint-plugin-rxjs-angular": "~1.0.6",
    "husky": "~7.0.2",
    "is-docker": "~3.0.0",
    "jasmine": "~3.10.0",
    "jasmine-core": "~3.10.0",
    "jasmine-reporters": "~2.5.0",
    "jasmine-spec-reporter": "~7.0.0",
    "junit": "~1.4.9",
    "karma": "~6.3.4",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage": "~2.0.3",
    "karma-jasmine": "~4.0.1",
    "karma-jasmine-html-reporter": "~1.7.0",
    "karma-junit-reporter": "~2.0.1",
    "karma-mocha-reporter": "~2.2.5",
    "karma-parallel": "~0.3.1",
    "karma-selenium-webdriver-launcher": "~0.0.4",
    "lint-staged": "~11.2.3",
    "mobile-detect": "~1.4.5",
    "moment-locales-webpack-plugin": "~1.2.0",
    "moment-timezone-data-webpack-plugin": "~1.5.0",
    "ngx-i18nsupport": "~0.17.1",
    "prettier": "~2.4.1",
    "protractor": "~7.0.0",
    "protractor-beautiful-reporter": "~1.3.6",
    "protractor-fail-fast": "~3.1.0",
    "sass": "~1.43.2",
    "source-map-support": "~0.5.20",
    "stylelint": "~13.13.1",
    "stylelint-config-prettier": "~9.0.3",
    "stylelint-config-standard": "~22.0.0",
    "svg-sprite-loader": "~6.0.9",
    "svg-transform-loader": "~2.0.13",
    "svgo": "~2.7.0",
    "svgo-loader": "~3.0.0",
    "typescript": "~4.3.5",
    "url-loader": "~4.1.1",
    "xliffsplit": "KrakenTyio/xlifsplit"
  }

.eslintrc.json

{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
  {
    "files": ["*.ts"],
    "parserOptions": {
      "project": ["tsconfig.json", "tsconfig.spec.json", "e2e/tsconfig.json"],
      "createDefaultProgram": true
    },
    "extends": [
      "plugin:@typescript-eslint/recommended",
      "plugin:@typescript-eslint/recommended-requiring-type-checking",
      "plugin:@angular-eslint/recommended",
      "plugin:@angular-eslint/template/process-inline-templates",
      "plugin:rxjs/recommended",
      "plugin:ngrx/recommended",
      "plugin:prettier/recommended"
    ],
    "plugins": ["rxjs", "rxjs-angular", "ngrx"],
    "rules": {
      "no-console": [
        "error",
        {
          "allow": ["error"]
        }
      ],
      "dot-notation": "off",
      "@typescript-eslint/dot-notation": [
        "error",
        {
          "allowPrivateClassPropertyAccess": true,
          "allowProtectedClassPropertyAccess": true
        }
      ],
      "@typescript-eslint/explicit-module-boundary-types": "off",
      "@typescript-eslint/unbound-method": [
        "error",
        {
          "ignoreStatic": true
        }
      ],
      "@typescript-eslint/no-floating-promises": "off",
      "@angular-eslint/component-max-inline-declarations": [
        "error",
        {
          "animations": 20,
          "styles": 8,
          "template": 25
        }
      ],
      "@angular-eslint/component-selector": [
        "error",
        {
          "type": "element",
          "prefix": "",
          "style": "kebab-case"
        }
      ],
      "@angular-eslint/directive-selector": [
        "error",
        {
          "type": "attribute",
          "prefix": "",
          "style": "camelCase"
        }
      ],
      "@angular-eslint/prefer-on-push-component-change-detection": "warn",
      "rxjs-angular/prefer-takeuntil": "warn",
      "prettier/prettier": "off"
    }
  },
  {
    "files": ["*.html"],
    "extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
    "rules": {
      "@angular-eslint/template/i18n": [
        "off",
        {
          "checkId": true,
          "checkText": true,
          "checkAttributes": false
        }
      ],
      "@angular-eslint/template/conditional-complexity": [
        "warn",
        {
          "maxComplexity": 10
        }
      ],
      "@angular-eslint/template/cyclomatic-complexity": [
        "warn",
        {
          "maxComplexity": 10
        }
      ],
      "@angular-eslint/template/no-positive-tabindex": "warn",
      "@angular-eslint/template/use-track-by-function": "warn",
      "@angular-eslint/template/no-call-expression": "warn",
      "prettier/prettier": "off"
    }
  }
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-plugin-tslintIssues related to @typescript-eslint/eslint-plugin-tslintworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions