@sun-asterisk/sunlint 1.1.8 → 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.
- package/.sunlint.json +1 -1
- package/CHANGELOG.md +50 -1
- package/README.md +66 -4
- package/config/presets/all.json +125 -0
- package/config/presets/beginner.json +16 -8
- package/config/presets/ci.json +12 -4
- package/config/presets/maintainability.json +38 -0
- package/config/presets/performance.json +32 -0
- package/config/presets/quality.json +103 -0
- package/config/presets/recommended.json +36 -12
- package/config/presets/security.json +88 -0
- package/config/presets/strict.json +15 -5
- package/config/rules/rules-registry-generated.json +6312 -0
- package/config/rules-summary.json +1941 -0
- package/core/adapters/sunlint-rule-adapter.js +452 -0
- package/core/analysis-orchestrator.js +4 -4
- package/core/config-manager.js +28 -5
- package/core/rule-selection-service.js +52 -55
- package/docs/CONFIGURATION.md +111 -3
- package/docs/LANGUAGE-SPECIFIC-RULES.md +308 -0
- package/docs/README.md +3 -0
- package/docs/STANDARDIZED-CATEGORY-FILTERING.md +156 -0
- package/engines/heuristic-engine.js +8 -31
- package/origin-rules/common-en.md +1320 -0
- package/origin-rules/dart-en.md +289 -0
- package/origin-rules/java-en.md +60 -0
- package/origin-rules/kotlin-mobile-en.md +453 -0
- package/origin-rules/reactjs-en.md +102 -0
- package/origin-rules/security-en.md +1055 -0
- package/origin-rules/swift-en.md +449 -0
- package/origin-rules/typescript-en.md +136 -0
- package/package.json +6 -5
- package/scripts/copy-rules.js +86 -0
- package/rules/README.md +0 -252
- package/rules/common/C002_no_duplicate_code/analyzer.js +0 -65
- package/rules/common/C002_no_duplicate_code/config.json +0 -23
- package/rules/common/C003_no_vague_abbreviations/analyzer.js +0 -418
- package/rules/common/C003_no_vague_abbreviations/config.json +0 -35
- package/rules/common/C006_function_naming/analyzer.js +0 -349
- package/rules/common/C006_function_naming/config.json +0 -86
- package/rules/common/C010_limit_block_nesting/analyzer.js +0 -389
- package/rules/common/C013_no_dead_code/analyzer.js +0 -206
- package/rules/common/C014_dependency_injection/analyzer.js +0 -338
- package/rules/common/C017_constructor_logic/analyzer.js +0 -314
- package/rules/common/C019_log_level_usage/analyzer.js +0 -362
- package/rules/common/C019_log_level_usage/config.json +0 -121
- package/rules/common/C029_catch_block_logging/analyzer.js +0 -373
- package/rules/common/C029_catch_block_logging/config.json +0 -59
- package/rules/common/C031_validation_separation/analyzer.js +0 -186
- package/rules/common/C041_no_sensitive_hardcode/analyzer.js +0 -292
- package/rules/common/C042_boolean_name_prefix/analyzer.js +0 -300
- package/rules/common/C043_no_console_or_print/analyzer.js +0 -304
- package/rules/common/C047_no_duplicate_retry_logic/analyzer.js +0 -351
- package/rules/common/C075_explicit_return_types/analyzer.js +0 -103
- package/rules/common/C076_single_test_behavior/analyzer.js +0 -121
- package/rules/docs/C002_no_duplicate_code.md +0 -57
- package/rules/docs/C031_validation_separation.md +0 -72
- package/rules/index.js +0 -149
- package/rules/migration/converter.js +0 -385
- package/rules/migration/mapping.json +0 -164
- package/rules/security/S026_json_schema_validation/analyzer.js +0 -251
- package/rules/security/S026_json_schema_validation/config.json +0 -27
- package/rules/security/S027_no_hardcoded_secrets/analyzer.js +0 -263
- package/rules/security/S027_no_hardcoded_secrets/config.json +0 -29
- package/rules/security/S029_csrf_protection/analyzer.js +0 -264
- package/rules/tests/C002_no_duplicate_code.test.js +0 -50
- package/rules/universal/C010/generic.js +0 -0
- package/rules/universal/C010/tree-sitter-analyzer.js +0 -0
- package/rules/utils/ast-utils.js +0 -191
- package/rules/utils/base-analyzer.js +0 -98
- package/rules/utils/pattern-matchers.js +0 -239
- package/rules/utils/rule-helpers.js +0 -264
- package/rules/utils/severity-constants.js +0 -93
package/.sunlint.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,53 @@
|
|
|
1
|
-
# 🎉 SunLint
|
|
1
|
+
# 🎉 SunLint Changelog
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## 🔥 **v1.2.0 - Architecture Refactor (In Development)**
|
|
6
|
+
|
|
7
|
+
**Release Date**: July 30, 2025
|
|
8
|
+
**Type**: Major Architecture Update (Adapter Pattern Implementation)
|
|
9
|
+
|
|
10
|
+
### 🏗️ **Major Architecture Changes**
|
|
11
|
+
|
|
12
|
+
#### **Unified Adapter Pattern**
|
|
13
|
+
- **NEW**: `SunlintRuleAdapter` - Unified rule access layer for CLI
|
|
14
|
+
- **IMPROVED**: Same adapter pattern as VSCode extension (`RuleReaderService`)
|
|
15
|
+
- **ELIMINATED**: Direct parser/registry access across core modules
|
|
16
|
+
- **PERFORMANCE**: 0.07ms average per rule query with singleton caching
|
|
17
|
+
|
|
18
|
+
#### **Refactored Core Modules**
|
|
19
|
+
- **UPDATED**: `core/rule-selection-service.js` - Now uses adapter exclusively
|
|
20
|
+
- **UPDATED**: `core/config-manager.js` - Adapter-driven config validation
|
|
21
|
+
- **UPDATED**: `core/analysis-orchestrator.js` - Unified rule initialization
|
|
22
|
+
- **UPDATED**: `engines/heuristic-engine.js` - Adapter-based rule access
|
|
23
|
+
|
|
24
|
+
#### **Enhanced Rule Management**
|
|
25
|
+
- **IMPROVED**: 256 rules loaded from registry with fallback to origin-rules
|
|
26
|
+
- **ADDED**: AI context generation via `generateAIContext()` method
|
|
27
|
+
- **ENHANCED**: Engine compatibility checking (heuristic: 244, eslint: 17, ai: 256)
|
|
28
|
+
- **OPTIMIZED**: Memory usage with singleton pattern
|
|
29
|
+
|
|
30
|
+
### 🎯 **Benefits**
|
|
31
|
+
- **No Rule Model Duplication**: Single source of truth across CLI and VSCode
|
|
32
|
+
- **Extensible Architecture**: Easy to add new engines or rule sources
|
|
33
|
+
- **Consistent OpenAI Integration**: Proper context extraction from origin-rules
|
|
34
|
+
- **Maintainable Codebase**: Centralized rule logic through adapter layer
|
|
35
|
+
|
|
36
|
+
### 📊 **Performance Metrics**
|
|
37
|
+
- **Rule Loading**: 256 rules in ~10ms
|
|
38
|
+
- **Query Performance**: 0.07ms average per `getAllRules()` call
|
|
39
|
+
- **Engine Coverage**: Heuristic (95.3%), ESLint (6.6%), AI (100%)
|
|
40
|
+
- **Memory Efficiency**: Singleton prevents duplicate instances
|
|
41
|
+
|
|
42
|
+
### 🧪 **Testing & Validation**
|
|
43
|
+
- **ADDED**: `test-adapter.js` - Comprehensive adapter testing
|
|
44
|
+
- **UPDATED**: Integration tests now use adapter methods
|
|
45
|
+
- **VERIFIED**: All 3/3 integration tests pass
|
|
46
|
+
- **VALIDATED**: Engine orchestration and rule compatibility
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🎉 **v1.1.8 Release Notes**
|
|
2
51
|
|
|
3
52
|
**Release Date**: July 24, 2025
|
|
4
53
|
**Type**: Minor Release (ESLint 9.x Compatibility & Enhanced Error Handling)
|
package/README.md
CHANGED
|
@@ -7,15 +7,42 @@
|
|
|
7
7
|
Sun Lint is a universal coding standards checker providing comprehensive code quality and security analysis. Built by Sun* Engineering Team with integrated security rules from OWASP and industry best practices.
|
|
8
8
|
|
|
9
9
|
### **✨ Key Features**
|
|
10
|
-
- ✅ **
|
|
10
|
+
- ✅ **256+ Coding Rules**: Quality (161), Security (70), Performance (25)
|
|
11
|
+
- ✅ **Unified Architecture**: Same adapter pattern for CLI and VSCode extension
|
|
12
|
+
- ✅ **Multi-Engine Support**: Heuristic (244 rules) + ESLint (17 rules) + AI (256 rules)
|
|
11
13
|
- ✅ **Built-in AST Analysis**: JavaScript/TypeScript parsing out of the box
|
|
12
|
-
- ✅ **Multi-Engine Architecture**: Heuristic + ESLint + OpenAI integration
|
|
13
14
|
- ✅ **Git Integration**: `--changed-files`, `--staged-files`, `--pr-mode`
|
|
14
15
|
- ✅ **TypeScript Support**: Native TypeScript 5.8+ analysis
|
|
15
16
|
- ✅ **Zero Config**: Works immediately after `npm install`
|
|
16
17
|
- ✅ **CI/CD Ready**: Baseline comparison, fail-on-new-violations
|
|
17
18
|
- ✅ **Advanced File Targeting**: Include/exclude patterns, language filtering
|
|
18
19
|
|
|
20
|
+
### **🏗️ Architecture**
|
|
21
|
+
|
|
22
|
+
SunLint uses a unified adapter pattern ensuring consistency between CLI and VSCode extension:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
┌─────────────────┬─────────────────┐
|
|
26
|
+
│ CLI Tools │ VSCode Extension│
|
|
27
|
+
├─────────────────┼─────────────────┤
|
|
28
|
+
│ SunlintRule │ RuleReader │
|
|
29
|
+
│ Adapter │ Service │
|
|
30
|
+
├─────────────────┴─────────────────┤
|
|
31
|
+
│ Rule Sources & Engines │
|
|
32
|
+
│ • Registry (auto-generated) │
|
|
33
|
+
│ • Origin Rules (markdown) │
|
|
34
|
+
│ • Heuristic Engine (244 rules) │
|
|
35
|
+
│ • ESLint Engine (17 rules) │
|
|
36
|
+
│ • AI Engine (256 rules) │
|
|
37
|
+
└───────────────────────────────────┘
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Benefits:**
|
|
41
|
+
- **No Rule Model Duplication**: Single source of truth
|
|
42
|
+
- **Extensible**: Easy to add new engines or rule sources
|
|
43
|
+
- **Performance**: 0.07ms average per rule query
|
|
44
|
+
- **AI Integration**: Consistent OpenAI context from origin-rules
|
|
45
|
+
|
|
19
46
|
### **🚀 Quick Start**
|
|
20
47
|
```bash
|
|
21
48
|
# Install
|
|
@@ -113,8 +140,27 @@ npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @t
|
|
|
113
140
|
}
|
|
114
141
|
```
|
|
115
142
|
|
|
116
|
-
## 🔗 **
|
|
143
|
+
## 🔗 **Multi-Engine Architecture**
|
|
144
|
+
|
|
145
|
+
SunLint automatically selects the best engine for each rule, providing comprehensive coverage:
|
|
146
|
+
|
|
147
|
+
### **Engine Coverage & Performance**
|
|
148
|
+
```bash
|
|
149
|
+
# Show engine compatibility for specific rules
|
|
150
|
+
sunlint --show-engines --rules=C010,R001,S005
|
|
117
151
|
|
|
152
|
+
# Use specific engine
|
|
153
|
+
sunlint --engine=heuristic --rules=C010,C020 --input=src
|
|
154
|
+
sunlint --engine=eslint --rules=R001,R006 --input=src
|
|
155
|
+
sunlint --engine=ai --rules=C010,S001 --input=src
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Engine Stats:**
|
|
159
|
+
- **Heuristic Engine**: 244/256 rules (95.3%) - Fast, universal
|
|
160
|
+
- **ESLint Engine**: 17/256 rules (6.6%) - JavaScript/TypeScript focused
|
|
161
|
+
- **AI Engine**: 256/256 rules (100%) - Context-aware analysis
|
|
162
|
+
|
|
163
|
+
### **ESLint Integration**
|
|
118
164
|
Seamlessly integrate with existing ESLint configurations:
|
|
119
165
|
|
|
120
166
|
```bash
|
|
@@ -129,7 +175,7 @@ sunlint --rules=C010,C006 --eslint-integration --input=src
|
|
|
129
175
|
- ✅ **Multi-engine orchestration**: Rules automatically routed to optimal engine
|
|
130
176
|
- ✅ **ESLint v8/v9 compatibility**: Production-ready with both major versions
|
|
131
177
|
- ✅ **TypeScript support**: Full TS/TSX parsing with custom rule implementation
|
|
132
|
-
- ✅ **Custom rule integration**:
|
|
178
|
+
- ✅ **Custom rule integration**: 17+ SunLint custom rules via ESLint engine
|
|
133
179
|
- ✅ **Smart fallback**: Automatic engine fallback for maximum rule coverage
|
|
134
180
|
- ✅ **Production tested**: Successfully processes real projects with mixed violations
|
|
135
181
|
|
|
@@ -137,6 +183,7 @@ sunlint --rules=C010,C006 --eslint-integration --input=src
|
|
|
137
183
|
- ✅ **No workflow disruption**: Existing ESLint continues working
|
|
138
184
|
- ✅ **Engine flexibility**: Automatic best-engine selection per rule
|
|
139
185
|
- ✅ **Combined reporting**: Unified violation tracking from multiple engines
|
|
186
|
+
- ✅ **Adapter Pattern**: Same rule access layer as VSCode extension
|
|
140
187
|
|
|
141
188
|
## 🔀 **Git Integration**
|
|
142
189
|
|
|
@@ -298,6 +345,21 @@ sunlint --all --changed-files --fail-on-new-violations
|
|
|
298
345
|
sunlint --all --staged-files --format=summary
|
|
299
346
|
```
|
|
300
347
|
|
|
348
|
+
### **Testing & Debugging**
|
|
349
|
+
```bash
|
|
350
|
+
# Test adapter performance and coverage
|
|
351
|
+
sunlint --test-adapter
|
|
352
|
+
|
|
353
|
+
# Show detailed engine information
|
|
354
|
+
sunlint --show-engines --verbose
|
|
355
|
+
|
|
356
|
+
# Debug rule selection process
|
|
357
|
+
sunlint --rules=C010,R001 --verbose --debug
|
|
358
|
+
|
|
359
|
+
# Validate configuration
|
|
360
|
+
sunlint --validate-config .sunlint.json
|
|
361
|
+
```
|
|
362
|
+
|
|
301
363
|
## 📚 **Documentation**
|
|
302
364
|
|
|
303
365
|
- **[Configuration Guide](./docs/CONFIGURATION.md)** - Complete config options with examples
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sun/sunlint/all",
|
|
3
|
+
"description": "Comprehensive configuration with all available activated rules (v1.0+)",
|
|
4
|
+
"rules": {
|
|
5
|
+
"C003": "warn",
|
|
6
|
+
"C006": "warn",
|
|
7
|
+
"C013": "warn",
|
|
8
|
+
"C014": "warn",
|
|
9
|
+
"C017": "warn",
|
|
10
|
+
"C018": "warn",
|
|
11
|
+
"C019": "warn",
|
|
12
|
+
"C023": "warn",
|
|
13
|
+
"C024": "warn",
|
|
14
|
+
"C029": "warn",
|
|
15
|
+
"C030": "warn",
|
|
16
|
+
"C031": "warn",
|
|
17
|
+
"C033": "warn",
|
|
18
|
+
"C035": "warn",
|
|
19
|
+
"C040": "warn",
|
|
20
|
+
"C041": "warn",
|
|
21
|
+
"C042": "warn",
|
|
22
|
+
"C043": "warn",
|
|
23
|
+
"C047": "warn",
|
|
24
|
+
"C048": "warn",
|
|
25
|
+
"C052": "warn",
|
|
26
|
+
"C056": "warn",
|
|
27
|
+
"C060": "warn",
|
|
28
|
+
"C061": "warn",
|
|
29
|
+
"C065": "warn",
|
|
30
|
+
"C067": "warn",
|
|
31
|
+
"C070": "warn",
|
|
32
|
+
"C072": "warn",
|
|
33
|
+
"C073": "warn",
|
|
34
|
+
"C075": "warn",
|
|
35
|
+
"C076": "warn",
|
|
36
|
+
"S001": "error",
|
|
37
|
+
"S002": "error",
|
|
38
|
+
"S003": "warn",
|
|
39
|
+
"S004": "warn",
|
|
40
|
+
"S005": "warn",
|
|
41
|
+
"S006": "warn",
|
|
42
|
+
"S007": "warn",
|
|
43
|
+
"S008": "warn",
|
|
44
|
+
"S009": "warn",
|
|
45
|
+
"S010": "error",
|
|
46
|
+
"S011": "error",
|
|
47
|
+
"S012": "warn",
|
|
48
|
+
"S013": "error",
|
|
49
|
+
"S014": "warn",
|
|
50
|
+
"S015": "warn",
|
|
51
|
+
"S016": "error",
|
|
52
|
+
"S017": "error",
|
|
53
|
+
"S018": "error",
|
|
54
|
+
"S019": "error",
|
|
55
|
+
"S020": "error",
|
|
56
|
+
"S021": "error",
|
|
57
|
+
"S022": "error",
|
|
58
|
+
"S023": "error",
|
|
59
|
+
"S024": "error",
|
|
60
|
+
"S025": "error",
|
|
61
|
+
"S026": "warn",
|
|
62
|
+
"S027": "error",
|
|
63
|
+
"S028": "error",
|
|
64
|
+
"S029": "error",
|
|
65
|
+
"S030": "error",
|
|
66
|
+
"S031": "error",
|
|
67
|
+
"S032": "error",
|
|
68
|
+
"S033": "error",
|
|
69
|
+
"S034": "error",
|
|
70
|
+
"S035": "error",
|
|
71
|
+
"S036": "error",
|
|
72
|
+
"S037": "error",
|
|
73
|
+
"S038": "error",
|
|
74
|
+
"S039": "error",
|
|
75
|
+
"S040": "error",
|
|
76
|
+
"S041": "error",
|
|
77
|
+
"S042": "error",
|
|
78
|
+
"S043": "error",
|
|
79
|
+
"S044": "warn",
|
|
80
|
+
"S045": "error",
|
|
81
|
+
"S046": "error",
|
|
82
|
+
"S047": "error",
|
|
83
|
+
"S048": "error",
|
|
84
|
+
"S049": "error",
|
|
85
|
+
"S050": "error",
|
|
86
|
+
"S051": "error",
|
|
87
|
+
"S052": "error",
|
|
88
|
+
"S053": "error",
|
|
89
|
+
"S054": "error",
|
|
90
|
+
"S055": "error",
|
|
91
|
+
"S056": "error",
|
|
92
|
+
"S057": "error",
|
|
93
|
+
"S058": "error",
|
|
94
|
+
"S059": "error"
|
|
95
|
+
},
|
|
96
|
+
"categories": {
|
|
97
|
+
"quality": "warn",
|
|
98
|
+
"security": "error",
|
|
99
|
+
"performance": "warn",
|
|
100
|
+
"maintainability": "warn",
|
|
101
|
+
"testability": "warn",
|
|
102
|
+
"documentation": "warn"
|
|
103
|
+
},
|
|
104
|
+
"languages": [
|
|
105
|
+
"typescript",
|
|
106
|
+
"javascript",
|
|
107
|
+
"dart",
|
|
108
|
+
"java",
|
|
109
|
+
"kotlin",
|
|
110
|
+
"swift"
|
|
111
|
+
],
|
|
112
|
+
"exclude": [
|
|
113
|
+
"**/node_modules/**",
|
|
114
|
+
"**/build/**",
|
|
115
|
+
"**/dist/**",
|
|
116
|
+
"**/*.generated.*",
|
|
117
|
+
"**/*.min.*"
|
|
118
|
+
],
|
|
119
|
+
"metadata": {
|
|
120
|
+
"totalRules": 90,
|
|
121
|
+
"removedRules": 0,
|
|
122
|
+
"lastUpdated": "2025-07-30T08:59:10.118Z",
|
|
123
|
+
"source": "origin-rules"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -2,18 +2,20 @@
|
|
|
2
2
|
"name": "@sun/sunlint/beginner",
|
|
3
3
|
"description": "Beginner-friendly configuration with warnings only",
|
|
4
4
|
"rules": {
|
|
5
|
-
"C019": "
|
|
6
|
-
"C029": "
|
|
5
|
+
"C019": "warn",
|
|
6
|
+
"C029": "warn",
|
|
7
7
|
"C006": "info"
|
|
8
8
|
},
|
|
9
9
|
"categories": {
|
|
10
|
-
"quality": "
|
|
11
|
-
"security": "
|
|
12
|
-
"logging": "
|
|
10
|
+
"quality": "warn",
|
|
11
|
+
"security": "warn",
|
|
12
|
+
"logging": "warn",
|
|
13
13
|
"naming": "info",
|
|
14
|
-
"validation": "
|
|
14
|
+
"validation": "warn"
|
|
15
15
|
},
|
|
16
|
-
"languages": [
|
|
16
|
+
"languages": [
|
|
17
|
+
"typescript"
|
|
18
|
+
],
|
|
17
19
|
"exclude": [
|
|
18
20
|
"**/node_modules/**",
|
|
19
21
|
"**/build/**",
|
|
@@ -32,5 +34,11 @@
|
|
|
32
34
|
"showProgress": true,
|
|
33
35
|
"includeContext": true,
|
|
34
36
|
"showFixSuggestions": true
|
|
37
|
+
},
|
|
38
|
+
"metadata": {
|
|
39
|
+
"totalRules": 3,
|
|
40
|
+
"removedRules": 0,
|
|
41
|
+
"lastUpdated": "2025-07-30T08:59:10.119Z",
|
|
42
|
+
"source": "origin-rules"
|
|
35
43
|
}
|
|
36
|
-
}
|
|
44
|
+
}
|
package/config/presets/ci.json
CHANGED
|
@@ -8,13 +8,15 @@
|
|
|
8
8
|
},
|
|
9
9
|
"categories": {
|
|
10
10
|
"quality": "error",
|
|
11
|
-
"security": "error",
|
|
11
|
+
"security": "error",
|
|
12
12
|
"logging": "error",
|
|
13
13
|
"naming": "off",
|
|
14
14
|
"validation": "error"
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
"languages": [
|
|
17
|
+
"typescript",
|
|
18
|
+
"dart"
|
|
19
|
+
],
|
|
18
20
|
"exclude": [
|
|
19
21
|
"**/node_modules/**",
|
|
20
22
|
"**/build/**",
|
|
@@ -43,5 +45,11 @@
|
|
|
43
45
|
"showProgress": false,
|
|
44
46
|
"includeContext": false,
|
|
45
47
|
"showFixSuggestions": false
|
|
48
|
+
},
|
|
49
|
+
"metadata": {
|
|
50
|
+
"totalRules": 3,
|
|
51
|
+
"removedRules": 0,
|
|
52
|
+
"lastUpdated": "2025-07-30T08:59:10.120Z",
|
|
53
|
+
"source": "origin-rules"
|
|
46
54
|
}
|
|
47
|
-
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sun/sunlint/maintainability",
|
|
3
|
+
"description": "Maintainability and clean code focused configuration",
|
|
4
|
+
"rules": {
|
|
5
|
+
"C024": "warn",
|
|
6
|
+
"C031": "warn",
|
|
7
|
+
"C048": "warn",
|
|
8
|
+
"C052": "warn",
|
|
9
|
+
"C061": "warn",
|
|
10
|
+
"C067": "warn",
|
|
11
|
+
"C076": "warn",
|
|
12
|
+
"S008": "warn"
|
|
13
|
+
},
|
|
14
|
+
"categories": {
|
|
15
|
+
"maintainability": "warn"
|
|
16
|
+
},
|
|
17
|
+
"languages": [
|
|
18
|
+
"typescript",
|
|
19
|
+
"javascript",
|
|
20
|
+
"dart",
|
|
21
|
+
"java",
|
|
22
|
+
"kotlin",
|
|
23
|
+
"swift"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"**/node_modules/**",
|
|
27
|
+
"**/build/**",
|
|
28
|
+
"**/dist/**",
|
|
29
|
+
"**/*.generated.*",
|
|
30
|
+
"**/*.min.*"
|
|
31
|
+
],
|
|
32
|
+
"metadata": {
|
|
33
|
+
"totalRules": 8,
|
|
34
|
+
"removedRules": 0,
|
|
35
|
+
"lastUpdated": "2025-07-30T08:59:10.120Z",
|
|
36
|
+
"source": "origin-rules"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sun/sunlint/performance",
|
|
3
|
+
"description": "Performance-focused configuration for optimization",
|
|
4
|
+
"rules": {
|
|
5
|
+
"C043": "warn",
|
|
6
|
+
"C056": "warn"
|
|
7
|
+
},
|
|
8
|
+
"categories": {
|
|
9
|
+
"performance": "warn"
|
|
10
|
+
},
|
|
11
|
+
"languages": [
|
|
12
|
+
"typescript",
|
|
13
|
+
"javascript",
|
|
14
|
+
"dart",
|
|
15
|
+
"java",
|
|
16
|
+
"kotlin",
|
|
17
|
+
"swift"
|
|
18
|
+
],
|
|
19
|
+
"exclude": [
|
|
20
|
+
"**/node_modules/**",
|
|
21
|
+
"**/build/**",
|
|
22
|
+
"**/dist/**",
|
|
23
|
+
"**/*.generated.*",
|
|
24
|
+
"**/*.min.*"
|
|
25
|
+
],
|
|
26
|
+
"metadata": {
|
|
27
|
+
"totalRules": 2,
|
|
28
|
+
"removedRules": 0,
|
|
29
|
+
"lastUpdated": "2025-07-30T08:59:10.120Z",
|
|
30
|
+
"source": "origin-rules"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sun/sunlint/quality",
|
|
3
|
+
"description": "Code quality and best practices focused configuration",
|
|
4
|
+
"rules": {
|
|
5
|
+
"C003": "warn",
|
|
6
|
+
"C006": "warn",
|
|
7
|
+
"C013": "warn",
|
|
8
|
+
"C014": "warn",
|
|
9
|
+
"C017": "warn",
|
|
10
|
+
"C018": "warn",
|
|
11
|
+
"C019": "warn",
|
|
12
|
+
"C023": "warn",
|
|
13
|
+
"C024": "warn",
|
|
14
|
+
"C029": "warn",
|
|
15
|
+
"C030": "warn",
|
|
16
|
+
"C031": "warn",
|
|
17
|
+
"C033": "warn",
|
|
18
|
+
"C035": "warn",
|
|
19
|
+
"C040": "warn",
|
|
20
|
+
"C042": "warn",
|
|
21
|
+
"C043": "warn",
|
|
22
|
+
"C047": "warn",
|
|
23
|
+
"C052": "warn",
|
|
24
|
+
"C060": "warn",
|
|
25
|
+
"C061": "warn",
|
|
26
|
+
"C065": "warn",
|
|
27
|
+
"C067": "warn",
|
|
28
|
+
"C070": "warn",
|
|
29
|
+
"C072": "warn",
|
|
30
|
+
"C073": "warn",
|
|
31
|
+
"C075": "warn",
|
|
32
|
+
"C076": "warn",
|
|
33
|
+
"S001": "error",
|
|
34
|
+
"S002": "error",
|
|
35
|
+
"S004": "warn",
|
|
36
|
+
"S005": "warn",
|
|
37
|
+
"S006": "warn",
|
|
38
|
+
"S007": "warn",
|
|
39
|
+
"S008": "warn",
|
|
40
|
+
"S009": "warn",
|
|
41
|
+
"S010": "error",
|
|
42
|
+
"S011": "error",
|
|
43
|
+
"S013": "error",
|
|
44
|
+
"S014": "warn",
|
|
45
|
+
"S017": "error",
|
|
46
|
+
"S021": "warn",
|
|
47
|
+
"S022": "warn",
|
|
48
|
+
"S023": "error",
|
|
49
|
+
"S025": "warn",
|
|
50
|
+
"S026": "warn",
|
|
51
|
+
"S027": "warn",
|
|
52
|
+
"S028": "warn",
|
|
53
|
+
"S029": "error",
|
|
54
|
+
"S030": "warn",
|
|
55
|
+
"S033": "warn",
|
|
56
|
+
"S034": "warn",
|
|
57
|
+
"S035": "warn",
|
|
58
|
+
"S036": "error",
|
|
59
|
+
"S041": "warn",
|
|
60
|
+
"S042": "warn",
|
|
61
|
+
"S043": "warn",
|
|
62
|
+
"S044": "warn",
|
|
63
|
+
"S045": "warn",
|
|
64
|
+
"S046": "warn",
|
|
65
|
+
"S047": "error",
|
|
66
|
+
"S048": "warn",
|
|
67
|
+
"S049": "warn",
|
|
68
|
+
"S050": "warn",
|
|
69
|
+
"S051": "warn",
|
|
70
|
+
"S052": "warn",
|
|
71
|
+
"S053": "warn",
|
|
72
|
+
"S054": "error",
|
|
73
|
+
"S055": "warn",
|
|
74
|
+
"S057": "warn",
|
|
75
|
+
"S058": "warn",
|
|
76
|
+
"S059": "warn"
|
|
77
|
+
},
|
|
78
|
+
"categories": {
|
|
79
|
+
"quality": "warn",
|
|
80
|
+
"security": "error"
|
|
81
|
+
},
|
|
82
|
+
"languages": [
|
|
83
|
+
"typescript",
|
|
84
|
+
"javascript",
|
|
85
|
+
"dart",
|
|
86
|
+
"java",
|
|
87
|
+
"kotlin",
|
|
88
|
+
"swift"
|
|
89
|
+
],
|
|
90
|
+
"exclude": [
|
|
91
|
+
"**/node_modules/**",
|
|
92
|
+
"**/build/**",
|
|
93
|
+
"**/dist/**",
|
|
94
|
+
"**/*.generated.*",
|
|
95
|
+
"**/*.min.*"
|
|
96
|
+
],
|
|
97
|
+
"metadata": {
|
|
98
|
+
"totalRules": 72,
|
|
99
|
+
"removedRules": 0,
|
|
100
|
+
"lastUpdated": "2025-07-30T08:59:10.121Z",
|
|
101
|
+
"source": "origin-rules"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -1,24 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sun/sunlint/recommended",
|
|
3
|
-
"description": "Sun* Engineering recommended configuration",
|
|
3
|
+
"description": "Sun* Engineering recommended configuration - essential rules from core files (common-en.md + security-en.md)",
|
|
4
4
|
"rules": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
5
|
+
"C003": "warn",
|
|
6
|
+
"C006": "warn",
|
|
7
|
+
"C010": "warn",
|
|
8
|
+
"C019": "warn",
|
|
9
|
+
"C029": "warn",
|
|
10
|
+
"C031": "warn",
|
|
11
|
+
"C032": "warn",
|
|
12
|
+
"C041": "error",
|
|
13
|
+
"S001": "error",
|
|
14
|
+
"S002": "error",
|
|
15
|
+
"S003": "warn",
|
|
16
|
+
"S005": "error",
|
|
17
|
+
"S007": "error",
|
|
18
|
+
"S012": "error",
|
|
19
|
+
"S013": "error"
|
|
8
20
|
},
|
|
9
21
|
"categories": {
|
|
10
|
-
"quality": "
|
|
11
|
-
"security": "error"
|
|
12
|
-
"logging": "warning",
|
|
13
|
-
"naming": "off",
|
|
14
|
-
"validation": "error"
|
|
22
|
+
"quality": "warn",
|
|
23
|
+
"security": "error"
|
|
15
24
|
},
|
|
16
|
-
"languages": [
|
|
25
|
+
"languages": [
|
|
26
|
+
"typescript",
|
|
27
|
+
"javascript",
|
|
28
|
+
"dart",
|
|
29
|
+
"java",
|
|
30
|
+
"kotlin",
|
|
31
|
+
"swift"
|
|
32
|
+
],
|
|
17
33
|
"exclude": [
|
|
18
34
|
"**/node_modules/**",
|
|
19
35
|
"**/build/**",
|
|
20
36
|
"**/dist/**",
|
|
21
37
|
"**/*.generated.*",
|
|
22
38
|
"**/*.min.*"
|
|
23
|
-
]
|
|
24
|
-
|
|
39
|
+
],
|
|
40
|
+
"metadata": {
|
|
41
|
+
"totalRules": 15,
|
|
42
|
+
"coreRules": 15,
|
|
43
|
+
"approach": "core-files-only",
|
|
44
|
+
"source": "common-en.md + security-en.md",
|
|
45
|
+
"lastUpdated": "2025-07-30T09:30:00.000Z",
|
|
46
|
+
"version": "2.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|