Skip to content

Commit bd0317b

Browse files
committed
linting
1 parent f668bb9 commit bd0317b

19 files changed

Lines changed: 187 additions & 19 deletions

docs/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Run tests: `dotnet test`
6565

6666
Follow [Conventional Commits](https://www.conventionalcommits.org/) format:
6767

68-
```
68+
```bash
6969
<type>: <description>
7070

7171
[optional body]
@@ -82,7 +82,7 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/) format:
8282

8383
**Examples:**
8484

85-
```
85+
```text
8686
feat: Add real-time GEX alerts with configurable thresholds
8787
8888
docs: Update architecture.md with AlertService documentation
@@ -152,7 +152,7 @@ fix: Correct zero-gamma calculation for negative GEX regimes
152152

153153
## Project Structure
154154

155-
```
155+
```bash
156156
GexVisor/
157157
├── src/
158158
│ ├── GexVisor.UI/ # Blazor WebAssembly application

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ New to GexVisor? Start here:
4848
| `/chart-test` | Chart library test sandbox | Development Only |
4949

5050
**Note:** Research visualizations are accessible via both:
51+
5152
- `/arcade` - Arcade-style visualization launcher
5253
- `/research/*` - Direct routes to individual visualizations
5354

docs/adr/0001-sqlite-wasm-selection.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Accepted
1313
GexVisor needs client-side database capabilities to query bundled GEX research data in the browser. The application is built with Blazor WebAssembly, which runs entirely in the browser without server-side processing.
1414

1515
**Requirements:**
16+
1617
- Query pre-built SQLite database files bundled with the app
1718
- Read-only access (no write operations needed)
1819
- Fast build times (avoid native WASM compilation)
@@ -27,7 +28,7 @@ Use **sql.js** with JavaScript interop for client-side SQLite queries.
2728

2829
**Architecture:**
2930

30-
```
31+
```bash
3132
Blazor Component
3233
3334
@@ -43,18 +44,21 @@ sql.js (SQLite compiled to WASM)
4344
## Consequences
4445

4546
**Benefits:**
47+
4648
- Most mature and battle-tested browser SQLite solution
4749
- No native WASM compilation needed (faster builds, smaller bundles)
4850
- Well-documented with active community
4951
- Simple integration via JS interop
5052
- Works reliably for read-only and in-memory databases
5153

5254
**Drawbacks:**
55+
5356
- Requires JavaScript interop layer (not pure .NET)
5457
- No direct Entity Framework Core support
5558
- Database is in-memory by default (requires IndexedDB for persistence if needed later)
5659

5760
**Implementation notes:**
61+
5862
- Database files bundled in `wwwroot/data/`
5963
- SqliteService handles initialization and query execution
6064
- Results returned as JSON arrays for Blazor consumption
@@ -72,6 +76,7 @@ NuGet package wrapping SQLite with EF Core support.
7276
Newer approach using sqlite-wasm in a Web Worker with OPFS persistence.
7377

7478
**Rejected because:**
79+
7580
- More complex architecture than needed
7681
- OPFS browser support varies
7782
- Overkill for read-only use case
@@ -81,6 +86,7 @@ Newer approach using sqlite-wasm in a Web Worker with OPFS persistence.
8186
Official Microsoft library compiled to WASM using native AOT.
8287

8388
**Rejected because:**
89+
8490
- Significantly slower build times
8591
- Larger WASM bundle size
8692
- Complex setup with native dependencies

docs/adr/0005-testing-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Use xUnit as test framework, Moq for mocking, bUnit for Blazor component testing
2424

2525
## Test Organization
2626

27-
```
27+
```bash
2828
tests/
2929
├── GexVisor.Core.Tests/
3030
│ ├── JournalFrameworkTests.cs # Model tests (OptionsLog, TradeLog)

docs/adr/0007-blazor-code-behind-pattern.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Adopt **partial class code-behind pattern** for complex components:
2323
3. **Styles**: `Component.razor.css` (scoped CSS)
2424

2525
**Criteria for using code-behind**:
26+
2627
- Component has 100+ lines of logic
2728
- Contains magic numbers or complex calculations
2829
- Requires unit testing of logic
@@ -33,20 +34,23 @@ Adopt **partial class code-behind pattern** for complex components:
3334
## Consequences
3435

