Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Nov 26 12:00
    scurk1415 commented #1032
  • Nov 20 10:04
    renovate[bot] edited #1016
  • Nov 20 10:03
    renovate[bot] synchronize #986
  • Nov 20 10:03

    renovate[bot] on major-commitlint-monorepo

    chore(deps): update commitlint … (compare)

  • Nov 20 10:02
    renovate[bot] edited #840
  • Nov 20 10:02
    renovate[bot] edited #940
  • Nov 20 10:02
    renovate[bot] synchronize #920
  • Nov 20 10:02

    renovate[bot] on angular-monorepo

    fix(deps): update angular monor… (compare)

  • Nov 20 10:00
    renovate[bot] edited #951
  • Nov 20 10:00
    renovate[bot] edited #943
  • Nov 20 10:00
    renovate[bot] edited #933
  • Nov 20 10:00
    renovate[bot] edited #982
  • Nov 20 10:00
    renovate[bot] edited #934
  • Nov 20 10:00
    renovate[bot] edited #985
  • Nov 20 10:00
    renovate[bot] edited #985
  • Nov 20 10:00
    renovate[bot] synchronize #985
  • Nov 20 10:00

    renovate[bot] on chai-4.x

    chore(deps): update dependency … (compare)

  • Nov 20 09:59
    renovate[bot] edited #944
  • Nov 20 09:59
    renovate[bot] edited #926
  • Nov 20 09:59
    renovate[bot] edited #984
im having a issue
with angular-whitespace in component.ts
hi all.
I write a deliberate wrong test case, run test by 'npm run test'. But Chai pass the wrong case.
I find the reason is that assertFailure in test/testHelper.ts catch the exception and don't continue to throw it.
Did I run the test in wrong way? Thanks for any help.
is there any way to generate and export error report in codelyzer?
Paul King
hi all, great project! Trying to create a custom rule to validate element types a directive is bound to, for the life of me i cannot figure out how to get the parent element type from BoundDirectivePropertyAst anyone know of a way todo this? thanks in advance!
Eduard Paprotski
Hi guys, Anybody faced with the that the i18n rule works incorrectly in cases like here: <span>...</span> for example ?
hi @mgechev
I am having angular 6 application,How to integrate codelyzer in it
Please let me know the steps for it
getting errors below :

The specified path does not exist: 'D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\e2e\tsconfig.e2e.json'.

FatalError: error TS5058: The specified path does not exist: 'D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\e2e\tsconfig.e2e.json'.

at new FatalError (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\tslint\lib\error.js:27:28)
at Function.Linter.createProgram (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\tslint\lib\linter.js:55:19)
at Observable.rxjs_1.Observable.obs [as _subscribe] (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\@angular-devkit\build-angular\src\tslint\index.js:62:44)
at Observable._trySubscribe (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\Observable.js:29:22)
at D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\util\subscribeTo.js:22:31
at Object.subscribeToResult (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\util\subscribeToResult.js:7:45)
at MergeMapSubscriber._innerSub (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\operators\mergeMap.js:75:38)
at MergeMapSubscriber._tryNext (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\operators\mergeMap.js:72:14)
at MergeMapSubscriber._next (D:\javeed\Projects\RandDProjects\EMS - V3 Research\EMS.Client\node_modules\rxjs\internal\operators\mergeMap.js:55:18)
I am using angular 6 in my project
Will Codelyzer supports it ?
Zama Khan Mohammed
Hi Guys, whats the best way to contribute to codelyzer, when developing a new rule, how do you develop it, do you run test:watch, and how exactly do you only watch the rule you are working on?
I do not see any steps in the contributing.md file
Hi guys I want to order my methods so that lifecycle methods remain together
is there any way to do that
Michael Frank

Hi :)

I recently updated codelyzer to version 5.0.1 and added the 'no-inputs-metadata-property" rule. But now my IDE (IntelliJ) is throwing the following error

TypeError: Cannot read property 'Input' of undefined
    at /workspace/terra-components/node_modules/codelyzer/noInputsMetadataPropertyRule.js:38:798
    at Object.<anonymous> (/workspace/terra-components/node_modules/codelyzer/noInputsMetadataPropertyRule.js:45:2)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
    at Function.Module._load (internal/modules/cjs/loader.js:598:3)
    at Module.require (internal/modules/cjs/loader.js:705:19)
    at require (internal/modules/cjs/helpers.js:14:16)
    at loadRule (/usr/local/lib/node_modules/tslint/lib/ruleLoader.js:102:12)
