question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Question] Codelyzer is not working with VS Code

See original GitHub issue

Hi,

I created an Angular2 project using angular-cli. Then I updated VS Code (version: 1.6) workspace setting file to:

{
        "tslint.rulesDirectory": "./node_modules/codelyzer",
        "typescript.tsdk": "./node_modules/typescript/lib"
}

I also intentionally created a Codelyzer error, and run “ng lint” ang got the following error:

src/app/app.component.ts[8, 14]: The name of the class AppComponen should end with the suffix Component (https://goo.gl/5X1TE7)

However, VS Code does not mark AppComponen with a red underline.

Can someone please explain what I should do to make VS Code detect Codelyzer errors?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
devguysincommented, Oct 12, 2016

OK, thanks. I suggest documenting that to avoid similar questions from newcomers.

BTW after I installed tslint, it also works even if I delete the rules configuration from user/workspace setting file, I mean the following line:

{
        "tslint.rulesDirectory": "./node_modules/codelyzer",
}
2reactions
mgechevcommented, Oct 12, 2016

Oh, sorry I have forgotten to mentioned this as a requirement 😞 .

Yes, in order to make the tool as portable as possible we reuse the error reporting mechanism of tslint. Maybe at some point we’ll abstract it to allow ESLint plugin support too but it wasn’t necessary at this point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Terminal launch failures - Visual Studio Code
There you can read how to configure the terminal, as well as review answers to common questions. Below are specific troubleshooting steps, if...
Read more >
Conflict of TSLint and VS code Format Document
I was able to fix this issue like so: i.e. you can see that new line for all. constructor( private router: Router, private...
Read more >
codelyzer - npm
codelyzer. A set of tslint rules for static code analysis of Angular TypeScript projects. (If you are using ESLint check out the new ......
Read more >
VS Code Debugger not working for python - Microsoft Q&A
Any troubleshooting tips. It seems when I do Run->"start Debugging' no command comes to terminal. Any VS Code log file that I can...
Read more >
codelyzer
Codelyzer is a tool great for teams and individuals, which helps you. 4. // write consistent code, and discover potential errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found