3536
**Positive**:
37+
3638
- Magic numbers extracted to named constants
3739
- Testable calculation logic (can unit test without rendering)
3840
- Better separation of concerns
3941
- IntelliSense support in C# files
4042
- Follows ASP.NET Core MVC pattern
4143

4244
**Negative**:
45+
4346
- File count increases (3 files per component vs 2)
4447
- Requires discipline to maintain pattern
4548
- Slight learning curve for team members
4649

4750
## Implementation
4851

4952
**Template**:
53+
5054
```csharp
5155
// Component.razor.cs
5256
namespace GexVisor.UI.Components;

docs/adr/0009-linting-infrastructure.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ GexVisor needed a consistent code quality enforcement strategy across local deve
1414
- Multiple contributors with different IDE configurations
1515

1616
Requirements:
17+
1718
- Enforce consistent code style across the team
1819
- Prevent bad commits from entering the repository
1920
- Catch issues early (in IDE, not in CI)
@@ -76,21 +77,25 @@ Implement a three-layer linting approach:
7677
## Alternatives Considered
7778

7879
### 1. EditorConfig Only
80+
7981
- Pros: Simple, lightweight
8082
- Cons: No CI enforcement
8183
- Rejected: Cannot validate in CI
8284

8385
### 2. Pre-commit Framework (Python)
86+
8487
- Pros: Mature ecosystem
8588
- Cons: Python dependency
8689
- Rejected: Prefer .NET-native
8790

8891
### 3. Build-time Only
92+
8993
- Pros: No commit friction
9094
- Cons: Late discovery
9195
- Rejected: Want early catches
9296

9397
### 4. Strict Mode (All Errors)
98+
9499
- Pros: Zero tolerance
95100
- Cons: Too strict
96101
- Rejected: Prefer gradual adoption

docs/architecture.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ GexVisor has 29 services organized into 8 functional domains:
2424
| `LocalStorageService` | Scoped |`ILocalStorageService` | Browser localStorage via JS interop |
2525

2626
**IGexDataService Interface Methods:**
27+
2728
- `GetAssetClasses()` - List unique asset classes from index
2829
- `GetSymbolsForClass(string assetClass)` - Get symbols for specific asset class
2930
- `GetSymbolInfo(string symbol)` - Get metadata for specific symbol
@@ -129,7 +130,7 @@ All inherit from `BaseEntryService<T>` using the Template Method pattern.
129130

130131
**GEX Calculation Formula:**
131132

132-
```
133+
```math
133134
GEX = gamma × OI × 100 × S²
134135
```
135136

@@ -316,13 +317,14 @@ Interpolated strike price where net GEX crosses zero. Acts as pivot point for de
316317

317318
**Magic Numbers Refactoring**: Complex components like GexChart.razor now use code-behind pattern:
318319

319-
```
320+
```ps
320321
GexChart.razor (Markup only)
321322
GexChart.razor.cs (Logic + Constants)
322323
GexChart.razor.css (Styles)
323324
```
324325

325326
**Benefits**:
327+
326328
- Testable calculation logic
327329
- Named constants instead of magic numbers
328330
- Better IntelliSense/navigation
@@ -346,6 +348,7 @@ Magic numbers and configuration values are centralized in `Configuration/AppCons
346348
| `Keyboard` | UI shortcuts | Sections[], SidebarShortcuts[] |
347349

