@sun-asterisk/sunlint 1.1.7 → 1.2.0

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 (74) hide show
  1. package/.sunlint.json +1 -1
  2. package/CHANGELOG.md +83 -0
  3. package/README.md +66 -4
  4. package/config/presets/all.json +125 -0
  5. package/config/presets/beginner.json +16 -8
  6. package/config/presets/ci.json +12 -4
  7. package/config/presets/maintainability.json +38 -0
  8. package/config/presets/performance.json +32 -0
  9. package/config/presets/quality.json +103 -0
  10. package/config/presets/recommended.json +36 -12
  11. package/config/presets/security.json +88 -0
  12. package/config/presets/strict.json +15 -5
  13. package/config/rules/rules-registry-generated.json +6312 -0
  14. package/config/rules-summary.json +1941 -0
  15. package/core/adapters/sunlint-rule-adapter.js +452 -0
  16. package/core/analysis-orchestrator.js +4 -4
  17. package/core/config-manager.js +28 -5
  18. package/core/rule-selection-service.js +52 -55
  19. package/docs/CONFIGURATION.md +111 -3
  20. package/docs/LANGUAGE-SPECIFIC-RULES.md +308 -0
  21. package/docs/README.md +3 -0
  22. package/docs/STANDARDIZED-CATEGORY-FILTERING.md +156 -0
  23. package/engines/eslint-engine.js +92 -2
  24. package/engines/heuristic-engine.js +8 -31
  25. package/origin-rules/common-en.md +1320 -0
  26. package/origin-rules/dart-en.md +289 -0
  27. package/origin-rules/java-en.md +60 -0
  28. package/origin-rules/kotlin-mobile-en.md +453 -0
  29. package/origin-rules/reactjs-en.md +102 -0
  30. package/origin-rules/security-en.md +1055 -0
  31. package/origin-rules/swift-en.md +449 -0
  32. package/origin-rules/typescript-en.md +136 -0
  33. package/package.json +6 -5
  34. package/scripts/copy-rules.js +86 -0
  35. package/rules/README.md +0 -252
  36. package/rules/common/C002_no_duplicate_code/analyzer.js +0 -65
  37. package/rules/common/C002_no_duplicate_code/config.json +0 -23
  38. package/rules/common/C003_no_vague_abbreviations/analyzer.js +0 -418
  39. package/rules/common/C003_no_vague_abbreviations/config.json +0 -35
  40. package/rules/common/C006_function_naming/analyzer.js +0 -349
  41. package/rules/common/C006_function_naming/config.json +0 -86
  42. package/rules/common/C010_limit_block_nesting/analyzer.js +0 -389
  43. package/rules/common/C013_no_dead_code/analyzer.js +0 -206
  44. package/rules/common/C014_dependency_injection/analyzer.js +0 -338
  45. package/rules/common/C017_constructor_logic/analyzer.js +0 -314
  46. package/rules/common/C019_log_level_usage/analyzer.js +0 -362
  47. package/rules/common/C019_log_level_usage/config.json +0 -121
  48. package/rules/common/C029_catch_block_logging/analyzer.js +0 -373
  49. package/rules/common/C029_catch_block_logging/config.json +0 -59
  50. package/rules/common/C031_validation_separation/analyzer.js +0 -186
  51. package/rules/common/C041_no_sensitive_hardcode/analyzer.js +0 -292
  52. package/rules/common/C042_boolean_name_prefix/analyzer.js +0 -300
  53. package/rules/common/C043_no_console_or_print/analyzer.js +0 -304
  54. package/rules/common/C047_no_duplicate_retry_logic/analyzer.js +0 -351
  55. package/rules/common/C075_explicit_return_types/analyzer.js +0 -103
  56. package/rules/common/C076_single_test_behavior/analyzer.js +0 -121
  57. package/rules/docs/C002_no_duplicate_code.md +0 -57
  58. package/rules/docs/C031_validation_separation.md +0 -72
  59. package/rules/index.js +0 -149
  60. package/rules/migration/converter.js +0 -385
  61. package/rules/migration/mapping.json +0 -164
  62. package/rules/security/S026_json_schema_validation/analyzer.js +0 -251
  63. package/rules/security/S026_json_schema_validation/config.json +0 -27
  64. package/rules/security/S027_no_hardcoded_secrets/analyzer.js +0 -263
  65. package/rules/security/S027_no_hardcoded_secrets/config.json +0 -29
  66. package/rules/security/S029_csrf_protection/analyzer.js +0 -264
  67. package/rules/tests/C002_no_duplicate_code.test.js +0 -50
  68. package/rules/universal/C010/generic.js +0 -0
  69. package/rules/universal/C010/tree-sitter-analyzer.js +0 -0
  70. package/rules/utils/ast-utils.js +0 -191
  71. package/rules/utils/base-analyzer.js +0 -98
  72. package/rules/utils/pattern-matchers.js +0 -239
  73. package/rules/utils/rule-helpers.js +0 -264
  74. package/rules/utils/severity-constants.js +0 -93
