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

eslint-plugin-moka

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-moka - npm Package Compare versions

Comparing version

to
0.0.4

4

CHANGELOG.md

@@ -5,2 +5,6 @@ Changelog

## 0.0.4
- Optimize rule "lingui-mark"
## 0.0.3

@@ -7,0 +11,0 @@

@@ -72,2 +72,3 @@ module.exports = {

case 'tooltip':
case 'title':
return true;

@@ -93,2 +94,10 @@ default:

const isEqualOperator = (node) => {
if (!node) {
return false;
}
return node.operator === '===' || node.operator === '==';
};
//----------------------------------------------------------------------

@@ -142,2 +151,8 @@ // Public

if (node.parent.type === 'BinaryExpression' && isEqualOperator(node.parent)) {
// if (status === '你好')
// 这种是不需要翻译的
return true;
}
context.report({

@@ -144,0 +159,0 @@ node,

2

package.json
{
"name": "eslint-plugin-moka",
"version": "0.0.3",
"version": "0.0.4",
"description": "Eslint Plugin of Moka",

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

@@ -71,2 +71,5 @@ 'use strict';

},
{
code: "if (status === '你好') { success = true; }",
},
],

@@ -106,2 +109,8 @@

{
code: '<Modal title="你好"></Modal>',
errors: [{
message: ERR_MSG,
}],
},
{
code: "httpErrors.BadRequestError('你好')",

@@ -108,0 +117,0 @@ errors: [{