@starci/eslint-canon-fe 1.4.2 → 1.4.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/contract.mjs +23 -1
- package/icon.mjs +3 -3
- package/package.json +1 -1
- package/vendor-boundary.mjs +618 -549
package/contract.mjs
CHANGED
|
@@ -152,11 +152,33 @@ export const isTestFile = (filename) => /\.(?:test|spec)\.(?:ts|tsx|js|jsx|mjs|c
|
|
|
152
152
|
/** Product source lives under `src/`; tooling and config are out of scope. */
|
|
153
153
|
export const isSourceFile = (filename) => normalizePath(filename).includes("/src/")
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* True for a branch that draws content parsed from an authored document.
|
|
157
|
+
*
|
|
158
|
+
* WHY THE TABLE CANNOT HOLD THESE. An entry declares every slot inside it, by name - that is
|
|
159
|
+
* `CONTRACT-11`, and it is what makes an entry a constraint rather than a container. A markdown
|
|
160
|
+
* document has no such list: the children of one `ul` are whichever of a dozen node kinds the author
|
|
161
|
+
* typed, in whichever order, nested however deep. Any `children` record written for it would be a
|
|
162
|
+
* guess, and a guess in the table is worse than no entry at all, because the next reader takes it
|
|
163
|
+
* for a rule somebody checked.
|
|
164
|
+
*
|
|
165
|
+
* The same is true one level down. A highlighted code region is a string of vendor HTML injected
|
|
166
|
+
* into the node; a rendered diagram is an SVG the same way. Neither has slots to name.
|
|
167
|
+
*
|
|
168
|
+
* THIS IS A FOLDER EXEMPTION, exactly like the leaf one above, and it carries the same cost: anyone
|
|
169
|
+
* can escape these rules by filing a component here. What keeps a file out is a question a person
|
|
170
|
+
* asks - does this component receive its children as PARSED CONTENT rather than as a designed
|
|
171
|
+
* arrangement? A block that merely has many children is not this; it has a shape somebody chose, and
|
|
172
|
+
* a shape somebody chose is what the table is for.
|
|
173
|
+
*/
|
|
174
|
+
export const isAuthoredDocumentBranch = (filename) =>
|
|
175
|
+
/\/src\/components\/branches\/(?:Article|MarkdownCodeBlock)\//.test(normalizePath(filename))
|
|
176
|
+
|
|
155
177
|
/** Product source these rules govern: under `src/`, not a test, not a leaf, not the frame. */
|
|
156
178
|
export const isGovernedFile = (filename) => {
|
|
157
179
|
const file = normalizePath(filename)
|
|
158
180
|
if (!isSourceFile(file) || isTestFile(file)) return false
|
|
159
|
-
return !isLeafFile(file) && !isContractFrameFile(file)
|
|
181
|
+
return !isLeafFile(file) && !isContractFrameFile(file) && !isAuthoredDocumentBranch(file)
|
|
160
182
|
}
|
|
161
183
|
|
|
162
184
|
// -- reading the table --------------------------------------------------------------------------
|
package/icon.mjs
CHANGED
|
@@ -129,9 +129,9 @@ export const heroiconsIsTheGlyphVendor = {
|
|
|
129
129
|
type: "problem",
|
|
130
130
|
docs: { description: "Only the Heroicons heading and micro families may supply product glyphs." },
|
|
131
131
|
schema: [],
|
|
132
|
-
messages: {
|
|
133
|
-
vendor:
|
|
134
|
-
"`{{source}}` is
|
|
132
|
+
messages: {
|
|
133
|
+
vendor:
|
|
134
|
+
"`{{source}}` is outside StarCi's closed glyph surface. Use upstream `@heroicons/react/24/outline` or `16/solid` when the icon exists; use the matching `@starci/heroicons` subpath only for a custom cut missing upstream. The StarCi package never re-exports upstream icons. Iconify, Phosphor and every other glyph catalogue are refused.",
|
|
135
135
|
},
|
|
136
136
|
},
|
|
137
137
|
create(context) {
|
package/package.json
CHANGED