@sun-asterisk/sunlint 1.3.0 → 1.3.1

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 (73) hide show
  1. package/CHANGELOG.md +68 -1
  2. package/CONTRIBUTING.md +1179 -54
  3. package/README.md +3 -4
  4. package/config/ci-cd.json +54 -0
  5. package/config/development.json +56 -0
  6. package/config/large-project.json +143 -0
  7. package/config/presets/all.json +0 -1
  8. package/config/release.json +70 -0
  9. package/config/rule-analysis-strategies.js +23 -4
  10. package/config/rules/S027-categories.json +122 -0
  11. package/config/rules/enhanced-rules-registry.json +136 -75
  12. package/config/rules/rules-registry-generated.json +2 -2
  13. package/config/rules/rules-registry.json +13 -1
  14. package/core/cli-action-handler.js +24 -30
  15. package/core/cli-program.js +11 -3
  16. package/core/config-merger.js +29 -2
  17. package/core/enhanced-rules-registry.js +3 -3
  18. package/core/semantic-engine.js +117 -19
  19. package/core/unified-rule-registry.js +1 -1
  20. package/docs/COMMAND-EXAMPLES.md +134 -0
  21. package/docs/LARGE-PROJECT-GUIDE.md +324 -0
  22. package/engines/heuristic-engine.js +71 -13
  23. package/integrations/eslint/plugin/index.js +0 -2
  24. package/origin-rules/common-en.md +8 -8
  25. package/package.json +1 -1
  26. package/rules/common/C017_constructor_logic/analyzer.js +254 -17
  27. package/rules/common/C017_constructor_logic/semantic-analyzer.js +340 -0
  28. package/rules/common/C033_separate_service_repository/README.md +78 -0
  29. package/rules/common/C033_separate_service_repository/analyzer.js +160 -0
  30. package/rules/common/C033_separate_service_repository/config.json +50 -0
  31. package/rules/common/C033_separate_service_repository/regex-based-analyzer.js +585 -0
  32. package/rules/common/C033_separate_service_repository/symbol-based-analyzer.js +368 -0
  33. package/rules/common/C035_error_logging_context/STRATEGY.md +99 -0
  34. package/rules/common/C035_error_logging_context/analyzer.js +230 -0
  35. package/rules/common/C035_error_logging_context/config.json +54 -0
  36. package/rules/common/C035_error_logging_context/regex-based-analyzer.js +299 -0
  37. package/rules/common/C035_error_logging_context/symbol-based-analyzer.js +454 -0
  38. package/rules/common/C040_centralized_validation/analyzer.js +165 -0
  39. package/rules/common/C040_centralized_validation/config.json +46 -0
  40. package/rules/common/C040_centralized_validation/regex-based-analyzer.js +243 -0
  41. package/rules/common/C040_centralized_validation/symbol-based-analyzer.js +416 -0
  42. package/rules/common/{C076_single_test_behavior → C072_single_test_behavior}/analyzer.js +6 -6
  43. package/rules/common/C076_explicit_function_types/README.md +30 -0
  44. package/rules/common/C076_explicit_function_types/analyzer.js +172 -0
  45. package/rules/common/C076_explicit_function_types/config.json +15 -0
  46. package/rules/common/C076_explicit_function_types/semantic-analyzer.js +341 -0
  47. package/rules/index.js +1 -0
  48. package/rules/parser/rule-parser.js +13 -2
  49. package/rules/security/S005_no_origin_auth/README.md +226 -0
  50. package/rules/security/S005_no_origin_auth/analyzer.js +184 -0
  51. package/rules/security/S005_no_origin_auth/ast-analyzer.js +406 -0
  52. package/rules/security/S005_no_origin_auth/config.json +85 -0
  53. package/rules/security/S006_no_plaintext_recovery_codes/README.md +139 -0
  54. package/rules/security/S006_no_plaintext_recovery_codes/analyzer.js +306 -0
  55. package/rules/security/S006_no_plaintext_recovery_codes/config.json +48 -0
  56. package/rules/security/S007_no_plaintext_otp/README.md +198 -0
  57. package/rules/security/S007_no_plaintext_otp/analyzer.js +406 -0
  58. package/rules/security/S007_no_plaintext_otp/config.json +79 -0
  59. package/rules/security/S007_no_plaintext_otp/semantic-analyzer.js +609 -0
  60. package/rules/security/S007_no_plaintext_otp/semantic-config.json +195 -0
  61. package/rules/security/S007_no_plaintext_otp/semantic-wrapper.js +280 -0
  62. package/rules/security/S027_no_hardcoded_secrets/analyzer.js +180 -366
  63. package/rules/security/S027_no_hardcoded_secrets/categories.json +153 -0
  64. package/rules/security/S027_no_hardcoded_secrets/categorized-analyzer.js +250 -0
  65. package/scripts/prepare-release.sh +1 -1
  66. package/docs/ESLINT-INTEGRATION-STRATEGY.md +0 -392
  67. package/docs/FUTURE_PACKAGES.md +0 -83
  68. package/docs/HEURISTIC_VS_AI.md +0 -113
  69. package/docs/PRODUCTION_DEPLOYMENT_ANALYSIS.md +0 -112
  70. package/docs/PRODUCTION_SIZE_IMPACT.md +0 -183
  71. package/docs/RELEASE_GUIDE.md +0 -230
  72. package/docs/STANDARDIZED-CATEGORY-FILTERING.md +0 -156
  73. package/integrations/eslint/plugin/rules/common/c076-single-behavior-per-test.js +0 -254
