r/angular • u/abiramcodes • 7d ago
Introducing Angular Doctor
Gives you a 0–100 score + actionable diagnostics.
Run : npx @abiramcodes/angular-doctor@latest
Docs: https://ngdoctor.dev
Open source. Inspired by React Doctor. Feedback and contributions welcome.
7
u/Jrubzjeknf 6d ago
How is this different from linting?
-1
u/abiramcodes 6d ago
Linting only offers rules from the linter, ng doctor offers you rules from linters + angular style guide + best practices. On top it, the tool generates a report, it can be either md / html file / json output that can be fed to any ai agent to resolve issues.
Run it once on your angular app : npx @abiramcodes/angular-doctor@latest
12
u/pdxben 6d ago
eslint offers rules for anything you install a plugin for, of which there are many, including angular-eslint which overlaps a fair bit with this tool. I would much rather see your rules implemented as an eslint plugin, than adding a yet another tool to the stack, with its own configs & dependencies to manage.
1
2
0
u/thatbigblackblack 5d ago
Honest Feedback : honestly I hardly see any use for this kind of tool because llms..
1
-3
19
u/PeEll 6d ago
FYI it flagged a lot of things that weren't broken in my app:
client-secret - this is the Firebase web apiKey. It’s meant to be public and ships to every browser.
prefer-document-token - I already call inject(DOCUMENT) into a local variable named document. The tool only saw the name.
img-alt: every flagged image has a bound [alt]="…". The tool only looks for a static alt attribute.
control-missing-label: my inputs sit inside <label> elements or have <label for>, which counts as a label. The tool doesn’t recognise that.
inner-html: there’s no bypassSecurityTrust* anywhere in the code, so Angular’s built-in sanitizer runs on both. That’s the right setup for rendered markdown.
ng-model-name: a name is only required when ngModel sits inside a <form>. The edit form works, so this isn’t causing anything.
effect-writes-state: I have code that sets the browser tab title, which is a side effect and not a signal write.