Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bitovi/eslint-plugin

Package Overview
Dependencies
Maintainers
15
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitovi/eslint-plugin - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

rules/angular/host-listener-on-method.js

6

index.js
"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

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc