UNPKG

eslint-plugin-obsidian

Version:

ESLint rules for Obsidian

20 lines 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GraphHandler = void 0; class GraphHandler { constructor(circularDependenciesDetector, errorReporter) { this.circularDependenciesDetector = circularDependenciesDetector; this.errorReporter = errorReporter; } handle(clazz) { if (this.hasGraphDecorator(clazz)) { const result = this.circularDependenciesDetector.detect(clazz); this.errorReporter.report({ isError: result.hasCircularDependency, ...result }); } } hasGraphDecorator(clazz) { return clazz.isDecoratedWithIgnoreCase('Graph'); } } exports.GraphHandler = GraphHandler; //# sourceMappingURL=graphHandler.js.map