mm_eslint 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/detector/const_name.js +10 -0
- package/package.json +1 -1
|
@@ -431,6 +431,16 @@ ConstName.prototype.AssignmentExpression = function (node) {
|
|
|
431
431
|
return;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
+
// 排除函数表达式和箭头函数表达式
|
|
435
|
+
if (node.right && (node.right.type === 'FunctionExpression' || node.right.type === 'ArrowFunctionExpression')) {
|
|
436
|
+
return;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// 排除类表达式
|
|
440
|
+
if (node.right && node.right.type === 'ClassExpression') {
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
|
|
434
444
|
// 判断右边值是否为常量,同时排除类定义的情况
|
|
435
445
|
if (this._isConstantValue(node.right) && !this._isClassDefinition(node.right)) {
|
|
436
446
|
let name = node.left.property.name;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mm_eslint",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "ESLint plugin for personal naming conventions - supports PascalCase, camelCase, snake_case, and UPPER_SNAKE_CASE naming rules with intelligent recommendations",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|