Process finished with exit code -1

Am I doing something wrong?

Eduard Paprotski
@mgechev Hi, maybe do you have any plans to add ngx-translate linter rules?
Akash Pius
@mgechev Hi, is Angular 7 and is suported by codelyzer
@mgechev will codelyzer supports to angular 7 and 8 versions
Bhargava Ramu Ch.S.S
Hey guys .. I am trying to use codelyzer for my project. I followed the custom setup by doing npm i codelyzer tslint and I created tslint.json where my node_modules folder is. I also replaced rulesDirectory to "node_modules/codelyzer" from "codelyzer"
When I rum "./node_modules/.bin/tslint" -c tslint.json "src\app\app.component.ts" .. it shows no linting errors .. but in editor it highlights as error
For that I configured settings.json as
    "tslint.rulesDirectory": "./node_modules/codelyzer",
    "typescript.tsdk": "node_modules/typescript/lib",
But still it highlights error. Is there anything more I need to do?
It shows .."AppComponent" should have prefix "app" .. where as my tslint.json has the rule "component-selector": [true, "element", "sg", "kebab-case"],
Bhargava Ramu Ch.S.S
I just realized that src/tslint.json is overriding my tslint.json in my project. It has nothing to do with codelyzer. I found the suggestion here https://github.com/mgechev/codelyzer/issues/620#issuecomment-394474543
Hello. I have problem with codelizer.
Ofir Fridman
Is there an option to create a custom codelyzer rules?
Piotr Żurek
Hi all, is there any way to enable HTML template checks in WebStorm/ IntelliJ? I see warnings in ts files, I can run ng lint and errors are displayed but I can't find way to highlight errors in IDE.
@jura120596 Fix typo in codelyzer package
Dariusz Rumiński
Hey! first of all, great repo!
I would love to ask a thing - I do know that @Injectable is not needed for every single service. Does adding it even when it's not needed do any harm? A rule of "always adding" can prevent Dependency Injection issues for less experience developers. Is there a rule for adding(/or not adding) the @Injectable for services ?
Malcolm B Anderson
I'm new to Angular but not static code analysis. Is there some kind of "complete idiots guide to codelyzer"
What I'm expecting to find is something that will get me my lines of code / per method / per class
Plus, some measure of code duplication (I've found 21 copies of the same 15 lines of code in one project)
And then cyclomatic complexity
Am I going to get that kind of detail out of Codelyzer.
I believe that we have a small ton of technical debt in our code, but I can't prove it.
Anyway, I'm looking for a video of someone taking an existing project, adding codelyzer, running the static code analysis and then reviewing the reports. Has someone done that?
Sander van Belleghem

Hi all, I was wondering if it's possible to export data like @MalcolmAnderson suggested, so I can create an custom dashboard for all my projects. What I want to acchieve is for all my angular projects have analysis run about the code quality and suchs.

This is gonna be an step in the pipeline we setup in gitlab, but I want the results available externaly, so that everytime we push something to git, we dont have to look per project at gitlab what the results are, but just look at 1 dashboard which collects and presents all the data.

Martin Bianchi
Hi all, anyone has troubles with the latest typescript version (3.7.4) and the rule "prefer-inline-decorators" ? It was throwing an error on all the Input and Output decorators, says "Cannot read property kind of undefined"
Hey, I was looking for some static analyzing tools for Angular which could also generate reports (Got a big project, wanna check for God classes, bad dependencies etc). Can codelyzer do that? Any other suggestions?
Maxime Gir
Hey, I was wondering where to find the angular version compatibility list with codelizer, to find which codelyzer version works best with a specific version of angular
Dariusz Rumiński
i guess this gitter groups is dead. plenty of users, but only new questions from time to time is asked and nobody answers
Minko Gechev

Yes, I'm not actively visiting gitter. Just to answer few questions:

@MaximeGir latest version of codelyzer should work with all previous versions as well. There are some compatibility checks happening in the packages which introduce the Angular integration.

@taigi100 yes, with a custom tslint reporter you can format the output however you like.

@martinbianchi it'll be best if you open an issue in github.com/mgechev/codelyzer

@SvanBelleghem_twitter yes, custom reporter will be the right answer here as well.