@bitovi/eslint-plugin
Advanced tools
Comparing version 2.1.0 to 2.2.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const no_input_readonly_1 = require("./rules/angular/no-input-readonly"); | ||
const host_listener_on_method_1 = require("./rules/angular/host-listener-on-method"); | ||
const on_changes_use_input_bind_1 = require("./rules/angular/on-changes-use-input-bind"); | ||
const seo_friendly_route_path_1 = require("./rules/angular/seo-friendly-route-path"); | ||
@@ -17,4 +20,7 @@ const no_entry_components_1 = require("./rules/angular/no-entry-components"); | ||
[seo_friendly_route_path_1.RULE_NAME]: seo_friendly_route_path_1.rule, | ||
[on_changes_use_input_bind_1.RULE_NAME]: on_changes_use_input_bind_1.rule, | ||
[host_listener_on_method_1.RULE_NAME]: host_listener_on_method_1.rule, | ||
[no_input_readonly_1.RULE_NAME]: no_input_readonly_1.rule, | ||
}, | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@bitovi/eslint-plugin", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Bitovi's Custom ESLint Rules for @bitovi/eslint-config", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,3 @@ "use strict"; | ||
const utils_1 = require("@typescript-eslint/utils"); | ||
const is_in_decorated_class_1 = require("../../utilities/node/is-in-decorated-class"); | ||
exports.RULE_NAME = 'angular/event-emitter-has-output'; | ||
@@ -36,14 +37,7 @@ const checkDecoratorName = (decorator, decoratorName) => { | ||
[utils_1.AST_NODE_TYPES.PropertyDefinition]: function (node) { | ||
var _a, _b, _c, _d; | ||
const classDeclaration = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent; | ||
if ((classDeclaration === null || classDeclaration === void 0 ? void 0 : classDeclaration.type) === utils_1.AST_NODE_TYPES.ClassDeclaration) { | ||
if (!((_b = classDeclaration.decorators) !== null && _b !== void 0 ? _b : []).find((d) => checkDecoratorName(d, 'Component')) && | ||
!((_c = classDeclaration.decorators) !== null && _c !== void 0 ? _c : []).find((d) => checkDecoratorName(d, 'Directive'))) { | ||
return; | ||
} | ||
} | ||
else { | ||
var _a; | ||
if (!(0, is_in_decorated_class_1.isInDecoratedClass)(node, ['Component', 'Directive'])) { | ||
return; | ||
} | ||
const decorators = (_d = node.decorators) !== null && _d !== void 0 ? _d : []; | ||
const decorators = (_a = node.decorators) !== null && _a !== void 0 ? _a : []; | ||
if (!decorators.find((decorator) => checkDecoratorName(decorator, 'Output'))) { | ||
@@ -50,0 +44,0 @@ if (node.typeAnnotation && |
@@ -5,2 +5,3 @@ "use strict"; | ||
const utils_1 = require("@typescript-eslint/utils"); | ||
const is_callable_decorator_with_name_1 = require("../../utilities/left-land-side-expression/is-callable-decorator-with-name"); | ||
const object_expression_1 = require("../../utilities/object-expression"); | ||
@@ -27,3 +28,3 @@ exports.RULE_NAME = 'angular/no-entry-components'; | ||
const expression = node.expression; | ||
if (!isCallableDecoratorWithName(expression, 'NgModule')) { | ||
if (!(0, is_callable_decorator_with_name_1.isCallableDecoratorWithName)(expression, 'NgModule')) { | ||
return false; | ||
@@ -63,12 +64,2 @@ } | ||
} | ||
function isCallableDecoratorWithName(expression, decoratorName) { | ||
if (expression.type !== utils_1.AST_NODE_TYPES.CallExpression) { | ||
return false; | ||
} | ||
const callee = expression.callee; | ||
if (callee.type !== utils_1.AST_NODE_TYPES.Identifier) { | ||
return false; | ||
} | ||
return callee.name === decoratorName; | ||
} | ||
//# sourceMappingURL=no-entry-components.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
117282
42
1385
0