How to use the web-component-analyzer.analyzeComponents function in web-component-analyzer

To help you get started, we’ve selected a few web-component-analyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github runem / lit-analyzer / packages / lit-analyzer / src / analyze / default-lit-analyzer-context.ts View on Github external
private findComponentsInFile(sourceFile: SourceFile) {
		const analyzeResult = analyzeComponents(sourceFile, {
			checker: this.checker,
			ts: this.ts,
			config: { diagnostics: true, analyzeLibDom: true, excludedDeclarationNames: ["HTMLElement"] }
		});

		// Forget
		const existingResult = this.definitionStore.getAnalysisResultForFile(sourceFile);
		if (existingResult != null) {
			this.htmlStore.forgetCollection(
				{
					tags: existingResult.componentDefinitions.map(d => d.tagName),
					events: existingResult.globalEvents.map(e => e.name),
					attrs: []
				},
				HtmlDataSourceKind.DECLARED
			);

web-component-analyzer

CLI that analyzes web components

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis