@nitra/cursor 7.1.0 → 8.0.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 +6 -0
- package/package.json +1 -1
- package/rules/style-lint/policy/lint_style_yml/template/lint-style.yml.snippet.yml +1 -1
- package/rules/style-lint/style-lint.mdc +3 -3
- package/rules/text/js/formatting.mjs +5 -4
- package/rules/text/policy/lint_text/template/lint-text.yml.snippet.yml +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [8.0.0] - 2026-06-14
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- CI lint read-only: lint-text.yml → n-cursor lint-text --read-only, lint-style.yml → stylelint без --fix; канон оновлено синхронно (snippet+formatting.mjs+rego-тести+mdc) — CI нуль мутацій
|
|
8
|
+
|
|
3
9
|
## [7.1.0] - 2026-06-14
|
|
4
10
|
|
|
5
11
|
### Added
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ $white-a1: color.adjust(white, $alpha: -0.85);
|
|
|
95
95
|
|
|
96
96
|
- **Джерело правил:** перед тим як писати або суттєво змінювати **`.css`**, **`.scss`** або стилі в **`.vue`**, переглянь у корені проєкту (і в релевантних пакетах монорепо, якщо є) поле **`stylelint`** у **`package.json`** (зокрема `extends`), наявні **`.stylelintrc.*`**, **`stylelint.config.*`** та **`.stylelintignore`**. Не покладайся на «типові» правила stylelint з пам’яті — дотримуйся **проєктного** **`@nitra/stylelint-config`** і будь-яких локальних доповнень у репозиторії.
|
|
97
97
|
- **Форматування** узгоджуй з **`n-text.mdc`** (oxfmt / `.oxfmtrc.json` для css, scss тощо), щоб форматер і stylelint не суперечили один одному.
|
|
98
|
-
- **Запуск stylelint:** лише **`npx stylelint`**. Локально — через скрипт **`lint-style`** (`bun run lint-style`); у **GitHub Actions** у кроці **`run`** викликай `npx stylelint '**/*.{css,scss,vue}'
|
|
98
|
+
- **Запуск stylelint:** лише **`npx stylelint`**. Локально — через скрипт **`lint-style`** (`bun run lint-style`, з `--fix`); у **GitHub Actions** у кроці **`run`** викликай `npx stylelint '**/*.{css,scss,vue}'` напряму **без `--fix`** (CI — read-only, нуль мутацій; не через **`bun run lint-style`**). Не використовуй **`bunx stylelint`**. Після змін запускай **`bun run lint-style`** і виправляй усе, що лишилось після auto-fix; за потреби — повний `bun run lint` (навичка **`/n-lint`**).
|
|
99
99
|
- **Не розширюй винятки:** не додавай зайві **`stylelint-disable`** без потреби; краще підлаштувати стилі під правила проєкту.
|
|
100
100
|
|
|
101
101
|
## Канон
|
|
@@ -131,7 +131,7 @@ $white-a1: color.adjust(white, $alpha: -0.85);
|
|
|
131
131
|
},
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
Додай **`.github/workflows/lint-style.yml`** (лише **`.yml`**, **`ga.mdc`**): після **`checkout`** — локальний composite **`setup-bun-deps`**, далі `npx stylelint '**/*.{css,scss,vue}'
|
|
134
|
+
Додай **`.github/workflows/lint-style.yml`** (лише **`.yml`**, **`ga.mdc`**): після **`checkout`** — локальний composite **`setup-bun-deps`**, далі `npx stylelint '**/*.{css,scss,vue}'` (CI — без `--fix`) у кроці **`run`**. **Не** дублюй окремі кроки **`setup-node`** / **`oven-sh/setup-bun`** / кеш / **`npm install`**.
|
|
135
135
|
|
|
136
136
|
```yaml title=".github/workflows/lint-style.yml"
|
|
137
137
|
name: StyleLint
|
|
@@ -172,7 +172,7 @@ jobs:
|
|
|
172
172
|
- uses: ./.github/actions/setup-bun-deps
|
|
173
173
|
|
|
174
174
|
- name: StyleLint
|
|
175
|
-
run: npx stylelint '**/*.{css,scss,vue}'
|
|
175
|
+
run: npx stylelint '**/*.{css,scss,vue}'
|
|
176
176
|
```
|
|
177
177
|
|
|
178
178
|
У корені проєкту має бути **`.stylelintignore`**:
|
|
@@ -95,7 +95,7 @@ function checkTextConfigsExistence(passFn, failFn, cwd) {
|
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Перевіряє package.json для текстового стека: складний `lint-text` скрипт і
|
|
98
|
-
* виклик `
|
|
98
|
+
* виклик `n-cursor lint-text --read-only` у відповідному workflow (CI — нуль мутацій). Решта (Prettier-заборона,
|
|
99
99
|
* `@nitra/cspell-dict ^2.0.0+`, заборона `markdownlint-cli2` у залежностях,
|
|
100
100
|
* `@nitra/*` гейт) — у Rego (`text.package_json`, `bun.package_json`).
|
|
101
101
|
* @param {(msg: string) => void} passFn callback при успішній перевірці
|
|
@@ -112,11 +112,12 @@ async function checkPackageJsonText(passFn, failFn, cwd) {
|
|
|
112
112
|
if (existsSync(lintTextWf)) {
|
|
113
113
|
const wf = await readFile(lintTextWf, 'utf8')
|
|
114
114
|
const root = parseWorkflowYaml(wf)
|
|
115
|
-
const
|
|
115
|
+
const canonRun = 'n-cursor lint-text --read-only'
|
|
116
|
+
const ok = root ? anyRunStepIncludes(root, canonRun) : wf.includes(canonRun)
|
|
116
117
|
if (ok) {
|
|
117
|
-
passFn(
|
|
118
|
+
passFn(`lint-text.yml викликає ${canonRun}`)
|
|
118
119
|
} else {
|
|
119
|
-
failFn(
|
|
120
|
+
failFn(`lint-text.yml має містити крок ${canonRun} (CI — read-only, нуль мутацій)`)
|
|
120
121
|
}
|
|
121
122
|
} else {
|
|
122
123
|
failFn('.github/workflows/lint-text.yml не існує — створи згідно n-text.mdc')
|