-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
priority: mediumWill add consumer value when released.Will add consumer value when released.type: breaking changeModifications affect or replace the public API. ⇧ Bumps the MAJOR semver.Modifications affect or replace the public API. ⇧ Bumps the MAJOR semver.type: buildChanges to product build.Changes to product build.type: refactorRestructuring source code without changing its external behavior.Restructuring source code without changing its external behavior.type: testAdding, correcting, or improving tests (coverage).Adding, correcting, or improving tests (coverage).
Description
Refactoring proposal
1. Design summary / code smell(s)
Version 1.2.0 of archetypes-rules has:
- 19 production dependencies
- 62 development dependencies
2. Refactoring proposal(s)
-
Simplify RuleContext evaluations with @sindresorhus/ow/
isValidfunction. -
Rename the module @archetypes/rules.
-
Extend all @archetypes/rules/
Variableswith @sindresorhus/ow methods (by ECMAScript data type).
3. Code quality improvement scores 
-
The refactorings changes have either:
- Reduced complexity, duplications, issues, security issues;
- Improved maintainability or reliability; or
- Both.
3.1. Complexity measures
These measures indicate how simple—or complicated—the control flow of the application is.
- Cyclomatic Complexity
- Measures the minimum number of test cases (i.e., conditional branches) are required for full test coverage.
- Cognitive Complexity
- Measures how difficult the application is to understand.
| Version | Cyclomatic Complexity | Cognitive Complexity |
|---|---|---|
| v1.2.0 | 210 | 48 |
| 👎 v2.0.0 | 225 | 52 |
3.2. Source Lines Of Code (SLOC)
| Version | SLOC |
|---|---|
| v1.2.0 | 1,265 |
| 👎 v2.0.0 | 1,391 |
3.3. Dependencies (production)
| Version | Dependency count |
|---|---|
| v1.2.0 | 19 |
| 👍 v2.0.0 | 15 |
3.4. Bundle size (gzip)
| Version | Packed size | Unpacked Size |
|---|---|---|
| v1.2.0 | 16.1 kB | 68.9 kB |
| 👎 v2.0.0 | 16.6 kB | 71.2 kB |
3.5. Code quality results summary
| Measure | Scores |
|---|---|
| Quality gate | |
| Defects (Bugs) | |
| Duplications | |
| Maintainability | |
| Reliability | |
| Security | |
| Test coverage |
Metadata
Metadata
Assignees
Labels
priority: mediumWill add consumer value when released.Will add consumer value when released.type: breaking changeModifications affect or replace the public API. ⇧ Bumps the MAJOR semver.Modifications affect or replace the public API. ⇧ Bumps the MAJOR semver.type: buildChanges to product build.Changes to product build.type: refactorRestructuring source code without changing its external behavior.Restructuring source code without changing its external behavior.type: testAdding, correcting, or improving tests (coverage).Adding, correcting, or improving tests (coverage).