@@ -0,0 +1,88 @@
1
+ {
2
+ "name": "@sun/sunlint/security",
3
+ "description": "Security-focused configuration with all security rules",
4
+ "rules": {
5
+ "C041": "warn",
6
+ "S001": "error",
7
+ "S002": "error",
8
+ "S003": "warn",
9
+ "S004": "warn",
10
+ "S005": "warn",
11
+ "S006": "warn",
12
+ "S007": "warn",
13
+ "S008": "warn",
14
+ "S009": "warn",
15
+ "S010": "error",
16
+ "S011": "error",
17
+ "S012": "warn",
18
+ "S013": "error",
19
+ "S014": "warn",
20
+ "S015": "warn",
21
+ "S016": "error",
22
+ "S017": "error",
23
+ "S018": "warn",
24
+ "S019": "warn",
25
+ "S020": "error",
26
+ "S021": "warn",
27
+ "S022": "warn",
28
+ "S023": "error",
29
+ "S025": "warn",
30
+ "S026": "warn",
31
+ "S027": "warn",
32
+ "S028": "warn",
33
+ "S029": "error",
34
+ "S030": "warn",
35
+ "S031": "error",
36
+ "S032": "warn",
37
+ "S033": "warn",
38
+ "S034": "warn",
39
+ "S035": "warn",
40
+ "S036": "error",
41
+ "S037": "warn",
42
+ "S039": "error",
43
+ "S040": "error",
44
+ "S041": "warn",
45
+ "S042": "warn",
46
+ "S043": "warn",
47
+ "S044": "warn",
48
+ "S045": "warn",
49
+ "S046": "warn",
50
+ "S047": "error",
51
+ "S048": "warn",
52
+ "S049": "warn",
53
+ "S050": "warn",
54
+ "S051": "warn",
55
+ "S052": "warn",
56
+ "S053": "warn",
57
+ "S054": "error",
58
+ "S055": "warn",
59
+ "S056": "error",
60
+ "S057": "warn",
61
+ "S058": "warn",
62
+ "S059": "warn"
63
+ },
64
+ "categories": {
65
+ "security": "error"
66
+ },
67
+ "languages": [
68
+ "typescript",
69
+ "javascript",
70
+ "dart",
71
+ "java",
72
+ "kotlin",
73
+ "swift"
74
+ ],
75
+ "exclude": [
76
+ "**/node_modules/**",
77
+ "**/build/**",
78
+ "**/dist/**",
79
+ "**/*.generated.*",
80
+ "**/*.min.*"
81
+ ],
82
+ "metadata": {
83
+ "totalRules": 58,
84
+ "removedRules": 0,
85
+ "lastUpdated": "2025-07-30T08:59:10.121Z",
86
+ "source": "origin-rules"
87
+ }
88
+ }
@@ -4,16 +4,20 @@
4
4
  "rules": {
5
5
  "C019": "error",
6
6
  "C029": "error",
7
- "C006": "warning"
7
+ "C006": "warn"
8
8
  },
9
9
  "categories": {
10
10
  "quality": "error",
11
- "security": "error",
11
+ "security": "error",
12
12
  "logging": "error",
13
- "naming": "warning",
13
+ "naming": "warn",
14
14
  "validation": "error"
15
15
  },
16
- "languages": ["typescript", "dart", "kotlin"],
16
+ "languages": [
17
+ "typescript",
18
+ "dart",
19
+ "kotlin"
20
+ ],
17
21
  "exclude": [
18
22
  "**/node_modules/**",
19
23
  "**/build/**",
@@ -28,5 +32,11 @@
28
32
  "reporting": {
29
33
  "exitOnError": true,
30
34
  "showProgress": true
35
+ },
36
+ "metadata": {
37
+ "totalRules": 3,
38
+ "removedRules": 0,
39
+ "lastUpdated": "2025-07-30T08:59:10.121Z",
40
+ "source": "origin-rules"
31
41
  }
32
- }
42
+ }