mm_eslint 1.3.2 → 1.3.3

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 +9 -0
  2. package/package.json +1 -1
package/detector.js CHANGED
@@ -778,6 +778,15 @@ Detector.prototype._checkPropertyName = function (
778
778
  // 公开方法:检查是否符合公开方法命名规范
779
779
  style_err = this._validate_naming_style(prop_name, rule.styles, rule_type);
780
780
  }
781
+ } else if (rule_type === 'property-instance-class-name') {
782
+ // 属性实例类:支持公开实例类(camelCase)和私有实例类(_camelCase)
783
+ if (prop_name.startsWith('_')) {
784
+ // 私有实例类:检查是否符合私有实例类命名规范
785
+ style_err = this._validate_naming_style(prop_name, ['_camelCase'], rule_type);
786
+ } else {
787
+ // 公开实例类:检查是否符合公开实例类命名规范
788
+ style_err = this._validate_naming_style(prop_name, rule.styles, rule_type);
789
+ }
781
790
  } else {
782
791
  // 其他属性类型:使用原有逻辑
783
792
  style_err = this._validate_naming_style(prop_name, rule.styles, rule_type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_eslint",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
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": [