UNPKG

@conarti/eslint-plugin-feature-sliced

Version:
19 lines (18 loc) 713 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validateAndReport = void 0; const rule_1 = require("../../../lib/rule"); const errors_1 = require("./errors"); const should_be_from_public_api_1 = require("./should-be-from-public-api"); function validateAndReport(node, context, optionsWithDefault) { if (!(0, rule_1.hasPath)(node)) { return; } if ((0, rule_1.isIgnoredCurrentFile)(context, optionsWithDefault)) { return; } if ((0, should_be_from_public_api_1.shouldBeFromPublicApi)(node, context, optionsWithDefault)) { (0, errors_1.reportShouldBeFromPublicApi)(node, context); } } exports.validateAndReport = validateAndReport;