348350
**Keyboard Shortcuts Pattern**:
351+
349352
```csharp
350353
// Two collections for different display contexts
351354
public static class Keyboard
@@ -393,7 +396,7 @@ The Chart Viewer provides candlestick price charts with trade overlay support fo
393396

394397
### Data Flow
395398

396-
```
399+
```txt
397400
1. TradeDetailModal opens for trade
398401
2. TradeChart extracts Trade.Ticker and date range
399402
3. PriceDataService.GetCandlesAsync(symbol, timeframe, limit)
@@ -544,7 +547,7 @@ All persistence uses browser localStorage via `LocalStorageService`.
544547

545548
### Load Symbol Timeline
546549

547-
```
550+
```text
548551
1. User selects "SPY" in GexSidebar
549552
2. GexSidebar calls GexDataService.LoadSymbolAsync("spy")
550553
3. GexDataService issues HTTP GET to /data/spy.json
@@ -562,7 +565,7 @@ All persistence uses browser localStorage via `LocalStorageService`.
562565

563566
### Cross-Asset Comparison
564567

565-
```
568+
```text
566569
1. User selects SPY, QQQ, NVDA checkboxes
567570
2. User clicks "Compare" button
568571
3. ComparisonDashboard calls ComparisonService.LoadSymbolsAsync([...])
@@ -582,7 +585,7 @@ All persistence uses browser localStorage via `LocalStorageService`.
582585

583586
### Journal Entry Creation
584587

585-
```
588+
```text
586589
1. User fills form in ResearchNotebook
587590
2. User clicks "Save"
588591
3. Page calls NotebookService.AddAsync(entry)
@@ -597,7 +600,7 @@ All persistence uses browser localStorage via `LocalStorageService`.
597600

598601
### Trade Journal Import Flow
599602

600-
```
603+
```tex
601604
1. User uploads CSV/JSON file in TradeLogging.razor
602605
2. File content read as string
603606
3. TradeLogging calls DecisionMetadataParser.ParseJsonLog() or ParseCsvLog()

docs/chart-viewer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Date,Symbol,Open,High,Low,Close,Volume
9393
### Image Export
9494

9595
Use the ApexCharts toolbar to export:
96+
9697
- **PNG**: Bitmap image for presentations
9798
- **SVG**: Vector format for high-quality printing
9899

@@ -107,6 +108,7 @@ https://localhost:5001/chart-test?symbol=SPY&tf=1d
107108
Share this URL to show others the same chart configuration.
108109

109110
**URL Parameters**:
111+
110112
| Parameter | Example | Description |
111113
|-----------|---------|-------------|
112114
| `symbol` | SPY | Stock ticker |
@@ -119,6 +121,7 @@ Share this URL to show others the same chart configuration.
119121
When "Live API" is selected, data is fetched from the configured market data provider.
120122

121123
**Supported Providers** (configured in backend):
124+
122125
- Alpha Vantage
123126
- Alpaca Markets
124127
- Finnhub
@@ -128,6 +131,7 @@ When "Live API" is selected, data is fetched from the configured market data pro
128131
### Sample Data
129132

130133
Generates realistic OHLCV data using random walk simulation:
134+
131135
- Uses symbol-specific base prices (SPY: $475, QQQ: $400, etc.)
132136
- Simulates 2% daily volatility
133137
- Skips weekends

docs/diagrams.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ sequenceDiagram
697697
```
698698

699699
**Key components:**
700+
700701
- **DecisionMetadataParser**: Handles both JSON and CSV formats
701702
- **TradeLogService**: Manages CRUD operations and persistence
702703
- **TradeDecision**: Metadata model with pattern tracking and confidence scores
@@ -721,6 +722,7 @@ graph TD
721722
```
722723

723724
**Decision metadata includes:**
725+
724726
- Active patterns (MECH, PROB, NARR taxonomy)
725727
- Primary trigger signal
726728
- Confidence score (0-1)
@@ -735,6 +737,7 @@ graph TD
735737
## Rendering Notes
736738

737739
These diagrams render automatically in:
740+
738741
- **GitHub** - Native Mermaid support in markdown
739742
- **VS Code** - With "Markdown Preview Mermaid Support" extension
740743
- **Notion** - Paste as code block with `mermaid` language

docs/getting-started.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The application will start at `https://localhost:5001` (or the port shown in the
4242

4343
## Project Structure
4444

45-
```
45+
```bash
4646
GexVisor/
4747
├── src/
4848
│ ├── GexVisor.UI/ # Blazor WebAssembly application
@@ -163,6 +163,7 @@ GEX data is stored in `wwwroot/data/` using the following structure:
163163
```
164164

165165
**C# Models:**
166+
166167
- `GexIndex` - Index file with asset classes and symbol metadata
167168
- `SymbolInfo` - Symbol metadata with nested `DateRange`
168169
- `DateRange` - Start/end dates (DateOnly type)

0 commit comments

Comments
 (0)