Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this codelyzer check seems broken for pipes #145

Closed
xtianus79 opened this issue Nov 10, 2016 · 7 comments
Closed

this codelyzer check seems broken for pipes #145

xtianus79 opened this issue Nov 10, 2016 · 7 comments
Assignees

Comments

@xtianus79
Copy link

when using this command

"use-pipe-transform-interface": false, // what is this -- seems to be broken

it always fails and the code seems correct

@Pipe({name: 'orderByActive'})
export class OrderByActivePipe implements PipeTransform {
@mgechev
Copy link
Owner

mgechev commented Nov 10, 2016

I have the following code:

import { Component, PipeTransform, Pipe } from '@angular/core';
import { Config } from './shared/index';
import './operators';

@Pipe({name: 'orderByActive'})
export class OrderByActivePipe implements PipeTransform {
  transform() {
    return true;
  }
}

It works fine for me. Can you reproduce the issue on http://codelyzer.com?

@xtianus79
Copy link
Author

@mgechev i put it in codelyzer and it says no issue...

however the same error is occuring....

src/app/components/admin/person/order-by-active.pipe.ts[4, 1]: The OrderByActivePipe class has the Pipe decorator, so it should implement the PipeTransform interface

@antonybudianto
Copy link

looks like #142

@khodev
Copy link

khodev commented Nov 12, 2016

npm will install typescript 2.1.x

codelyzer/src/util/syntaxKind.ts > SyntaxKind.current().ImplementsKeyword returns 106 where it should be 107 starting from TypeScript version 2.1.0

The breaking change is here:

microsoft/TypeScript@6814c1d#diff-9a9b25e2950a3c3c611c9e2e095e2e41

before: ImplementsKeyword = 106
after: ImplementsKeyword = 107

@mgechev
Copy link
Owner

mgechev commented Nov 13, 2016

@khodev, thanks for pointing this out! Here's the fix d49cc26.

@xtianus79
Copy link
Author

xtianus79 commented Nov 16, 2016

@mgechev just to ask what is the latest version? I don't see releases...

thanks by the way

@mgechev
Copy link
Owner

mgechev commented Nov 16, 2016

The latest version is beta.4:

npm i codelyzer@1.0.0-beta.4

@mgechev mgechev added this to the Beta 2 - Trichocolea mollissima milestone Nov 23, 2016
@mgechev mgechev self-assigned this Nov 23, 2016
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

No branches or pull requests

3 participants