trigger_system 1.0.7 → 1.1.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/README.md CHANGED
@@ -52,7 +52,7 @@ _Guide to advanced logic like counters, sequences, and combos._
52
52
  _Tools to help you build and debug rules._
53
53
 
54
54
  - CLI Validator (`bun run validate`)
55
- - VS Code LSP Integration
55
+ - VS Code LSP Integration (Autocompletion, Linting Checks)
56
56
  - Circular Dependency Detection
57
57
 
58
58
  ### [📝 YAML Best Practices](./docs/yaml-best-practices.md)
@@ -74,6 +74,35 @@ _Learn by doing with progressive tutorials._
74
74
 
75
75
  ---
76
76
 
77
+ ## 🛠️ Linting & Formatting
78
+
79
+ The project now includes built-in support for **Biome** to ensure code quality and consistency.
80
+
81
+ ```bash
82
+ # Check for linting errors and formatting issues
83
+ bun run check
84
+
85
+ # Fix linting issues automatically
86
+ bun run lint:fix
87
+
88
+ # Format code automatically
89
+ bun run format:fix
90
+ ```
91
+
92
+ ## 🧠 LSP Features & Directives
93
+
94
+ The system includes a Language Server Protocol (LSP) implementation that provides:
95
+
96
+ - **Autocompletion**: Context-aware suggestions for keys, operators, and paths.
97
+ - **Path Resolution**: Smart autocomplete for file paths in imports (Linux/Windows compatible).
98
+ - **Directives**: Control the validator directly from your YAML files.
99
+
100
+ ### Supported Directives
101
+
102
+ - `# @import alias from "./path/to/data.json"`: Import data for autocomplete context.
103
+ - `# @disable-lint`: Disable all linting for the file.
104
+ - `# @disable-next-line`: Disable linting for the next line.
105
+
77
106
  ## 📦 Installation & Import Options
78
107
 
79
108
  ```bash
@@ -86,15 +115,15 @@ The package supports multiple import patterns for different environments:
86
115
 
87
116
  ```typescript
88
117
  // Universal import (auto-detects environment)
89
- import * as sdk from 'trigger_system';
118
+ import * as sdk from "trigger_system";
90
119
 
91
120
  // Node.js specific import (includes file system features)
92
- import * as nodeSdk from 'trigger_system/node';
121
+ import * as nodeSdk from "trigger_system/node";
93
122
 
94
123
  // Client/Browser import (optimized for browser environments)
95
- import * as clientSdk from 'trigger_system/client';
124
+ import * as clientSdk from "trigger_system/client";
96
125
  // or
97
- import * as browserSdk from 'trigger_system/browser';
126
+ import * as browserSdk from "trigger_system/browser";
98
127
  ```
99
128
 
100
129
  ### Environment-Specific Features
@@ -125,3 +154,4 @@ do:
125
154
  - **Hot Reloading**: Edit rules in YAML and see changes instantly.
126
155
  - **Type-Safe**: Built with TypeScript and ArkType for robust validation.
127
156
  - **Stateful**: Memories and counters allow for complex behaviors.
157
+ - **Smart Validation**: LSP disabled by default to avoid false positives; activates via directives or rule heuristics.