Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Dec 11 19:04
    renovate[bot] synchronize #920
  • Dec 11 19:04

    renovate[bot] on angular-monorepo

    chore(deps): update angular mon… (compare)

  • Dec 11 08:16
    renovate[bot] edited #937
  • Dec 11 08:16
    renovate[bot] edited #923
  • Dec 11 08:16
    renovate[bot] edited #845
  • Dec 11 08:16
    renovate[bot] edited #840
  • Dec 11 08:16
    renovate[bot] edited #914
  • Dec 11 08:16
    renovate[bot] edited #917
  • Dec 11 08:16
    renovate[bot] edited #926
  • Dec 11 08:16
    renovate[bot] edited #929
  • Dec 11 08:16
    renovate[bot] edited #935
  • Dec 11 08:16
    renovate[bot] edited #834
  • Dec 11 08:16
    renovate[bot] edited #913
  • Dec 11 08:16
    renovate[bot] edited #933
  • Dec 11 08:16
    renovate[bot] edited #934
  • Dec 11 08:16
    renovate[bot] edited #922
  • Dec 11 08:16
    renovate[bot] edited #932
  • Dec 10 19:22
    renovate[bot] synchronize #932
  • Dec 10 19:22
    renovate[bot] edited #932
  • Dec 10 19:22
    renovate[bot] edited #932
@mgechev have you seen the example I've posted above? are there any plans to fix the rules with inheritance? thanks
Sam Grönblom
Hello, I just set up a new project using ng new for testing, but when running ng lint no errors seem to be shown for my template files. What could be wrong?
I'm pretty sure the linting process only covers your .ts files - but not the templates
Sam Grönblom
Well, I found some pages that suggest otherwise: angular/angular-cli#4351
hi all
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.