Codelyzer: "Could not find implementations for the following rules..." Message after upgrading to v5.0.0-beta.1

Created on 18 Mar 2019  路  9Comments  路  Source: mgechev/codelyzer

After upgrading from Version 4.5.0 to Version 5.0.0-beta.1 i recieve the following message when linting my files:

Could not find implementations for the following rules specified in the configuration:
[ERROR]     use-input-property-decorator
[ERROR]     use-output-property-decorator
[ERROR]     use-host-property-decorator
[ERROR] Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
[ERROR] If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.

In Version 4.5.0 linting works without this message. I also updated tslint to v5.14.0 and Angular to v7.2.9.

I am not sure if thats a bug or what i need to do to get rid of this message.

The used tsconfig.json looks like this:

{
  "rulesDirectory": ["node_modules/codelyzer"],
  "extends": ["tslint:recommended", "rxjs-tslint-rules", "tslint-etc", "./tools/pa-rules"],
  "rules": {
    "max-classes-per-file": false,
    "arrow-parens": [true, "ban-single-arg-parens"],
    "trailing-comma": false,
    "interface-name": false,

    "throw-error": true,
    "no-unused-declaration": false,

    "rxjs-add": {
      "severity": "error"
    },
    "rxjs-no-unused-add": {
      "severity": "error"
    },
    "rxjs-no-unsafe-catch": true,
    "rxjs-no-unsafe-switchmap": true,
    "rxjs-finnish": {
      "options": [
        {
          "functions": false,
          "methods": false,
          "parameters": false,
          "properties": false,
          "variables": true
        }
      ],
      "severity": "warn"
    },
    "rxjs-no-deep-operators": true,
    "rxjs-no-internal": true,
    "rxjs-no-operator": true,
    "rxjs-no-patched": true,

    "align": {
      "severity": "warn",
      "options": [true, "parameters", "statements"]
    },
    "comment-format": {
      "options": ["check-space"],
      "severity": "warn"
    },
    "deprecation": {
      "severity": "warn"
    },
    "import-blacklist": [true, "rxjs/Rx"],
    "jsdoc-format": {
      "options": "check-multiline-start"
    },
    "max-line-length": { "severity": "warn", "options": { "limit": 140, "ignore-pattern": "^ *\\*" } },
    "member-access": false,
    "member-ordering": [
      true,
      {
        "order": ["static-field", "instance-field", "constructor", "static-method", "instance-method"]
      }
    ],
    "no-console": {
      "severity": "warn"
    },
    "no-empty": false,
    "no-inferrable-types": [true, "ignore-params", "ignore-properties"],
    "no-non-null-assertion": true,
    "no-string-literal": false,
    "no-switch-case-fall-through": true,
    "no-use-before-declare": false,
    "object-literal-key-quotes": [true, "as-needed"],
    "object-literal-sort-keys": false,
    "ordered-imports": {
      "severity": "warn",
      "options": {
        "import-sources-order": "case-insensitive",
        "module-source-path": "full",
        "named-imports-order": "case-insensitive"
      }
    },
    "quotemark": [true, "single", "avoid-escape"],
    "variable-name": {
      "options": ["ban-keywords", "check-format", "allow-pascal-case", "allow-leading-underscore"]
    },
    "no-consecutive-blank-lines": {
      "severity": "warn"
    },

    "directive-selector": [true, "attribute", "", "camelCase"],
    "component-selector": [true, "element", "pa", "kebab-case"],
    "no-output-on-prefix": true,
    "use-input-property-decorator": true,
    "use-output-property-decorator": true,
    "use-host-property-decorator": true,
    "no-input-rename": false,
    "no-output-rename": false,
    "use-life-cycle-interface": true,
    "use-pipe-transform-interface": true,
    "component-class-suffix": true,
    "directive-class-suffix": true,

    "no-this-assignment": true,
    "no-duplicate-imports": true,
    "no-trailing-whitespace": { "severity": "warn" },
    "space-within-parens": [true, 0],
    "ban-comma-operator": true,
    "no-duplicate-switch-case": true,
    "no-implicit-dependencies": [true, ["app", "environments", "electron"]],
    "prefer-object-spread": true,
    "no-object-literal-type-assertion": true,
    "no-sparse-arrays": true,

    "no-store-injection": {
      "severity": "warn"
    }
  }
}

Most helpful comment

Here are renames that we did:

contextual-life-cycle => contextual-lifecycle
no-conflicting-life-cycle-hooks => no-conflicting-lifecycle
no-life-cycle-call => no-lifecycle-call
use-life-cycle-interface => use-lifecycle-interface
decorator-not-allowed => contextual-decorator
enforce-component-selector => use-component-selector
no-output-named-after-standard-event => no-output-native
use-host-property-decorator => no-host-metadata-property
use-input-property-decorator => no-inputs-metadata-property
use-output-property-decorator => no-outputs-metadata-property
no-queries-parameter => no-queries-metadata-property
pipe-impure => no-pipe-impure
use-view-encapsulation => use-component-view-encapsulation
i18n => template-i18n
banana-in-box => template-banana-in-box
no-template-call-expression => template-no-call-expression
templates-no-negated-async => template-no-negated-async
trackBy-function => template-use-track-by-function
no-attribute-parameter-decorator => no-attribute-decorator
max-inline-declarations => component-max-inline-declarations

I'll update the changelog.

All 9 comments

Here are renames that we did:

contextual-life-cycle => contextual-lifecycle
no-conflicting-life-cycle-hooks => no-conflicting-lifecycle
no-life-cycle-call => no-lifecycle-call
use-life-cycle-interface => use-lifecycle-interface
decorator-not-allowed => contextual-decorator
enforce-component-selector => use-component-selector
no-output-named-after-standard-event => no-output-native
use-host-property-decorator => no-host-metadata-property
use-input-property-decorator => no-inputs-metadata-property
use-output-property-decorator => no-outputs-metadata-property
no-queries-parameter => no-queries-metadata-property
pipe-impure => no-pipe-impure
use-view-encapsulation => use-component-view-encapsulation
i18n => template-i18n
banana-in-box => template-banana-in-box
no-template-call-expression => template-no-call-expression
templates-no-negated-async => template-no-negated-async
trackBy-function => template-use-track-by-function
no-attribute-parameter-decorator => no-attribute-decorator
max-inline-declarations => component-max-inline-declarations

I'll update the changelog.

@mgechev , in the meantime, I'll pin this issue.

Hello @mgechev - did we release the changes? Thanks.

Yes, this we released over a month ago. Try 5.1.0.

Is it maybe possible to change the tslint message so that it shows the new key for a deprecated one?

Is it maybe possible to change the tslint message so that it shows the new key for a deprecated one?

It has to be like so!

I second ganqqwerty's request; if the old value has been deprecrated we should at least be informed of the new value.

I've got no idea how to fix my tslint.config now.

Based upon @mgechev comment above, many names were changed. But when I updated my tslint, it broke on the new names. Here's what I ended up with that appears to be working. That is until another arbitrary name change breaks my ide. Notice the mismash of old and new settings.

"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true

Seriously, can we dispense with this nonsense, and either support both old and new names or provide a migration that renames deprecated settings when updating so that I don't have to spend hours figuring out what happened. I have a job to do, and this kind of thing is a hindrance to my productivity.

@b2k Thank you. Yours worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidanaya picture davidanaya  路  4Comments

mattlewis92 picture mattlewis92  路  5Comments

negberts picture negberts  路  3Comments

wesleycho picture wesleycho  路  3Comments

artaommahe picture artaommahe  路  3Comments