New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-kolibri

Package Overview
Dependencies
Maintainers
6
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-kolibri - npm Package Compare versions

Comparing version 0.13.0-dev.8 to 0.13.0-dev.9

tests/lib/rules/vue-no-undefined-string-uses.spec.js

19

lib/rules/vue-no-undefined-string-uses.js

@@ -9,7 +9,5 @@ /**

const get = require('lodash/get');
const utils = require('../utils');
const constants = require('../constants');
const { GROUP_$TRS } = constants;
const $TR_FUNCTION = '$tr';

@@ -45,7 +43,12 @@

},
eslintPluginVueUtils.executeOnVue(context, obj => {
definitionNodes = Array.from(
eslintPluginVueUtils.iterateProperties(obj, new Set([GROUP_$TRS]))
);
{
ObjectExpression(node) {
if (get(node, 'parent.key.name') === '$trs') {
node.properties.forEach(prop => {
definitionNodes.push({ name: prop.key.name });
});
}
},
},
eslintPluginVueUtils.executeOnVue(context, () => {
if (!hasTemplate) {

@@ -52,0 +55,0 @@ utils.reportUseOfUndefinedTranslation(context, definitionNodes, usedStringNodes);

@@ -50,7 +50,9 @@ /**

ObjectExpression(node) {
node.properties.forEach(prop => {
if (get(prop, ['value', 'value'])) {
usedStrings.push(prop.value.value);
}
});
if (get(node, 'parent.key.name') !== '$trs') {
node.properties.forEach(prop => {
if (get(prop, ['value', 'value'])) {
usedStrings.push(prop.value.value);
}
});
}
},

@@ -57,0 +59,0 @@ },

{
"name": "eslint-plugin-kolibri",
"version": "0.13.0-dev.8",
"version": "0.13.0-dev.9",
"description": "Custom rules.",

@@ -5,0 +5,0 @@ "author": "Learning Equality",

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