@shuji-bonji/rxjs-mcp 0.2.2 → 0.4.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/CHANGELOG.md +34 -0
- package/README.md +58 -0
- package/dist/data/creation-functions.d.ts +2 -0
- package/dist/data/creation-functions.d.ts.map +1 -1
- package/dist/data/creation-functions.js +63 -21
- package/dist/data/creation-functions.js.map +1 -1
- package/dist/data/lint-rules.d.ts +33 -0
- package/dist/data/lint-rules.d.ts.map +1 -0
- package/dist/data/lint-rules.js +1042 -0
- package/dist/data/lint-rules.js.map +1 -0
- package/dist/data/operators.d.ts.map +1 -1
- package/dist/data/operators.js +238 -81
- package/dist/data/operators.js.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/tools/analyze-operators.d.ts.map +1 -1
- package/dist/tools/analyze-operators.js +29 -8
- package/dist/tools/analyze-operators.js.map +1 -1
- package/dist/tools/lint-rxjs.d.ts +3 -0
- package/dist/tools/lint-rxjs.d.ts.map +1 -0
- package/dist/tools/lint-rxjs.js +132 -0
- package/dist/tools/lint-rxjs.js.map +1 -0
- package/dist/types.d.ts +35 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +28 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.0] - 2026-05-17
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **`lint_rxjs` ツール**: eslint-plugin-rxjs-x の recommended/strict ルールを正規表現ベースで再実装。コードスニペットを渡すだけで即座にフィードバック(ESLint 不要)
|
|
12
|
+
- **20 recommended ルール**: no-async-subscribe, no-create, no-nested-subscribe, no-sharereplay, prefer-root-operators, no-topromise, no-unsafe-takeuntil, throw-error 等
|
|
13
|
+
- **8 strict ルール**: no-exposed-subjects, no-floating-observables, no-misused-observables, no-subclass, finnish 等
|
|
14
|
+
- **フレームワーク固有ルール**: Angular (takeUntilDestroyed 推奨), React (useEffect 内 subscribe), Vue (onUnmounted cleanup)
|
|
15
|
+
- `config` パラメータ: `recommended`(デフォルト)/ `strict`
|
|
16
|
+
- `framework` パラメータ: `angular` / `react` / `vue` / `none`
|
|
17
|
+
- `rules` パラメータ: 個別ルール指定可能
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `DOC_BASE_URL` エイリアスを削除 (v0.3.0 で deprecated 告知済み)
|
|
21
|
+
|
|
22
|
+
## [0.3.0] - 2026-05-16
|
|
23
|
+
|
|
24
|
+
### BREAKING
|
|
25
|
+
- **`OperatorInfo` / `CreationFunctionInfo` 型変更**: `docUrl` フィールドを廃止し、3階層参照 (`officialUrl` / `sourceUrl` / `guideUrl`) に置き換え。`DOC_BASE_URL` は `GUIDE_BASE_URL` のエイリアスとして残存するが v0.4.0 で削除予定。
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- **3階層ドキュメント参照システム**:
|
|
29
|
+
- `officialUrl` — rxjs.dev (権威的、人間向け)
|
|
30
|
+
- `sourceUrl` — GitHub ソース (tag `7.8.2` 固定、AI が読めるJSDoc + 実装)
|
|
31
|
+
- `guideUrl` — バイリンガルガイドサイト (JP/EN 学習者向け)
|
|
32
|
+
- **Deprecation メタデータ** (`DeprecationInfo`): `deprecated` / `since` / `replacement` フィールドを追加。対象: `pluck` (7.2.0), `mapTo` (7.2.0), `retryWhen` (7.3.0)
|
|
33
|
+
- **URL ヘルパー関数**: `buildOfficialUrl()`, `buildSourceUrl()`, `buildGuideUrl()` を `types.ts` に追加
|
|
34
|
+
- **analyze_operators 出力強化**:
|
|
35
|
+
- 各演算子に Official / Source / Guide の3階層リンクを表示
|
|
36
|
+
- deprecated な演算子に⚠️警告と代替案を inline 表示
|
|
37
|
+
- **URL validation CI** (`.github/workflows/url-validation.yml`): push/PR/週次スケジュールで全 URL の HTTP ステータスを自動検証
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
- `analyze_operators` のリファレンスリンク形式を `📖 [Documentation](...)` から `📖 [Official](...) | [Source](...) | [Guide](...)` に変更
|
|
41
|
+
|
|
8
42
|
## [0.2.2] - 2026-05-16
|
|
9
43
|
|
|
10
44
|
### Fixed
|
package/README.md
CHANGED
|
@@ -212,6 +212,31 @@ Available patterns:
|
|
|
212
212
|
- `cache-refresh` - Cache with refresh strategy
|
|
213
213
|
- And more...
|
|
214
214
|
|
|
215
|
+
### lint_rxjs
|
|
216
|
+
|
|
217
|
+
Lint RxJS code snippets for common issues and best practices. Based on [eslint-plugin-rxjs-x](https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x) rules.
|
|
218
|
+
|
|
219
|
+
```typescript
|
|
220
|
+
// Parameters:
|
|
221
|
+
{
|
|
222
|
+
code: string; // RxJS code to lint
|
|
223
|
+
config?: 'recommended' | 'strict'; // Rule set (default: recommended)
|
|
224
|
+
framework?: 'angular' | 'react' | 'vue' | 'none'; // Framework context
|
|
225
|
+
rules?: string[]; // Specific rules to check (overrides config)
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Config levels:**
|
|
230
|
+
|
|
231
|
+
- `recommended` — 20 rules covering the most common issues
|
|
232
|
+
- `strict` — All rules including style checks (finnish, no-exposed-subjects, etc.)
|
|
233
|
+
|
|
234
|
+
**Framework-specific checks:**
|
|
235
|
+
|
|
236
|
+
- **Angular** — Detects missing `takeUntilDestroyed()` or `takeUntil(destroy$)` in components
|
|
237
|
+
- **React** — Detects `subscribe()` without `useEffect` cleanup
|
|
238
|
+
- **Vue** — Detects `subscribe()` without `onUnmounted` cleanup
|
|
239
|
+
|
|
215
240
|
## Usage Examples
|
|
216
241
|
|
|
217
242
|
### With Claude
|
|
@@ -329,9 +354,42 @@ Future Meta-MCP integration will allow seamless coordination between these tools
|
|
|
329
354
|
│ • analyze_operators│
|
|
330
355
|
│ • detect_memory_leak│
|
|
331
356
|
│ • suggest_pattern│
|
|
357
|
+
│ • lint_rxjs │
|
|
332
358
|
└─────────────────┘
|
|
333
359
|
```
|
|
334
360
|
|
|
361
|
+
## Documentation Reference System
|
|
362
|
+
|
|
363
|
+
Since v0.3.0, `analyze_operators` outputs three-tier documentation links for each operator and creation function:
|
|
364
|
+
|
|
365
|
+
| Tier | Source | Purpose | AI-readable? |
|
|
366
|
+
|------|--------|---------|:---:|
|
|
367
|
+
| **Official** | [rxjs.dev](https://rxjs.dev) | Authoritative API reference for humans | ❌ (SPA) |
|
|
368
|
+
| **Source** | [GitHub (tag 7.8.2)](https://github.com/ReactiveX/rxjs/tree/7.8.2/src/internal) | JSDoc + implementation — the richest context for AI | ✅ |
|
|
369
|
+
| **Guide** | [RxJS-with-TypeScript](https://github.com/shuji-bonji/RxJS-with-TypeScript) | Bilingual JP/EN explanations with practical examples | ✅ |
|
|
370
|
+
|
|
371
|
+
### Why include the community guide alongside official docs?
|
|
372
|
+
|
|
373
|
+
1. **rxjs.dev is a client-rendered SPA.** AI assistants cannot fetch its content — HTTP requests return an empty shell with JavaScript loaders. The official site is therefore a "link to hand to humans," not a source AI can read.
|
|
374
|
+
|
|
375
|
+
2. **GitHub source provides raw truth.** The RxJS source code (pinned at tag `7.8.2`) contains JSDoc, type signatures, and implementation details. This is the primary reference for AI assistants.
|
|
376
|
+
|
|
377
|
+
3. **The bilingual guide adds learning context.** It organizes operators by use-case (not just alphabetically), provides runnable examples, and offers Japanese translations. For Japanese-speaking users or learners, this fills a gap that neither rxjs.dev nor raw source addresses.
|
|
378
|
+
|
|
379
|
+
### Priority order
|
|
380
|
+
|
|
381
|
+
When the MCP server outputs references, it follows this priority:
|
|
382
|
+
|
|
383
|
+
1. `officialUrl` — always shown (authority, human-readable)
|
|
384
|
+
2. `sourceUrl` — shown when available (AI should read this)
|
|
385
|
+
3. `guideUrl` — shown when the page exists (supplementary)
|
|
386
|
+
|
|
387
|
+
If a guide page does not yet exist for an operator, the field is simply omitted (no broken link). Coverage is tracked by the [URL validation CI](.github/workflows/url-validation.yml).
|
|
388
|
+
|
|
389
|
+
### Can I disable the guide references?
|
|
390
|
+
|
|
391
|
+
Currently there is no runtime option to exclude `guideUrl` from output. If you prefer official-only references, you can fork this server or open a feature request. A future version may support a `--references=official,source` flag.
|
|
392
|
+
|
|
335
393
|
## Contributing
|
|
336
394
|
|
|
337
395
|
Contributions are welcome! Please feel free to submit a PR.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CreationFunctionInfo } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* RxJS Creation Functions Database
|
|
4
|
+
* Three-tier reference: officialUrl (rxjs.dev) / sourceUrl (GitHub) / guideUrl (bilingual site)
|
|
5
|
+
*
|
|
4
6
|
* Based on https://shuji-bonji.github.io/RxJS-with-TypeScript/
|
|
5
7
|
*/
|
|
6
8
|
export declare const creationFunctionDatabase: Record<string, CreationFunctionInfo>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-functions.d.ts","sourceRoot":"","sources":["../../src/data/creation-functions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"creation-functions.d.ts","sourceRoot":"","sources":["../../src/data/creation-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EAIrB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CA8KzE,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildOfficialUrl, buildSourceUrl, buildGuideUrl, } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* RxJS Creation Functions Database
|
|
4
|
+
* Three-tier reference: officialUrl (rxjs.dev) / sourceUrl (GitHub) / guideUrl (bilingual site)
|
|
5
|
+
*
|
|
4
6
|
* Based on https://shuji-bonji.github.io/RxJS-with-TypeScript/
|
|
5
7
|
*/
|
|
6
8
|
export const creationFunctionDatabase = {
|
|
@@ -9,127 +11,167 @@ export const creationFunctionDatabase = {
|
|
|
9
11
|
name: 'of',
|
|
10
12
|
category: 'basic',
|
|
11
13
|
description: 'Emits the arguments you provide, then completes',
|
|
12
|
-
|
|
14
|
+
officialUrl: buildOfficialUrl('creation', 'of'),
|
|
15
|
+
sourceUrl: buildSourceUrl('observable/of.ts'),
|
|
16
|
+
guideUrl: buildGuideUrl('creation-functions/basic/of'),
|
|
13
17
|
},
|
|
14
18
|
'from': {
|
|
15
19
|
name: 'from',
|
|
16
20
|
category: 'basic',
|
|
17
21
|
description: 'Creates an Observable from an Array, Promise, or Iterable',
|
|
18
|
-
|
|
22
|
+
officialUrl: buildOfficialUrl('creation', 'from'),
|
|
23
|
+
sourceUrl: buildSourceUrl('observable/from.ts'),
|
|
24
|
+
guideUrl: buildGuideUrl('creation-functions/basic/from'),
|
|
19
25
|
},
|
|
20
26
|
'fromEvent': {
|
|
21
27
|
name: 'fromEvent',
|
|
22
28
|
category: 'basic',
|
|
23
29
|
description: 'Creates an Observable from DOM events',
|
|
24
|
-
|
|
30
|
+
officialUrl: buildOfficialUrl('creation', 'fromEvent'),
|
|
31
|
+
sourceUrl: buildSourceUrl('observable/fromEvent.ts'),
|
|
32
|
+
guideUrl: buildGuideUrl('creation-functions/basic/fromEvent'),
|
|
25
33
|
},
|
|
26
34
|
'interval': {
|
|
27
35
|
name: 'interval',
|
|
28
36
|
category: 'basic',
|
|
29
37
|
description: 'Emits incremental numbers at specified intervals',
|
|
30
|
-
|
|
38
|
+
officialUrl: buildOfficialUrl('creation', 'interval'),
|
|
39
|
+
sourceUrl: buildSourceUrl('observable/interval.ts'),
|
|
40
|
+
guideUrl: buildGuideUrl('creation-functions/basic/interval'),
|
|
31
41
|
},
|
|
32
42
|
'timer': {
|
|
33
43
|
name: 'timer',
|
|
34
44
|
category: 'basic',
|
|
35
45
|
description: 'Emits after a delay, then optionally at intervals',
|
|
36
|
-
|
|
46
|
+
officialUrl: buildOfficialUrl('creation', 'timer'),
|
|
47
|
+
sourceUrl: buildSourceUrl('observable/timer.ts'),
|
|
48
|
+
guideUrl: buildGuideUrl('creation-functions/basic/timer'),
|
|
37
49
|
},
|
|
38
50
|
// loop
|
|
39
51
|
'range': {
|
|
40
52
|
name: 'range',
|
|
41
53
|
category: 'loop',
|
|
42
54
|
description: 'Emits a sequence of numbers within a range',
|
|
43
|
-
|
|
55
|
+
officialUrl: buildOfficialUrl('creation', 'range'),
|
|
56
|
+
sourceUrl: buildSourceUrl('observable/range.ts'),
|
|
57
|
+
guideUrl: buildGuideUrl('creation-functions/loop/range'),
|
|
44
58
|
},
|
|
45
59
|
'generate': {
|
|
46
60
|
name: 'generate',
|
|
47
61
|
category: 'loop',
|
|
48
62
|
description: 'Creates an Observable with custom iteration logic',
|
|
49
|
-
|
|
63
|
+
officialUrl: buildOfficialUrl('creation', 'generate'),
|
|
64
|
+
sourceUrl: buildSourceUrl('observable/generate.ts'),
|
|
65
|
+
guideUrl: buildGuideUrl('creation-functions/loop/generate'),
|
|
50
66
|
},
|
|
51
67
|
// http
|
|
52
68
|
'ajax': {
|
|
53
69
|
name: 'ajax',
|
|
54
70
|
category: 'http',
|
|
55
71
|
description: 'Creates an Observable for AJAX requests',
|
|
56
|
-
|
|
72
|
+
officialUrl: 'https://rxjs.dev/api/ajax/ajax',
|
|
73
|
+
sourceUrl: buildSourceUrl('ajax/ajax.ts'),
|
|
74
|
+
guideUrl: buildGuideUrl('creation-functions/http-communication/ajax'),
|
|
57
75
|
},
|
|
58
76
|
'fromFetch': {
|
|
59
77
|
name: 'fromFetch',
|
|
60
78
|
category: 'http',
|
|
61
79
|
description: 'Creates an Observable from Fetch API',
|
|
62
|
-
|
|
80
|
+
officialUrl: buildOfficialUrl('creation', 'fromFetch'),
|
|
81
|
+
sourceUrl: buildSourceUrl('observable/dom/fetch.ts'),
|
|
82
|
+
guideUrl: buildGuideUrl('creation-functions/http-communication/fromFetch'),
|
|
63
83
|
},
|
|
64
84
|
// combination
|
|
65
85
|
'concat': {
|
|
66
86
|
name: 'concat',
|
|
67
87
|
category: 'combination',
|
|
68
88
|
description: 'Concatenates Observables in sequence',
|
|
69
|
-
|
|
89
|
+
officialUrl: buildOfficialUrl('creation', 'concat'),
|
|
90
|
+
sourceUrl: buildSourceUrl('observable/concat.ts'),
|
|
91
|
+
guideUrl: buildGuideUrl('creation-functions/combination/concat'),
|
|
70
92
|
},
|
|
71
93
|
'merge': {
|
|
72
94
|
name: 'merge',
|
|
73
95
|
category: 'combination',
|
|
74
96
|
description: 'Combines multiple Observables, emitting all values',
|
|
75
|
-
|
|
97
|
+
officialUrl: buildOfficialUrl('creation', 'merge'),
|
|
98
|
+
sourceUrl: buildSourceUrl('observable/merge.ts'),
|
|
99
|
+
guideUrl: buildGuideUrl('creation-functions/combination/merge'),
|
|
76
100
|
},
|
|
77
101
|
'combineLatest': {
|
|
78
102
|
name: 'combineLatest',
|
|
79
103
|
category: 'combination',
|
|
80
104
|
description: 'Combines latest values from all Observables',
|
|
81
|
-
|
|
105
|
+
officialUrl: buildOfficialUrl('creation', 'combineLatest'),
|
|
106
|
+
sourceUrl: buildSourceUrl('observable/combineLatest.ts'),
|
|
107
|
+
guideUrl: buildGuideUrl('creation-functions/combination/combineLatest'),
|
|
82
108
|
},
|
|
83
109
|
'zip': {
|
|
84
110
|
name: 'zip',
|
|
85
111
|
category: 'combination',
|
|
86
112
|
description: 'Combines values by index into arrays',
|
|
87
|
-
|
|
113
|
+
officialUrl: buildOfficialUrl('creation', 'zip'),
|
|
114
|
+
sourceUrl: buildSourceUrl('observable/zip.ts'),
|
|
115
|
+
guideUrl: buildGuideUrl('creation-functions/combination/zip'),
|
|
88
116
|
},
|
|
89
117
|
'forkJoin': {
|
|
90
118
|
name: 'forkJoin',
|
|
91
119
|
category: 'combination',
|
|
92
120
|
description: 'Waits for all to complete, emits final values',
|
|
93
|
-
|
|
121
|
+
officialUrl: buildOfficialUrl('creation', 'forkJoin'),
|
|
122
|
+
sourceUrl: buildSourceUrl('observable/forkJoin.ts'),
|
|
123
|
+
guideUrl: buildGuideUrl('creation-functions/combination/forkJoin'),
|
|
94
124
|
},
|
|
95
125
|
// selection
|
|
96
126
|
'race': {
|
|
97
127
|
name: 'race',
|
|
98
128
|
category: 'selection',
|
|
99
129
|
description: 'Emits from the Observable that emits first',
|
|
100
|
-
|
|
130
|
+
officialUrl: buildOfficialUrl('creation', 'race'),
|
|
131
|
+
sourceUrl: buildSourceUrl('observable/race.ts'),
|
|
132
|
+
guideUrl: buildGuideUrl('creation-functions/selection/race'),
|
|
101
133
|
},
|
|
102
134
|
'partition': {
|
|
103
135
|
name: 'partition',
|
|
104
136
|
category: 'selection',
|
|
105
137
|
description: 'Splits Observable into two based on predicate',
|
|
106
|
-
|
|
138
|
+
officialUrl: buildOfficialUrl('creation', 'partition'),
|
|
139
|
+
sourceUrl: buildSourceUrl('observable/partition.ts'),
|
|
140
|
+
guideUrl: buildGuideUrl('creation-functions/selection/partition'),
|
|
107
141
|
},
|
|
108
142
|
// conditional
|
|
109
143
|
'iif': {
|
|
110
144
|
name: 'iif',
|
|
111
145
|
category: 'conditional',
|
|
112
146
|
description: 'Subscribes to one of two Observables based on condition',
|
|
113
|
-
|
|
147
|
+
officialUrl: buildOfficialUrl('creation', 'iif'),
|
|
148
|
+
sourceUrl: buildSourceUrl('observable/iif.ts'),
|
|
149
|
+
guideUrl: buildGuideUrl('creation-functions/conditional/iif'),
|
|
114
150
|
},
|
|
115
151
|
'defer': {
|
|
116
152
|
name: 'defer',
|
|
117
153
|
category: 'conditional',
|
|
118
154
|
description: 'Creates Observable lazily at subscription time',
|
|
119
|
-
|
|
155
|
+
officialUrl: buildOfficialUrl('creation', 'defer'),
|
|
156
|
+
sourceUrl: buildSourceUrl('observable/defer.ts'),
|
|
157
|
+
guideUrl: buildGuideUrl('creation-functions/conditional/defer'),
|
|
120
158
|
},
|
|
121
159
|
// control
|
|
122
160
|
'scheduled': {
|
|
123
161
|
name: 'scheduled',
|
|
124
162
|
category: 'control',
|
|
125
163
|
description: 'Creates an Observable with a specific scheduler',
|
|
126
|
-
|
|
164
|
+
officialUrl: buildOfficialUrl('creation', 'scheduled'),
|
|
165
|
+
sourceUrl: buildSourceUrl('scheduled/scheduled.ts'),
|
|
166
|
+
guideUrl: buildGuideUrl('creation-functions/control/scheduled'),
|
|
127
167
|
},
|
|
128
168
|
'using': {
|
|
129
169
|
name: 'using',
|
|
130
170
|
category: 'control',
|
|
131
171
|
description: 'Creates Observable with resource management',
|
|
132
|
-
|
|
172
|
+
officialUrl: buildOfficialUrl('creation', 'using'),
|
|
173
|
+
sourceUrl: buildSourceUrl('observable/using.ts'),
|
|
174
|
+
guideUrl: buildGuideUrl('creation-functions/control/using'),
|
|
133
175
|
},
|
|
134
176
|
};
|
|
135
177
|
//# sourceMappingURL=creation-functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"creation-functions.js","sourceRoot":"","sources":["../../src/data/creation-functions.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"creation-functions.js","sourceRoot":"","sources":["../../src/data/creation-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,aAAa,GACd,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAyC;IAC5E,QAAQ;IACR,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,OAAO;QACjB,WAAW,EAAE,iDAAiD;QAC9D,WAAW,EAAE,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC;QAC/C,SAAS,EAAE,cAAc,CAAC,kBAAkB,CAAC;QAC7C,QAAQ,EAAE,aAAa,CAAC,6BAA6B,CAAC;KACvD;IACD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Ac;IACd,KAAK,EAAE;QACL,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,aAAa;QACvB,WAAW,EAAE,yDAAyD;QACtE,WAAW,EAAE,gBAAgB,CAAC,UAAU,EAAE,KAAK,CAAC;QAChD,SAAS,EAAE,cAAc,CAAC,mBAAmB,CAAC;QAC9C,QAAQ,EAAE,aAAa,CAAC,oCAAoC,CAAC;KAC9D;IACD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,aAAa;QACvB,WAAW,EAAE,gDAAgD;QAC7D,WAAW,EAAE,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC;QAClD,SAAS,EAAE,cAAc,CAAC,qBAAqB,CAAC;QAChD,QAAQ,EAAE,aAAa,CAAC,sCAAsC,CAAC;KAChE;IAED,UAAU;IACV,WAAW,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,iDAAiD;QAC9D,WAAW,EAAE,gBAAgB,CAAC,UAAU,EAAE,WAAW,CAAC;QACtD,SAAS,EAAE,cAAc,CAAC,wBAAwB,CAAC;QACnD,QAAQ,EAAE,aAAa,CAAC,sCAAsC,CAAC;KAChE;IACD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,SAAS;QACnB,WAAW,EAAE,6CAA6C;QAC1D,WAAW,EAAE,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC;QAClD,SAAS,EAAE,cAAc,CAAC,qBAAqB,CAAC;QAChD,QAAQ,EAAE,aAAa,CAAC,kCAAkC,CAAC;KAC5D;CACF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RxJS Lint Rules Database
|
|
3
|
+
*
|
|
4
|
+
* Regex-based reimplementation of eslint-plugin-rxjs-x rules.
|
|
5
|
+
* These rules work on code snippets without requiring ESLint runtime or TypeScript parser.
|
|
6
|
+
*
|
|
7
|
+
* Reference: https://github.com/JasonWeinzierl/eslint-plugin-rxjs-x
|
|
8
|
+
*/
|
|
9
|
+
export type LintSeverity = 'error' | 'warning' | 'info';
|
|
10
|
+
export type LintConfig = 'recommended' | 'strict';
|
|
11
|
+
export type FrameworkContext = 'angular' | 'react' | 'vue' | 'none';
|
|
12
|
+
export interface LintDiagnostic {
|
|
13
|
+
rule: string;
|
|
14
|
+
severity: LintSeverity;
|
|
15
|
+
message: string;
|
|
16
|
+
line?: number;
|
|
17
|
+
suggestion?: string;
|
|
18
|
+
docUrl: string;
|
|
19
|
+
}
|
|
20
|
+
export interface LintRule {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
severity: LintSeverity;
|
|
24
|
+
config: LintConfig;
|
|
25
|
+
/** Whether this rule requires type information (cannot be fully checked with regex) */
|
|
26
|
+
requiresTypeInfo: boolean;
|
|
27
|
+
docUrl: string;
|
|
28
|
+
check: (code: string, framework: FrameworkContext) => LintDiagnostic[];
|
|
29
|
+
}
|
|
30
|
+
export declare const allLintRules: LintRule[];
|
|
31
|
+
/** Get rules for a given config level */
|
|
32
|
+
export declare function getRulesForConfig(config: LintConfig): LintRule[];
|
|
33
|
+
//# sourceMappingURL=lint-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-rules.d.ts","sourceRoot":"","sources":["../../src/data/lint-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,QAAQ,CAAC;AAClD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAEpE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,uFAAuF;IACvF,gBAAgB,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,KAAK,cAAc,EAAE,CAAC;CACxE;AAigCD,eAAO,MAAM,YAAY,EAAE,QAAQ,EAiClC,CAAC;AAEF,yCAAyC;AACzC,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,QAAQ,EAAE,CAMhE"}
|