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

eslint-plugin-uilib

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-uilib - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

22

lib/rules/component-deprecation.js

@@ -11,2 +11,3 @@ const _ = require('lodash');

PROP_NAME: 'propName',
COMPONENT_NAME: 'componentName'
};

@@ -44,2 +45,3 @@

const fix = Object.values(options.fix)[0];
switch (type) {

@@ -49,2 +51,8 @@ case FIX_TYPES.PROP_NAME:

return fixer.replaceText(node.name, fix);
case FIX_TYPES.COMPONENT_NAME:
if (node.type === 'ImportDeclaration') {
const index = getSpecifierIndex(node, options.name);
return fixer.replaceText(node.specifiers[index], fix);
}
return fixer.replaceText(node.name, fix);
default:

@@ -61,2 +69,15 @@ break;

function getSpecifierIndex(node, name) {
let matchIndex;
if (node && node.specifiers) {
_.forEach(node.specifiers, (s, index) => {
const x = _.get(s, 'imported.name');
if (x === name) {
matchIndex = index;
}
});
}
return matchIndex;
}
function checkPropDeprecation(node, propName, deprecatedPropList, componentName) {

@@ -79,3 +100,2 @@ const deprecatedProp = _.find(deprecatedPropList, {prop: propName});

}
if (component) {

@@ -82,0 +102,0 @@ if (isComponentDeprecated(component)) {

2

package.json
{
"name": "eslint-plugin-uilib",
"version": "1.0.15",
"version": "1.0.16",
"description": "uilib set of eslint rules",

@@ -5,0 +5,0 @@ "keywords": [

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