mm_eslint 1.3.1 → 1.3.2

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.
Files changed (2) hide show
  1. package/detector.js +6 -0
  2. package/package.json +1 -1
package/detector.js CHANGED
@@ -670,6 +670,12 @@ Detector.prototype._getPropType = function (val_node, prop_name, parent_node) {
670
670
  val_node.name &&
671
671
  val_node.name[0] === val_node.name[0].toUpperCase()
672
672
  ) {
673
+ // 检查是否是特殊全局变量(如__dirname、__filename、process等)
674
+ var special_globals = ['__dirname', '__filename', 'process', 'console', 'module', 'exports', 'require', 'global'];
675
+ if (special_globals.includes(val_node.name)) {
676
+ return 'value'; // 特殊全局变量应该识别为属性值
677
+ }
678
+
673
679
  // 检查是否是类名引用(通常类名使用PascalCase)
674
680
  return 'class'; // 属性类类型
675
681
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_eslint",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "ESLint plugin for naming conventions - PascalCase, camelCase, snake_case, and UPPER_SNAKE_CASE naming rules",
5
5
  "main": "index.js",
6
6
  "keywords": [