pasika 0.3.2 → 0.3.4
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 +72 -20
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +4999 -103
- package/dist/eslint/pasika/index.d.ts +165 -53
- package/dist/eslint/pasika/index.js +4424 -89
- package/package.json +5 -6
- package/dist/cli/output.d.ts +0 -3
- package/dist/cli/output.js +0 -11
- package/dist/enforcement/coverage.d.ts +0 -51
- package/dist/enforcement/coverage.js +0 -206
- package/dist/enforcement/doctor.d.ts +0 -16
- package/dist/enforcement/doctor.js +0 -249
- package/dist/enforcement/normalize.d.ts +0 -11
- package/dist/enforcement/normalize.js +0 -21
- package/dist/enforcement/parse-docs.d.ts +0 -58
- package/dist/enforcement/parse-docs.js +0 -94
- package/dist/enforcement/types.d.ts +0 -54
- package/dist/enforcement/types.js +0 -50
- package/dist/eslint/pasika/ast-types.d.ts +0 -122
- package/dist/eslint/pasika/ast-types.js +0 -1
- package/dist/eslint/pasika/project/ccf.d.ts +0 -48
- package/dist/eslint/pasika/project/ccf.js +0 -119
- package/dist/eslint/pasika/project/index.d.ts +0 -21
- package/dist/eslint/pasika/project/index.js +0 -139
- package/dist/eslint/pasika/project/parse-module.d.ts +0 -27
- package/dist/eslint/pasika/project/parse-module.js +0 -128
- package/dist/eslint/pasika/rules/application-structure.d.ts +0 -2
- package/dist/eslint/pasika/rules/application-structure.js +0 -152
- package/dist/eslint/pasika/rules/component-conventions.d.ts +0 -16
- package/dist/eslint/pasika/rules/component-conventions.js +0 -145
- package/dist/eslint/pasika/rules/component-nesting.d.ts +0 -12
- package/dist/eslint/pasika/rules/component-nesting.js +0 -69
- package/dist/eslint/pasika/rules/component-placement.d.ts +0 -11
- package/dist/eslint/pasika/rules/component-placement.js +0 -75
- package/dist/eslint/pasika/rules/config-extraction.d.ts +0 -14
- package/dist/eslint/pasika/rules/config-extraction.js +0 -74
- package/dist/eslint/pasika/rules/cross-feature-import.d.ts +0 -2
- package/dist/eslint/pasika/rules/cross-feature-import.js +0 -75
- package/dist/eslint/pasika/rules/css/apply-usage.d.ts +0 -10
- package/dist/eslint/pasika/rules/css/apply-usage.js +0 -45
- package/dist/eslint/pasika/rules/css/base-layer-pair.d.ts +0 -10
- package/dist/eslint/pasika/rules/css/base-layer-pair.js +0 -49
- package/dist/eslint/pasika/rules/css/css-variable-naming.d.ts +0 -10
- package/dist/eslint/pasika/rules/css/css-variable-naming.js +0 -39
- package/dist/eslint/pasika/rules/css/custom-utility-apply.d.ts +0 -11
- package/dist/eslint/pasika/rules/css/custom-utility-apply.js +0 -52
- package/dist/eslint/pasika/rules/css/global-css-location.d.ts +0 -10
- package/dist/eslint/pasika/rules/css/global-css-location.js +0 -42
- package/dist/eslint/pasika/rules/css/helpers.d.ts +0 -29
- package/dist/eslint/pasika/rules/css/helpers.js +0 -93
- package/dist/eslint/pasika/rules/css/index.d.ts +0 -13
- package/dist/eslint/pasika/rules/css/index.js +0 -25
- package/dist/eslint/pasika/rules/css/root-variables.d.ts +0 -11
- package/dist/eslint/pasika/rules/css/root-variables.js +0 -53
- package/dist/eslint/pasika/rules/css/rule-tester.d.ts +0 -11
- package/dist/eslint/pasika/rules/css/rule-tester.js +0 -22
- package/dist/eslint/pasika/rules/css/stylesheet-ordering.d.ts +0 -11
- package/dist/eslint/pasika/rules/css/stylesheet-ordering.js +0 -76
- package/dist/eslint/pasika/rules/css/surface-utility.d.ts +0 -10
- package/dist/eslint/pasika/rules/css/surface-utility.js +0 -41
- package/dist/eslint/pasika/rules/css/theme-reset.d.ts +0 -9
- package/dist/eslint/pasika/rules/css/theme-reset.js +0 -36
- package/dist/eslint/pasika/rules/css/theme-variable-namespace.d.ts +0 -11
- package/dist/eslint/pasika/rules/css/theme-variable-namespace.js +0 -53
- package/dist/eslint/pasika/rules/cva-appearance-props.d.ts +0 -10
- package/dist/eslint/pasika/rules/cva-appearance-props.js +0 -77
- package/dist/eslint/pasika/rules/cva-boolean-variants.d.ts +0 -11
- package/dist/eslint/pasika/rules/cva-boolean-variants.js +0 -97
- package/dist/eslint/pasika/rules/data-testid-case.d.ts +0 -2
- package/dist/eslint/pasika/rules/data-testid-case.js +0 -76
- package/dist/eslint/pasika/rules/enforce-barrel-exports.d.ts +0 -9
- package/dist/eslint/pasika/rules/enforce-barrel-exports.js +0 -78
- package/dist/eslint/pasika/rules/enforce-cn-merge.d.ts +0 -21
- package/dist/eslint/pasika/rules/enforce-cn-merge.js +0 -86
- package/dist/eslint/pasika/rules/enforce-cva-variant-props.d.ts +0 -9
- package/dist/eslint/pasika/rules/enforce-cva-variant-props.js +0 -86
- package/dist/eslint/pasika/rules/filename-case.d.ts +0 -2
- package/dist/eslint/pasika/rules/filename-case.js +0 -123
- package/dist/eslint/pasika/rules/hook-complexity.d.ts +0 -12
- package/dist/eslint/pasika/rules/hook-complexity.js +0 -114
- package/dist/eslint/pasika/rules/hook-extraction.d.ts +0 -11
- package/dist/eslint/pasika/rules/hook-extraction.js +0 -55
- package/dist/eslint/pasika/rules/import-boundaries.d.ts +0 -2
- package/dist/eslint/pasika/rules/import-boundaries.js +0 -167
- package/dist/eslint/pasika/rules/import-through-index.d.ts +0 -2
- package/dist/eslint/pasika/rules/import-through-index.js +0 -52
- package/dist/eslint/pasika/rules/interactive-component.d.ts +0 -10
- package/dist/eslint/pasika/rules/interactive-component.js +0 -76
- package/dist/eslint/pasika/rules/json/index.d.ts +0 -5
- package/dist/eslint/pasika/rules/json/index.js +0 -9
- package/dist/eslint/pasika/rules/json/no-cache-flag.d.ts +0 -10
- package/dist/eslint/pasika/rules/json/no-cache-flag.js +0 -45
- package/dist/eslint/pasika/rules/json/no-vulyk-dependency.d.ts +0 -10
- package/dist/eslint/pasika/rules/json/no-vulyk-dependency.js +0 -41
- package/dist/eslint/pasika/rules/json/rule-tester.d.ts +0 -11
- package/dist/eslint/pasika/rules/json/rule-tester.js +0 -21
- package/dist/eslint/pasika/rules/jsx-hygiene.d.ts +0 -9
- package/dist/eslint/pasika/rules/jsx-hygiene.js +0 -108
- package/dist/eslint/pasika/rules/locale-dotted-path.d.ts +0 -10
- package/dist/eslint/pasika/rules/locale-dotted-path.js +0 -65
- package/dist/eslint/pasika/rules/locale-placement.d.ts +0 -13
- package/dist/eslint/pasika/rules/locale-placement.js +0 -163
- package/dist/eslint/pasika/rules/locales-location.d.ts +0 -11
- package/dist/eslint/pasika/rules/locales-location.js +0 -56
- package/dist/eslint/pasika/rules/md/doc-kind-suffix.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/doc-kind-suffix.js +0 -29
- package/dist/eslint/pasika/rules/md/example-heading-description.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/example-heading-description.js +0 -30
- package/dist/eslint/pasika/rules/md/glossary-term-linking.d.ts +0 -2
- package/dist/eslint/pasika/rules/md/glossary-term-linking.js +0 -99
- package/dist/eslint/pasika/rules/md/guide-folder-entry-point.d.ts +0 -2
- package/dist/eslint/pasika/rules/md/guide-folder-entry-point.js +0 -46
- package/dist/eslint/pasika/rules/md/guide-link-anchors.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/guide-link-anchors.js +0 -50
- package/dist/eslint/pasika/rules/md/guide-overview-no-links.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/guide-overview-no-links.js +0 -51
- package/dist/eslint/pasika/rules/md/guide-states-no-requirement.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/guide-states-no-requirement.js +0 -26
- package/dist/eslint/pasika/rules/md/guide-step-single-link.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/guide-step-single-link.js +0 -48
- package/dist/eslint/pasika/rules/md/guide-step-single-sentence.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/guide-step-single-sentence.js +0 -42
- package/dist/eslint/pasika/rules/md/helpers.d.ts +0 -25
- package/dist/eslint/pasika/rules/md/helpers.js +0 -37
- package/dist/eslint/pasika/rules/md/index.d.ts +0 -27
- package/dist/eslint/pasika/rules/md/index.js +0 -53
- package/dist/eslint/pasika/rules/md/no-cross-document-link.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/no-cross-document-link.js +0 -36
- package/dist/eslint/pasika/rules/md/no-nested-how-to.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/no-nested-how-to.js +0 -39
- package/dist/eslint/pasika/rules/md/no-template-prompt.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/no-template-prompt.js +0 -22
- package/dist/eslint/pasika/rules/md/overview-length.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/overview-length.js +0 -47
- package/dist/eslint/pasika/rules/md/overview-present.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/overview-present.js +0 -41
- package/dist/eslint/pasika/rules/md/policy-no-examples.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/policy-no-examples.js +0 -28
- package/dist/eslint/pasika/rules/md/policy-single-document.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/policy-single-document.js +0 -34
- package/dist/eslint/pasika/rules/md/policy-subject-headings.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/policy-subject-headings.js +0 -58
- package/dist/eslint/pasika/rules/md/project-index.d.ts +0 -17
- package/dist/eslint/pasika/rules/md/project-index.js +0 -67
- package/dist/eslint/pasika/rules/md/reference-block-headings.d.ts +0 -6
- package/dist/eslint/pasika/rules/md/reference-block-headings.js +0 -31
- package/dist/eslint/pasika/rules/md/reference-no-rfc-vocabulary.d.ts +0 -6
- package/dist/eslint/pasika/rules/md/reference-no-rfc-vocabulary.js +0 -26
- package/dist/eslint/pasika/rules/md/requirement-present.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/requirement-present.js +0 -41
- package/dist/eslint/pasika/rules/md/rfc-only-in-bullets.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/rfc-only-in-bullets.js +0 -46
- package/dist/eslint/pasika/rules/md/rule-paired-examples.d.ts +0 -5
- package/dist/eslint/pasika/rules/md/rule-paired-examples.js +0 -36
- package/dist/eslint/pasika/rules/md/rule-tester.d.ts +0 -11
- package/dist/eslint/pasika/rules/md/rule-tester.js +0 -21
- package/dist/eslint/pasika/rules/md/support-document-placement.d.ts +0 -2
- package/dist/eslint/pasika/rules/md/support-document-placement.js +0 -36
- package/dist/eslint/pasika/rules/md/title-matches-file-name.d.ts +0 -2
- package/dist/eslint/pasika/rules/md/title-matches-file-name.js +0 -46
- package/dist/eslint/pasika/rules/named-exports.d.ts +0 -2
- package/dist/eslint/pasika/rules/named-exports.js +0 -49
- package/dist/eslint/pasika/rules/no-arbitrary-tailwind.d.ts +0 -9
- package/dist/eslint/pasika/rules/no-arbitrary-tailwind.js +0 -97
- package/dist/eslint/pasika/rules/no-eslint-disable.d.ts +0 -10
- package/dist/eslint/pasika/rules/no-eslint-disable.js +0 -33
- package/dist/eslint/pasika/rules/no-mixed-concerns.d.ts +0 -9
- package/dist/eslint/pasika/rules/no-mixed-concerns.js +0 -71
- package/dist/eslint/pasika/rules/no-util-barrel.d.ts +0 -2
- package/dist/eslint/pasika/rules/no-util-barrel.js +0 -48
- package/dist/eslint/pasika/rules/pure-function-extract.d.ts +0 -9
- package/dist/eslint/pasika/rules/pure-function-extract.js +0 -92
- package/dist/eslint/pasika/rules/shared-style-dedup.d.ts +0 -13
- package/dist/eslint/pasika/rules/shared-style-dedup.js +0 -91
- package/dist/eslint/pasika/rules/stay-flat.d.ts +0 -12
- package/dist/eslint/pasika/rules/stay-flat.js +0 -81
- package/dist/eslint/pasika/rules/support-file-placement.d.ts +0 -15
- package/dist/eslint/pasika/rules/support-file-placement.js +0 -70
- package/dist/eslint/pasika/rules/support-folder-shape.d.ts +0 -2
- package/dist/eslint/pasika/rules/support-folder-shape.js +0 -59
- package/dist/eslint/pasika/rules/type-extraction.d.ts +0 -13
- package/dist/eslint/pasika/rules/type-extraction.js +0 -85
- package/dist/eslint/pasika/rules/ui-state.d.ts +0 -9
- package/dist/eslint/pasika/rules/ui-state.js +0 -99
- package/dist/eslint/pasika/rules/util-file-name.d.ts +0 -2
- package/dist/eslint/pasika/rules/util-file-name.js +0 -48
- package/dist/eslint/pasika/rules/value-extraction.d.ts +0 -13
- package/dist/eslint/pasika/rules/value-extraction.js +0 -48
- package/enforcement/registry.json +0 -1145
package/README.md
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Documentation, the lint rules derived from it, and the CLI that applies and diagnoses both.
|
|
4
4
|
|
|
5
|
-
`pasika` owns the framework's documentation and turns it into checks. Every requirement in `docs/` is recorded in an enforcement registry that says which ESLint rule
|
|
5
|
+
`pasika` owns the framework's documentation and turns it into checks. Every requirement in `docs/` is recorded in an enforcement registry that says which ESLint rule or `pasika` check governs it — or, when none does, how a reviewer or agent applies it by hand. CI fails when a requirement has no recorded answer.
|
|
6
6
|
|
|
7
7
|
## Layout
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
10
|
docs/
|
|
11
|
-
agent-policy.md #
|
|
11
|
+
agent-policy.md # agent-conduct requirements (Policy)
|
|
12
|
+
repository-policy.md # repo-wide code and documentation requirements (Policy)
|
|
12
13
|
code-organization-guide/ # placement, extraction, module conventions
|
|
13
14
|
documentation-guide/ # how documents themselves are written
|
|
14
15
|
framework-adoption-guide/ # adopting and updating the framework
|
|
@@ -36,23 +37,16 @@ Requirements are identified by a hash of their canonical text, not by a hand-wri
|
|
|
36
37
|
"doc": "code-organization-guide/rules/no-mixed-concerns-rule.md",
|
|
37
38
|
"text": "A .tsx file that defines a component MUST contain exactly one component.",
|
|
38
39
|
"hash": "b19fe3bd34",
|
|
39
|
-
"kind": "eslint",
|
|
40
40
|
"ref": "pasika/no-mixed-concerns",
|
|
41
41
|
"note": "counts exported components; a second component that is not exported is not detected"
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
The `
|
|
45
|
+
The `text` field is the bullet as written in the document (markdown links and code spans intact), so it is greppable in the doc it came from; the `hash` is computed from the same text with links collapsed to their text and code spans unwrapped, so editing a URL or adding backticks does not read as a change.
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
| --- | --- |
|
|
49
|
-
| `eslint` | An ESLint rule reports it, and a fixture test titled with the requirement pins it |
|
|
50
|
-
| `doctor` | A `pasika doctor` check reports it |
|
|
51
|
-
| `planned` | Mechanically checkable, not written yet; `note` names the intended check |
|
|
52
|
-
| `judgment` | No mechanical check can decide it; `note` says why |
|
|
53
|
-
| `permission` | The requirement grants permission, so there is nothing to check |
|
|
47
|
+
Every requirement carries a `note` explaining how it is met: what the ref'd rule or doctor check does and where it falls short, or — with no `ref` — how a reviewer or agent applies it by hand. When a rule governs the requirement's subject without fully deciding it (e.g. its placement), the `ref` still names that rule and the `note` says what stays judgment, so a partial check never reads as a complete one.
|
|
54
48
|
|
|
55
|
-
`pasika coverage` fails when a requirement
|
|
49
|
+
`pasika coverage` fails when a requirement has no recorded answer, when its text changed, when it disappeared, when its `ref` names a rule or doctor check that does not exist, or when a requirement a rule governs has no test titled with its text. Confirm a reworded requirement with `pasika coverage --accept`.
|
|
56
50
|
|
|
57
51
|
## Commands
|
|
58
52
|
|
|
@@ -68,11 +62,11 @@ Both accept `--json` for agent use.
|
|
|
68
62
|
A requirement `coverage` reports as `new` is classified with the hash it prints:
|
|
69
63
|
|
|
70
64
|
```bash
|
|
71
|
-
npx pasika coverage --classify d311a1457a --
|
|
72
|
-
npx pasika coverage --classify 041b665bd7 --
|
|
65
|
+
npx pasika coverage --classify d311a1457a --ref pasika/import-boundaries --note "reports imports that cross a feature boundary"
|
|
66
|
+
npx pasika coverage --classify 041b665bd7 --note "no check can compare against the previous state"
|
|
73
67
|
```
|
|
74
68
|
|
|
75
|
-
The command refuses a hash no requirement has, a `ref` naming a rule or check that does not exist,
|
|
69
|
+
The command refuses a hash no requirement has, a `ref` naming a rule or doctor check that does not exist, and an entry without a note — so a mismatch cannot reach the registry by hand. Re-running it on an already-recorded requirement replaces the earlier entry.
|
|
76
70
|
|
|
77
71
|
## ESLint ruleset
|
|
78
72
|
|
|
@@ -92,6 +86,8 @@ const { eslintConfig } = styleguide({
|
|
|
92
86
|
export default eslintConfig;
|
|
93
87
|
```
|
|
94
88
|
|
|
89
|
+
`zirka` composes the full pasika ruleset over four file scopes: TS/TSX under `src/**`, `globals.css` and other stylesheets, `package.json`, and markdown — each with its own ESLint language.
|
|
90
|
+
|
|
95
91
|
### Without Zirka
|
|
96
92
|
|
|
97
93
|
```ts
|
|
@@ -101,7 +97,9 @@ import { pasikaConfig } from "pasika/eslint";
|
|
|
101
97
|
export default [pasikaConfig];
|
|
102
98
|
```
|
|
103
99
|
|
|
104
|
-
|
|
100
|
+
`pasikaConfig` applies the TS/TSX rules to `src/**` only, so a repository without a `src/` tree passes it trivially. The CSS, JSON, and markdown language configs are composed by `zirka`'s `styleguide()`; the individual rule objects (`cssRules`, `jsonRules`, `mdRules`) are exported for manual wiring.
|
|
101
|
+
|
|
102
|
+
### TS/TSX rules
|
|
105
103
|
|
|
106
104
|
| Rule | Enforces |
|
|
107
105
|
| --- | --- |
|
|
@@ -111,24 +109,78 @@ The ruleset applies to `src/**` only, so a repository without a `src/` tree pass
|
|
|
111
109
|
| `pasika/no-arbitrary-tailwind` | No arbitrary `-[value]` classes, including inside `cn()` conditionals |
|
|
112
110
|
| `pasika/enforce-cn-merge` | `cn()` instead of `+` or template literals; at most five classes per group |
|
|
113
111
|
| `pasika/enforce-cva-variant-props` | `VariantProps<typeof …>` instead of hand-written unions |
|
|
112
|
+
| `pasika/cva-appearance-props` | Visual option props (`size`, `variant`, …) declared through CVA appearance props |
|
|
113
|
+
| `pasika/cva-boolean-variants` | Boolean appearance props placed on the CVA variant, not as standalone props |
|
|
114
114
|
| `pasika/enforce-barrel-exports` | A nested `index.ts` re-exports only its component |
|
|
115
115
|
| `pasika/component-placement` † | The folder a component's consumers imply |
|
|
116
116
|
| `pasika/support-file-placement` † | The folder a hook, type, schema, constant, or utility belongs in |
|
|
117
|
+
| `pasika/application-structure` | The path-based parts of the application structure and configuration rules |
|
|
118
|
+
| `pasika/named-exports` | Named exports for application files (framework routing files may default-export) |
|
|
119
|
+
| `pasika/data-testid-case` | `data-testid` casing where a rendered result carries one |
|
|
120
|
+
| `pasika/support-folder-shape` | A `constants/`, `types/`, or `schemas/` folder defines exports directly in `index.ts` or in named-re-exported files |
|
|
121
|
+
| `pasika/import-through-index` | An extracted constant, type, or schema is imported through its folder's `index.ts` |
|
|
122
|
+
| `pasika/util-file-name` | A single-function utility file is named in the function's kebab-case form |
|
|
123
|
+
| `pasika/no-util-barrel` | A utility is imported directly, without a barrel |
|
|
124
|
+
| `pasika/jsx-hygiene` | Calculations and complex conditions stay out of JSX children and attributes |
|
|
125
|
+
| `pasika/interactive-component` | Interactive elements are component boundaries when mixed with other content |
|
|
126
|
+
| `pasika/ui-state` | Native or ARIA state expression and Tailwind state variants |
|
|
127
|
+
| `pasika/cross-feature-import` | A component importing from two or more feature folders lives in a shared location |
|
|
128
|
+
| `pasika/pure-function-extract` | Pure functions extracted to `utils/`, even with one consumer |
|
|
129
|
+
| `pasika/hook-complexity` | Hook complexity limits (imperative categories per hook) |
|
|
130
|
+
| `pasika/locale-dotted-path` | A namespaced locale is read through its full dotted path |
|
|
131
|
+
| `pasika/locales-location` | Locales live in the named locales object |
|
|
132
|
+
| `pasika/hook-extraction` † | A hook with two or more consumers is extracted to its own file |
|
|
133
|
+
| `pasika/value-extraction` † | A value with cross-folder consumers is extracted |
|
|
134
|
+
| `pasika/config-extraction` † | A type, schema, or utility used outside its config module is moved |
|
|
135
|
+
| `pasika/component-nesting` † | A component is not nested solely because it has support files |
|
|
136
|
+
| `pasika/stay-flat` † | A component stays flat until it has exclusive children |
|
|
137
|
+
| `pasika/type-extraction` † | A type or schema with cross-folder consumers is extracted |
|
|
138
|
+
| `pasika/locale-placement` † | Shared locales at the top level, single-feature locales namespaced |
|
|
139
|
+
| `pasika/shared-style-dedup` † | A className combo used by two or more components becomes a named utility |
|
|
140
|
+
| `pasika/no-eslint-disable` | No `eslint-disable` directives |
|
|
141
|
+
| `pasika/zod-schema-validation` | Runtime validation through Zod schemas, not hand-written type guards |
|
|
142
|
+
| `pasika/source-under-src` | Application source lives under `src/`, not in root-level folders |
|
|
143
|
+
|
|
144
|
+
### CSS rules
|
|
145
|
+
|
|
146
|
+
Applied to `src/**/globals.css` (and other stylesheets) through `@eslint/css` with tolerant Tailwind v4 parsing.
|
|
147
|
+
|
|
148
|
+
| Rule | Enforces |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| `pasika/theme-reset` | A `--*: initial` theme reset is present |
|
|
151
|
+
| `pasika/root-variables` | `:root` defines the CSS custom properties |
|
|
152
|
+
| `pasika/apply-usage` | `@layer base` uses `@apply` for declarations |
|
|
153
|
+
| `pasika/base-layer-pair` | The base layer applies `base-canvas` and `base-ink` |
|
|
154
|
+
| `pasika/stylesheet-ordering` | Imports → `@custom-variant` → `:root` → `@theme` → `@utility` → `@layer base` |
|
|
155
|
+
| `pasika/css-variable-naming` | Background vars named `--<role>-canvas`, text vars `--<role>-ink` |
|
|
156
|
+
| `pasika/custom-utility-apply` | `@utility` blocks use `@apply` |
|
|
157
|
+
| `pasika/surface-utility` | Repeated canvas+ink combos become a named surface utility |
|
|
158
|
+
| `pasika/theme-variable-namespace` | Utility class groups share a namespace prefix |
|
|
159
|
+
| `pasika/global-css-location` | Global CSS lives in the correct entry point |
|
|
160
|
+
|
|
161
|
+
### JSON rules
|
|
162
|
+
|
|
163
|
+
Applied to `package.json` through `@eslint/json`.
|
|
164
|
+
|
|
165
|
+
| Rule | Enforces |
|
|
166
|
+
| --- | --- |
|
|
167
|
+
| `pasika/no-cache-flag` | Lint scripts don't pass `--cache` |
|
|
168
|
+
| `pasika/no-vulyk-dependency` | `vulyk` is not in `dependencies` |
|
|
117
169
|
|
|
118
170
|
### Documentation rules
|
|
119
171
|
|
|
120
|
-
The `pasika/*` markdown rules enforce the documentation guide over `docs/**/*.md
|
|
172
|
+
The `pasika/*` markdown rules enforce the documentation guide over `docs/**/*.md` (24 rules): file-name suffixes and titles, overview presence and length, guide step structure, Incorrect/Correct pairing, policy document shape, reference block headings, RFC 2119 placement, template hygiene, link anchoring, and glossary-term linking. They run through `@eslint/markdown`; `pasika coverage` verifies each has a test and a registry entry. Pasika's own `docs/` are linted by them in CI (`npm run lint`).
|
|
121
173
|
|
|
122
174
|
Run `pasika coverage --json` for the exact requirement each rule covers.
|
|
123
175
|
|
|
124
176
|
### † Cross-file rules
|
|
125
177
|
|
|
126
|
-
Where a component or
|
|
178
|
+
Where a component, hook, value, type, or style belongs depends on which files use it, so the rules marked † index the whole `src/` tree instead of looking at one file. Two consequences:
|
|
127
179
|
|
|
128
|
-
- **Do not pass `--cache`.** Move a file and the finding belongs to a *different* file, whose cache entry is unchanged — so ESLint would replay a stale verdict. `
|
|
180
|
+
- **Do not pass `--cache`.** Move a file and the finding belongs to a *different* file, whose cache entry is unchanged — so ESLint would replay a stale verdict. `repository-policy.md` requires lint commands to run without it.
|
|
129
181
|
- The index is read from disk rather than from ESLint's file list, so a partial run such as `lint-staged` still judges against the true graph.
|
|
130
182
|
|
|
131
|
-
|
|
183
|
+
All are inert in a repository with no `src/` tree.
|
|
132
184
|
|
|
133
185
|
## Development
|
|
134
186
|
|
package/dist/cli/index.d.ts
CHANGED