package/CHANGELOG.md CHANGED
@@ -2,7 +2,74 @@
2
2
 
3
3
  ---
4
4
 
5
- ## **v1.3.0 - Enhanced Engine Architecture (August 13, 2025)**
5
+ ## 🚀 **v1.3.1 - Advanced Rules & Performance Optimization (August 18, 2025)**
6
+
7
+ **Release Date**: August 18, 2025
8
+ **Type**: Feature Enhancement & Performance Optimization
9
+
10
+ ### 🎯 **New Rules Added**
11
+ - **NEW**: Rule **C076** - Explicit Function Argument Types (Semantic-only)
12
+ - Enforces explicit type annotations on all public function parameters
13
+ - Detects `any`, `unknown`, and missing type annotations
14
+ - Semantic-only analysis (no regex fallback) for maximum accuracy
15
+ - Config-driven with customizable allowed/disallowed types
16
+
17
+ ### 🔧 **Rules Enhanced**
18
+ - **ENHANCED**: Rule **C033** - Separate Service and Repository Logic
19
+ - Improved symbol-based analysis with regex fallback
20
+ - Better business logic pattern detection
21
+ - Enhanced service/repository boundary enforcement
22
+
23
+ - **ENHANCED**: Rule **C035** - Error Logging Context
24
+ - Advanced semantic analysis for error handling patterns
25
+ - Better context detection in catch blocks
26
+ - Improved logging recommendation accuracy
27
+
28
+ - **ENHANCED**: Rule **C040** - Centralized Validation
29
+ - Symbol-based validation pattern detection
30
+ - Enhanced inline validation detection
31
+ - Better configuration options
32
+
33
+ - **ENHANCED**: Rule **C017** - Consistent Error Response Format
34
+ - Improved semantic analysis capabilities
35
+ - Better error response format detection
36
+ - Enhanced cross-file analysis
37
+
38
+ ### 🎯 **Semantic Rules Added**
39
+ - **NEW**: Rule **S005** - AST-based analysis capabilities
40
+ - **NEW**: Rule **S006** - Advanced regex pattern matching
41
+ - **NEW**: Rule **S007** - Semantic analysis with symbol resolution
42
+
43
+ ### ⚡ **Performance Improvements**
44
+ - **OPTIMIZED**: Lazy initialization for semantic rules
45
+ - Rules only initialize when actually needed
46
+ - Reduced startup time and memory usage
47
+ - Eliminated unnecessary rule initialization logs
48
+
49
+ - **IMPROVED**: Semantic engine memory optimization
50
+ - Better handling of large projects (1000+ files)
51
+ - Optimized ts-morph project loading
52
+ - Enhanced file targeting for semantic analysis
53
+
54
+ ### 🐛 **Bug Fixes**
55
+ - **FIXED**: Rule ID confusion between C072 and C076
56
+ - **FIXED**: Verbose logging only shows when `--verbose` flag is used
57
+ - **FIXED**: Semantic rules initialization spam in logs
58
+ - **FIXED**: File ignore patterns for ESLint integration rules
59
+
60
+ ### 📦 **Packaging Improvements**
61
+ - **UPDATED**: .npmignore to preserve important ESLint rule implementations
62
+ - **IMPROVED**: Package size optimization while maintaining functionality
63
+ - **ENHANCED**: Build process to include all necessary rule files
64
+
65
+ ### 🔄 **Backward Compatibility**
66
+ - **MAINTAINED**: Full backward compatibility with existing configurations
67
+ - **PRESERVED**: All existing rule IDs and behavior
68
+ - **ENSURED**: ESLint integration continues to work seamlessly
69
+
70
+ ---
71
+
72
+ ## 🌟 **v1.3.0 - Enhanced Engine Architecture (August 13, 2025)**
6
73
 
7
74
  **Release Date**: August 13, 2025
8
75
  **Type**: Major Engine Enhancement & Rule Mapping Improvements