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

eslint-plugin-m6web-i18n

Package Overview
Dependencies
Maintainers
6
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-m6web-i18n - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

lib/rules/no-text-as-children.js

@@ -6,3 +6,3 @@ 'use strict';

if (config.ignoreFiles && new RegExp(config.ignoreFiles).test(context.getFilename())) {
if (!config || config.ignoreFiles && new RegExp(config.ignoreFiles).test(context.getFilename())) {
return {};

@@ -9,0 +9,0 @@ }

@@ -11,2 +11,7 @@ 'use strict';

var config = context.settings.i18n;
if (!config || config.ignoreFiles && new RegExp(config.ignoreFiles).test(context.getFilename())) {
return {};
}
if (config && config[langsKey]) {

@@ -23,9 +28,6 @@ langConfig = config[langsKey].map(function (_ref) {

if (config.ignoreFiles && new RegExp(config.ignoreFiles).test(context.getFilename())) {
return {};
}
return {
CallExpression: function CallExpression(node) {
var funcName = node.callee.type === 'MemberExpression' && node.callee.property.name || node.callee.name;
if (funcName !== config.functionName || !node.arguments || !node.arguments.length) {

@@ -40,2 +42,3 @@ return;

var key = (0, _utils.getKeyValue)(keyNode);
if (!key) {

@@ -62,4 +65,8 @@ return;

}, []);
if (missingKeys.length) {
context.report({ node: node, message: '[' + missingKeys + '] keys are missing for key \'' + key + '\' in \'' + name + '\' language' });
context.report({
node: node,
message: '[' + missingKeys + '] keys are missing for key \'' + key + '\' in \'' + name + '\' language'
});
}

@@ -66,0 +73,0 @@ });

{
"name": "eslint-plugin-m6web-i18n",
"version": "0.1.1",
"version": "0.1.2",
"description": "eslint plugin for generic i18n",

@@ -10,3 +10,3 @@ "author": "M6web",

"type": "git",
"url": "https://github.m6web.fr/m6web/site-6play-v4.git"
"url": "https://github.com/M6Web/eslint-plugin-m6web-i18n.git"
},

@@ -13,0 +13,0 @@ "scripts": {

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