@nitra/cursor 1.6.11 → 1.6.12
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 +8 -2
- package/mdc/js-lint.mdc +3 -0
- package/mdc/text.mdc +4 -3
- package/package.json +1 -1
- package/schemas/n-cursor.json +9 -4
- package/schemas/v8r-catalog.json +18 -0
package/README.md
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
```json
|
|
16
16
|
{
|
|
17
17
|
"$schema": "https://unpkg.com/@nitra/cursor/schemas/n-cursor.json",
|
|
18
|
-
"rules": ["js-format", "npm-module", "text"]
|
|
18
|
+
"rules": ["js-format", "npm-module", "text"],
|
|
19
|
+
"skills": ["fix"]
|
|
19
20
|
}
|
|
20
21
|
```
|
|
21
22
|
|
|
@@ -33,10 +34,15 @@
|
|
|
33
34
|
{
|
|
34
35
|
"$schema": "https://unpkg.com/@nitra/cursor/schemas/n-cursor.json",
|
|
35
36
|
"version": "2.5.0",
|
|
36
|
-
"rules": ["js-format", "text"]
|
|
37
|
+
"rules": ["js-format", "text"],
|
|
38
|
+
"skills": ["fix"]
|
|
37
39
|
}
|
|
38
40
|
```
|
|
39
41
|
|
|
42
|
+
### v8r і власний каталог схем
|
|
43
|
+
|
|
44
|
+
Для перевірки `.n-cursor.json` через [v8r](https://chris48s.github.io/v8r/) передайте каталог пакета (`-c` / `--catalogs`): локально `node_modules/@nitra/cursor/schemas/v8r-catalog.json`, після публікації також [unpkg](https://unpkg.com/@nitra/cursor/schemas/v8r-catalog.json). JSON Schema конфігурації: [n-cursor.json](https://unpkg.com/@nitra/cursor/schemas/n-cursor.json).
|
|
45
|
+
|
|
40
46
|
## Запуск
|
|
41
47
|
|
|
42
48
|
```bash
|
package/mdc/js-lint.mdc
CHANGED
package/mdc/text.mdc
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Обробка та перевірка текстових файлів (cspell, markdownlint-cli2, v8r, CI)
|
|
3
3
|
alwaysApply: true
|
|
4
|
-
version: '1.
|
|
4
|
+
version: '1.18'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**cspell**, **markdownlint-cli2**, **[v8r](https://chris48s.github.io/v8r/)** ([Schema Store](https://www.schemastore.org/)), розширення **DavidAnson.vscode-markdownlint**, workflow **`lint-text`**.
|
|
@@ -31,13 +31,14 @@ version: '1.17'
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
**v8r:** чотири виклики `(bunx v8r "<glob>" || [ $? -eq 98 ])` — exit **98**, якщо glob порожній. Враховує `.gitignore`.
|
|
34
|
+
**v8r:** чотири виклики `(bunx v8r "<glob>" || [ $? -eq 98 ])` — exit **98**, якщо glob порожній. Враховує `.gitignore`. Опційно для глобу `**/*.json` додай **власний каталог схем** [`--catalogs`](https://chris48s.github.io/v8r/usage-examples/#using-a-custom-catlog) (наприклад `-c npm/schemas/v8r-catalog.json` у репозиторії пакета `@nitra/cursor` або `-c https://unpkg.com/@nitra/cursor/schemas/v8r-catalog.json`), щоб перевіряти **`.n-cursor.json`** за схемою з [unpkg](https://unpkg.com/@nitra/cursor/schemas/n-cursor.json).
|
|
35
35
|
|
|
36
|
-
У корені проєкту має бути **`.v8rignore`**: **v8r** шукає схему в [Schema Store](https://www.schemastore.org/); для JSON без запису там перевірка завершується помилкою. Мінімум виключи **`.vscode/extensions.json`** і **`.vscode/settings.json`** (немає стабільної схеми в каталозі). Інші файли без схеми — за тією ж логікою; не розширюй ignore, щоб приховати проблеми там, де схема є.
|
|
36
|
+
У корені проєкту має бути **`.v8rignore`**: **v8r** шукає схему в [Schema Store](https://www.schemastore.org/); для JSON без запису там перевірка завершується помилкою. Мінімум виключи **`.vscode/extensions.json`** і **`.vscode/settings.json`** (немає стабільної схеми в каталозі). Інші файли без схеми — за тією ж логікою; не розширюй ignore, щоб приховати проблеми там, де схема є. За потреби додай **`.git/**`** (службові JSON під `.git`) та **`npm/schemas/n-cursor.json`** у репозиторії `@nitra/cursor`, якщо для цього файлу немає стабільної схеми в ланцюжку v8r.
|
|
37
37
|
|
|
38
38
|
```text title=".v8rignore"
|
|
39
39
|
.vscode/extensions.json
|
|
40
40
|
.vscode/settings.json
|
|
41
|
+
.git/**
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
```json title=".markdownlint-cli2.jsonc"
|
package/package.json
CHANGED
package/schemas/n-cursor.json
CHANGED
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
"title": "n-cursor project config",
|
|
5
5
|
"description": "Конфігурація правил і skills для CLI @nitra/cursor (файл .n-cursor.json у корені репозиторію).",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"additionalProperties":
|
|
7
|
+
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"$schema": {
|
|
10
10
|
"type": "string",
|
|
11
|
-
"
|
|
11
|
+
"format": "uri",
|
|
12
|
+
"description": "Посилання на JSON Schema для автодоповнення та валідації в IDE; очікувано https://unpkg.com/@nitra/cursor/schemas/n-cursor.json"
|
|
12
13
|
},
|
|
13
14
|
"rules": {
|
|
14
15
|
"type": "array",
|
|
@@ -20,12 +21,16 @@
|
|
|
20
21
|
},
|
|
21
22
|
"skills": {
|
|
22
23
|
"type": "array",
|
|
23
|
-
"description": "Ідентифікатори skills без префікса n- (каталог .cursor/skills).",
|
|
24
|
+
"description": "Ідентифікатори skills без префікса n- (каталог .cursor/skills). Якщо відсутній, CLI доповнить списком skills з пакету.",
|
|
24
25
|
"items": {
|
|
25
26
|
"type": "string",
|
|
26
27
|
"minLength": 1
|
|
27
28
|
}
|
|
29
|
+
},
|
|
30
|
+
"version": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Версія пакету @nitra/cursor на unpkg для завантаження правил (необов'язково, інакше latest)."
|
|
28
33
|
}
|
|
29
34
|
},
|
|
30
|
-
"required": ["rules"
|
|
35
|
+
"required": ["rules"]
|
|
31
36
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/schema-catalog.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"schemas": [
|
|
5
|
+
{
|
|
6
|
+
"name": "n-cursor.json",
|
|
7
|
+
"description": "Конфігурація @nitra/cursor (.n-cursor.json у корені репозиторію)",
|
|
8
|
+
"url": "https://unpkg.com/@nitra/cursor/schemas/n-cursor.json",
|
|
9
|
+
"fileMatch": [".n-cursor.json", "**/.n-cursor.json", ".n-cursor.example.json", "**/.n-cursor.example.json"]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "schema-catalog",
|
|
13
|
+
"description": "Каталог схем Schema Store (v8r-catalog.json у пакеті)",
|
|
14
|
+
"url": "https://json.schemastore.org/schema-catalog.json",
|
|
15
|
+
"fileMatch": ["npm/schemas/v8r-catalog.json"]
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|