@starci/eslint-canon-be 3.5.0 → 3.6.1
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 +21 -0
- package/README.md +13 -2
- package/dist/ambient-id.d.ts +9 -0
- package/{ambient-id.mjs → dist/ambient-id.js} +43 -39
- package/dist/app-composition.d.ts +21 -0
- package/{app-composition.mjs → dist/app-composition.js} +396 -300
- package/dist/async-discipline.d.ts +9 -0
- package/dist/async-discipline.js +77 -0
- package/dist/authorization.d.ts +12 -0
- package/{authorization.mjs → dist/authorization.js} +53 -59
- package/dist/boundary-schema.d.ts +15 -0
- package/{boundary-schema.mjs → dist/boundary-schema.js} +120 -105
- package/dist/builders.d.ts +21 -0
- package/{builders.mjs → dist/builders.js} +162 -146
- package/dist/cli.d.ts +15 -0
- package/{cli.mjs → dist/cli.js} +97 -82
- package/dist/comments.d.ts +52 -0
- package/dist/comments.js +412 -0
- package/dist/config-owner.d.ts +24 -0
- package/{config-owner.mjs → dist/config-owner.js} +256 -219
- package/dist/connections.d.ts +12 -0
- package/{connections.mjs → dist/connections.js} +138 -140
- package/dist/cookies.d.ts +9 -0
- package/{cookies.mjs → dist/cookies.js} +58 -58
- package/dist/cqrs.d.ts +27 -0
- package/{cqrs.mjs → dist/cqrs.js} +341 -282
- package/dist/data-access.d.ts +50 -0
- package/{data-access.mjs → dist/data-access.js} +238 -243
- package/dist/default-deny.d.ts +15 -0
- package/{default-deny.mjs → dist/default-deny.js} +103 -88
- package/dist/e2e-flow.d.ts +25 -0
- package/{e2e-flow.mjs → dist/e2e-flow.js} +113 -112
- package/dist/edge-hardening.d.ts +10 -0
- package/dist/edge-hardening.js +173 -0
- package/dist/error-handling.d.ts +21 -0
- package/{error-handling.mjs → dist/error-handling.js} +289 -239
- package/dist/event-bus.d.ts +14 -0
- package/{event-bus.mjs → dist/event-bus.js} +146 -129
- package/dist/feature-thin.d.ts +12 -0
- package/{feature-thin.mjs → dist/feature-thin.js} +208 -191
- package/dist/function-budget.d.ts +7 -0
- package/{function-budget.mjs → dist/function-budget.js} +24 -27
- package/dist/health-ready.d.ts +10 -0
- package/dist/health-ready.js +703 -0
- package/dist/idempotency.d.ts +10 -0
- package/{idempotency.mjs → dist/idempotency.js} +296 -226
- package/dist/index.d.ts +54 -0
- package/{index.mjs → dist/index.js} +91 -109
- package/dist/infra-owner.d.ts +18 -0
- package/{infra-owner.mjs → dist/infra-owner.js} +58 -51
- package/dist/injection.d.ts +30 -0
- package/{injection.mjs → dist/injection.js} +397 -344
- package/dist/input-bounds.d.ts +15 -0
- package/{input-bounds.mjs → dist/input-bounds.js} +143 -132
- package/dist/jobs.d.ts +17 -0
- package/{jobs.mjs → dist/jobs.js} +116 -99
- package/dist/jwt-alg.d.ts +6 -0
- package/dist/jwt-alg.js +49 -0
- package/dist/lib/app-roles.d.ts +25 -0
- package/{lib/app-roles.mjs → dist/lib/app-roles.js} +15 -17
- package/dist/lib/ast.d.ts +40 -0
- package/dist/lib/ast.js +100 -0
- package/dist/lib/client-idempotency.d.ts +3 -0
- package/{lib/client-idempotency.mjs → dist/lib/client-idempotency.js} +316 -268
- package/dist/lib/config.d.ts +36 -0
- package/{lib/config.mjs → dist/lib/config.js} +24 -27
- package/dist/lib/db-writes.d.ts +29 -0
- package/{lib/db-writes.mjs → dist/lib/db-writes.js} +27 -27
- package/dist/lib/declared.d.ts +77 -0
- package/{lib/declared.mjs → dist/lib/declared.js} +83 -78
- package/dist/lib/doors.d.ts +50 -0
- package/{lib/doors.mjs → dist/lib/doors.js} +45 -50
- package/dist/lib/edition.d.ts +25 -0
- package/{lib/edition.mjs → dist/lib/edition.js} +15 -20
- package/dist/lib/entity-writes.d.ts +7 -0
- package/{lib/entity-writes.mjs → dist/lib/entity-writes.js} +31 -22
- package/dist/lib/hfs-view.d.ts +127 -0
- package/dist/lib/hfs-view.js +1 -0
- package/dist/lib/hfs.d.ts +34 -0
- package/{lib/hfs.mjs → dist/lib/hfs.js} +31 -29
- package/dist/lib/import-source.d.ts +63 -0
- package/dist/lib/import-source.js +134 -0
- package/dist/lib/path.d.ts +8 -0
- package/{lib/path.mjs → dist/lib/path.js} +4 -7
- package/dist/lib/persistence.d.ts +115 -0
- package/{lib/persistence.mjs → dist/lib/persistence.js} +55 -66
- package/dist/lib/ports.d.ts +70 -0
- package/{lib/ports.mjs → dist/lib/ports.js} +62 -66
- package/dist/lib/rule.d.ts +31 -0
- package/dist/lib/rule.js +2 -0
- package/dist/lib/runtime-root.d.ts +4 -0
- package/dist/lib/runtime-root.js +10 -0
- package/dist/lib/schema-values.d.ts +13 -0
- package/{lib/schema-values.mjs → dist/lib/schema-values.js} +67 -59
- package/dist/lib/specifier.d.ts +12 -0
- package/dist/lib/specifier.js +29 -0
- package/dist/lib/subject-values.d.ts +4 -0
- package/dist/lib/subject-values.js +61 -0
- package/dist/lib/transactions.d.ts +18 -0
- package/{lib/transactions.mjs → dist/lib/transactions.js} +17 -15
- package/dist/lib/transport-slots.d.ts +17 -0
- package/{lib/transport-slots.mjs → dist/lib/transport-slots.js} +2 -4
- package/dist/lib/types.d.ts +96 -0
- package/dist/lib/types.js +150 -0
- package/dist/lib/unit-spec.d.ts +48 -0
- package/{lib/unit-spec.mjs → dist/lib/unit-spec.js} +35 -44
- package/dist/lib/webhook-ack.d.ts +4 -0
- package/{lib/webhook-ack.mjs → dist/lib/webhook-ack.js} +78 -62
- package/dist/lib/webhook-handoff-inbox.d.ts +3 -0
- package/{lib/webhook-handoff-inbox.mjs → dist/lib/webhook-handoff-inbox.js} +195 -167
- package/dist/lib/webhook-handoff-intake.d.ts +4 -0
- package/{lib/webhook-handoff-intake.mjs → dist/lib/webhook-handoff-intake.js} +125 -102
- package/dist/lib/webhook-handoff.d.ts +15 -0
- package/{lib/webhook-handoff.mjs → dist/lib/webhook-handoff.js} +107 -100
- package/dist/lib/webhook-verifiers.d.ts +20 -0
- package/{lib/webhook-verifiers.mjs → dist/lib/webhook-verifiers.js} +108 -104
- package/dist/lib/why.d.ts +9 -0
- package/{lib/why.mjs → dist/lib/why.js} +6 -6
- package/dist/log-safety.d.ts +20 -0
- package/dist/log-safety.js +308 -0
- package/dist/module-layering.d.ts +42 -0
- package/dist/module-layering.js +257 -0
- package/dist/module-shape.d.ts +47 -0
- package/{module-shape.mjs → dist/module-shape.js} +278 -236
- package/dist/naming.d.ts +49 -0
- package/dist/naming.js +246 -0
- package/dist/observability.d.ts +25 -0
- package/dist/observability.js +245 -0
- package/dist/operations.d.ts +23 -0
- package/{operations.mjs → dist/operations.js} +410 -332
- package/dist/project-graph.d.ts +9 -0
- package/{project-graph.mjs → dist/project-graph.js} +8 -13
- package/dist/projections.d.ts +11 -0
- package/{projections.mjs → dist/projections.js} +60 -57
- package/dist/query-safety.d.ts +21 -0
- package/{query-safety.mjs → dist/query-safety.js} +92 -108
- package/dist/realtime.d.ts +15 -0
- package/{realtime.mjs → dist/realtime.js} +108 -106
- package/dist/resilience.d.ts +15 -0
- package/dist/resilience.js +319 -0
- package/dist/schema-authority.d.ts +15 -0
- package/{schema-authority.mjs → dist/schema-authority.js} +256 -220
- package/dist/service-deps.d.ts +17 -0
- package/{service-deps.mjs → dist/service-deps.js} +133 -130
- package/dist/service-isolation.d.ts +8 -0
- package/dist/service-isolation.js +76 -0
- package/dist/size-budget.d.ts +9 -0
- package/{size-budget.mjs → dist/size-budget.js} +27 -27
- package/dist/sonar-parity.d.ts +5 -0
- package/{sonar-parity.mjs → dist/sonar-parity.js} +7 -7
- package/dist/spec-no-skip.d.ts +9 -0
- package/dist/spec-no-skip.js +81 -0
- package/dist/spec-quality.d.ts +10 -0
- package/{spec-quality.mjs → dist/spec-quality.js} +103 -87
- package/dist/suppression.d.ts +26 -0
- package/{suppression.mjs → dist/suppression.js} +30 -45
- package/dist/temporal.d.ts +9 -0
- package/{temporal.mjs → dist/temporal.js} +75 -65
- package/dist/test-world.d.ts +28 -0
- package/{test-world.mjs → dist/test-world.js} +102 -83
- package/dist/testing.d.ts +51 -0
- package/dist/testing.js +368 -0
- package/dist/third-party-owner.d.ts +8 -0
- package/{third-party-owner.mjs → dist/third-party-owner.js} +105 -91
- package/dist/transport.d.ts +24 -0
- package/{transport.mjs → dist/transport.js} +279 -240
- package/dist/type-safety.d.ts +25 -0
- package/dist/type-safety.js +297 -0
- package/dist/unit-spec.d.ts +30 -0
- package/{unit-spec.mjs → dist/unit-spec.js} +473 -399
- package/dist/uploads.d.ts +9 -0
- package/{uploads.mjs → dist/uploads.js} +62 -54
- package/dist/user-copy.d.ts +9 -0
- package/{user-copy.mjs → dist/user-copy.js} +76 -67
- package/dist/webhooks.d.ts +16 -0
- package/{webhooks.mjs → dist/webhooks.js} +243 -231
- package/package.json +23 -8
- package/runtime/knowledge/hfs/canon-pins.yaml +18 -11
- package/runtime/scripts/hfs/repo-identity.mjs +5 -4
- package/async-discipline.mjs +0 -83
- package/comments.mjs +0 -416
- package/edge-hardening.mjs +0 -139
- package/health-ready.mjs +0 -539
- package/jwt-alg.mjs +0 -45
- package/lib/ast.mjs +0 -88
- package/lib/import-source.mjs +0 -104
- package/lib/specifier.mjs +0 -27
- package/lib/subject-values.mjs +0 -55
- package/lib/types.mjs +0 -133
- package/log-safety.mjs +0 -303
- package/module-layering.mjs +0 -270
- package/naming.mjs +0 -251
- package/observability.mjs +0 -241
- package/resilience.mjs +0 -304
- package/service-isolation.mjs +0 -75
- package/spec-no-skip.mjs +0 -85
- package/testing.mjs +0 -384
- package/type-safety.mjs +0 -323
package/comments.mjs
DELETED
|
@@ -1,416 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The rules that hold `comments.md`.
|
|
3
|
-
*
|
|
4
|
-
* Six rules, and each is careful about a different false positive:
|
|
5
|
-
*
|
|
6
|
-
* - `require-export-jsdoc` skips plain data constants. `export const MAX_ATTEMPTS = 3` is already
|
|
7
|
-
* fully described by its own name, and demanding a sentence there produces sentences that
|
|
8
|
-
* restate the name - which COMMENT-3 forbids. Only declarations with a surface get the check.
|
|
9
|
-
* - `require-public-member-jsdoc` (R109) judges only what a caller reaches: a private, protected or `#` member, the
|
|
10
|
-
* constructor and an index signature are not surface, overload signatures of one name share one doc, and a property
|
|
11
|
-
* set to a literal or a named constant is a data constant (COMMENT-1's reason). Product source only: the test tiers
|
|
12
|
-
* (`e2e`, `fixtures` of the slot manifest) document their spec-read shapes at the type.
|
|
13
|
-
* - `require-enum-member-jsdoc` checks an adjacent non-empty description, never whether it states a
|
|
14
|
-
* consequence. That half is read by a person, and the rule says so rather than pretending.
|
|
15
|
-
* - `no-non-ascii-source` takes no exemption marker, so text a program depends on
|
|
16
|
-
* lives in a message catalog (slot be.domain.messages, of any module tier, or be.feature.messages), the only place Vietnamese may appear. Specs
|
|
17
|
-
* and fixtures get no exemption.
|
|
18
|
-
* - `no-restated-name-jsdoc` (law 7) holds the decidable slice of law 3 - a doc block whose only
|
|
19
|
-
* content is the declared name re-spelled in words teaches nothing beyond the import line, so it
|
|
20
|
-
* is COMMENT-3's violation wearing COMMENT-1's shape. It fires only on an exact match between the
|
|
21
|
-
* doc's content words and the name's own words, so a doc that adds any real information is left
|
|
22
|
-
* alone - the rest of law 3 (whether a sentence explains something outside the line) is not
|
|
23
|
-
* decidable and stays a human read.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import { hfsOf } from "./lib/hfs.mjs"
|
|
27
|
-
import { normalizePath } from "./lib/path.mjs"
|
|
28
|
-
import { hasSecondLanguage } from "./runtime/scripts/lib/language.mjs"
|
|
29
|
-
import { jsdocBefore, jsdocDescription } from "./runtime/scripts/lib/jsdoc.mjs"
|
|
30
|
-
|
|
31
|
-
/** The slots of the per-owner message catalogs: the only source files that may hold Vietnamese. */
|
|
32
|
-
const CATALOG_SLOTS = new Set(["be.domain.messages", "be.feature.messages"])
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The character classes this refuses, and why it is NOT simply "ASCII only".
|
|
36
|
-
*
|
|
37
|
-
* A first cut of this rule banned every non-ASCII codepoint. Measured against the reference
|
|
38
|
-
* repository it reported 857 offenders -- and every one was an em dash, a box-drawing run in a
|
|
39
|
-
* comment banner, or a middle dot. The code has used those freely and deliberately for its whole
|
|
40
|
-
* life, so "ASCII only" was not the law being recorded; it was a stricter law being invented, which
|
|
41
|
-
* is the one thing canon must not do.
|
|
42
|
-
*
|
|
43
|
-
* What the law actually refuses is three things, for three different reasons:
|
|
44
|
-
*
|
|
45
|
-
* - VIETNAMESE letters, because a reader who does not share the author's first language loses
|
|
46
|
-
* exactly the half of the reasoning that explains the surprising parts. Matched precisely, so a
|
|
47
|
-
* European loanword (`naive`, `facade`, `Muller`) is never a false positive.
|
|
48
|
-
* - EMOJI, because they carry tone rather than information, and tone reads differently to
|
|
49
|
-
* everybody.
|
|
50
|
-
* - DECORATIVE symbols -- check marks, crosses, arrows used as ornament -- for the same reason.
|
|
51
|
-
*
|
|
52
|
-
* Typographic punctuation is none of those and stays.
|
|
53
|
-
*/
|
|
54
|
-
const VIETNAMESE_LETTER_NOTE = "detected by scripts/lib/language.mjs (`hasSecondLanguage`), structural on characters and folded to NFC so a decomposed spelling is caught too"
|
|
55
|
-
|
|
56
|
-
/** Emoji and pictographs. */
|
|
57
|
-
const EMOJI = /[\u{1F300}-\u{1FAFF}\u{1F000}-\u{1F0FF}\u{2600}-\u{27BF}\u{FE0F}\u{1F1E6}-\u{1F1FF}]/u
|
|
58
|
-
|
|
59
|
-
/** Ornamental marks that stand in for a word. */
|
|
60
|
-
const ORNAMENT = /[✅❌✔✖✗✘⭐⬆⬇➡⬅]/
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The fixtures slot that may carry localized text: a test data file that reproduces a real localized string. Placement is
|
|
64
|
-
* the whole marker (there is no pragma), and specs never live there, so a test title is never exempt.
|
|
65
|
-
*/
|
|
66
|
-
const FIXTURE_SLOTS = new Set(["be.tests.fixtures.i18n"])
|
|
67
|
-
|
|
68
|
-
/** The Vietnamese language's own name, which is a label rather than prose. */
|
|
69
|
-
const ENDONYM = /Ti\u1ebfng Vi\u1ec7t/
|
|
70
|
-
|
|
71
|
-
/** Declarations whose surface other files depend on. */
|
|
72
|
-
const DOCUMENTED_KINDS = new Set([
|
|
73
|
-
"TSInterfaceDeclaration",
|
|
74
|
-
"TSTypeAliasDeclaration",
|
|
75
|
-
"TSEnumDeclaration",
|
|
76
|
-
"ClassDeclaration",
|
|
77
|
-
"FunctionDeclaration",
|
|
78
|
-
])
|
|
79
|
-
|
|
80
|
-
/** What a line offends with, or null. */
|
|
81
|
-
const offenceIn = (line) => {
|
|
82
|
-
const withoutEndonym = line.normalize("NFC").replace(ENDONYM, "")
|
|
83
|
-
if (hasSecondLanguage(withoutEndonym)) return "a Vietnamese letter"
|
|
84
|
-
if (EMOJI.test(withoutEndonym)) return "an emoji"
|
|
85
|
-
if (ORNAMENT.test(withoutEndonym)) return "an ornamental symbol"
|
|
86
|
-
return null
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Whether an exported declaration has a surface a caller documents: a data constant is already described by its name,
|
|
91
|
-
* and a kind outside DOCUMENTED_KINDS has no surface at all.
|
|
92
|
-
*/
|
|
93
|
-
const hasDocumentedSurface = (declaration) => {
|
|
94
|
-
if (declaration.type === "VariableDeclaration") {
|
|
95
|
-
// a later declarator can expose a function even when the first binding is plain data
|
|
96
|
-
return declaration.declarations.some(({ init }) => Boolean(init)
|
|
97
|
-
&& (init.type === "ArrowFunctionExpression" || init.type === "FunctionExpression"))
|
|
98
|
-
}
|
|
99
|
-
return DOCUMENTED_KINDS.has(declaration.type)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/** Whether the adjacent JSDoc has a declaration description rather than only tags or a file header. */
|
|
103
|
-
const hasJsdocBefore = (sourceCode, node) => jsdocBefore(sourceCode, node) !== null
|
|
104
|
-
|
|
105
|
-
/** The declared name, for the message. */
|
|
106
|
-
const nameOf = (declaration) => {
|
|
107
|
-
if (declaration.id) return declaration.id.name
|
|
108
|
-
const first = declaration.declarations && declaration.declarations[0]
|
|
109
|
-
return (first && first.id && first.id.name) || "this export"
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// -- COMMENT-1 -------------------------------------------------------------------------------------
|
|
113
|
-
|
|
114
|
-
/** Every export with a surface opens with a doc block. */
|
|
115
|
-
export const requireExportJsdoc = {
|
|
116
|
-
meta: {
|
|
117
|
-
type: "suggestion",
|
|
118
|
-
docs: { description: "An exported class/interface/type/enum/function opens with JSDoc." },
|
|
119
|
-
schema: [],
|
|
120
|
-
messages: {
|
|
121
|
-
jsdoc:
|
|
122
|
-
"`{{name}}` is exported without an adjacent JSDoc description. This is surface other files depend on, and a name plus a signature says what it TAKES - never what it is for, or when to reach for it rather than the thing beside it.",
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
create(context) {
|
|
126
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
127
|
-
const check = (node) => {
|
|
128
|
-
const declaration = node.declaration
|
|
129
|
-
// a re-export has nothing here to attach a doc to
|
|
130
|
-
if (!declaration) return
|
|
131
|
-
if (!hasDocumentedSurface(declaration)) return
|
|
132
|
-
if (hasJsdocBefore(sourceCode, node)) return
|
|
133
|
-
context.report({
|
|
134
|
-
node: declaration.id || declaration,
|
|
135
|
-
messageId: "jsdoc",
|
|
136
|
-
data: { name: nameOf(declaration) },
|
|
137
|
-
})
|
|
138
|
-
}
|
|
139
|
-
return {
|
|
140
|
-
ExportNamedDeclaration: check,
|
|
141
|
-
ExportDefaultDeclaration: check,
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// -- COMMENT-3 (R109) -----------------------------------------------------------------------------
|
|
147
|
-
|
|
148
|
-
/** Class members a caller reaches: everything but the constructor, static blocks and index signatures. */
|
|
149
|
-
const CLASS_MEMBER_KINDS = new Set([
|
|
150
|
-
"MethodDefinition",
|
|
151
|
-
"PropertyDefinition",
|
|
152
|
-
"AccessorProperty",
|
|
153
|
-
"TSAbstractMethodDefinition",
|
|
154
|
-
"TSAbstractPropertyDefinition",
|
|
155
|
-
"TSAbstractAccessorProperty",
|
|
156
|
-
])
|
|
157
|
-
|
|
158
|
-
/** Interface and type-literal members a caller reaches; call, construct and index signatures have no name to document. */
|
|
159
|
-
const SIGNATURE_MEMBER_KINDS = new Set(["TSPropertySignature", "TSMethodSignature"])
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* A property set to a literal or a named constant (`name = "CreatePlans1758"`, `readonly queue = PLAN_QUEUE`) is already
|
|
163
|
-
* described by its own name and value, the same reason COMMENT-1 leaves a data constant alone.
|
|
164
|
-
*/
|
|
165
|
-
const isDataProperty = (member) => {
|
|
166
|
-
if (member.type !== "PropertyDefinition" || !member.value) return false
|
|
167
|
-
const value = member.value
|
|
168
|
-
if (value.type === "Literal" || value.type === "Identifier") return true
|
|
169
|
-
if (value.type === "TemplateLiteral") return value.expressions.length === 0
|
|
170
|
-
return value.type === "MemberExpression" && !value.computed && value.object.type === "Identifier"
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/** The test tiers of the slot manifest: spec-read shapes there are documented at the type, not field by field. */
|
|
174
|
-
const TEST_TIERS = new Set(["e2e", "fixtures"])
|
|
175
|
-
|
|
176
|
-
/** The members of an exported class, interface or object type alias that are its public surface. */
|
|
177
|
-
const publicMembersOf = (declaration) => {
|
|
178
|
-
if (declaration.type === "ClassDeclaration") {
|
|
179
|
-
return declaration.body.body.filter((member) =>
|
|
180
|
-
CLASS_MEMBER_KINDS.has(member.type)
|
|
181
|
-
&& member.kind !== "constructor"
|
|
182
|
-
&& !isDataProperty(member)
|
|
183
|
-
&& member.key?.type !== "PrivateIdentifier"
|
|
184
|
-
&& member.accessibility !== "private"
|
|
185
|
-
&& member.accessibility !== "protected")
|
|
186
|
-
}
|
|
187
|
-
if (declaration.type === "TSInterfaceDeclaration") return declaration.body.body.filter((member) => SIGNATURE_MEMBER_KINDS.has(member.type))
|
|
188
|
-
if (declaration.type === "TSTypeAliasDeclaration") {
|
|
189
|
-
const type = declaration.typeAnnotation
|
|
190
|
-
const literals = type.type === "TSTypeLiteral" ? [type]
|
|
191
|
-
: type.type === "TSIntersectionType" ? type.types.filter((part) => part.type === "TSTypeLiteral") : []
|
|
192
|
-
return literals.flatMap((literal) => literal.members.filter((member) => SIGNATURE_MEMBER_KINDS.has(member.type)))
|
|
193
|
-
}
|
|
194
|
-
return []
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/** The name a member is reached by, with its static side kept apart; null for a computed key the rule cannot name. */
|
|
198
|
-
const memberKey = (member) => {
|
|
199
|
-
if (member.computed) return null
|
|
200
|
-
const key = member.key
|
|
201
|
-
const name = key?.type === "Identifier" ? key.name : key?.type === "Literal" ? String(key.value) : null
|
|
202
|
-
return name === null ? null : `${member.static ? "static " : ""}${name}`
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/** Every public member of an exported class, interface or object type opens with a doc block (BE-COMMENT-3). */
|
|
206
|
-
export const requirePublicMemberJsdoc = {
|
|
207
|
-
meta: {
|
|
208
|
-
type: "suggestion",
|
|
209
|
-
docs: { description: "Every public member of an exported class, interface or object type alias opens with JSDoc." },
|
|
210
|
-
schema: [],
|
|
211
|
-
messages: {
|
|
212
|
-
jsdoc:
|
|
213
|
-
"`{{owner}}.{{name}}` is public surface without an adjacent JSDoc description. A caller reaches the member, not the type's doc: say what it is for, what calling or reading it causes, or what it holds.",
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
create(context) {
|
|
217
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
218
|
-
if (TEST_TIERS.has(hfsOf(context).tierOf(normalizePath(context.filename)))) return {}
|
|
219
|
-
const check = (node) => {
|
|
220
|
-
const declaration = node.declaration
|
|
221
|
-
if (!declaration || !declaration.id) return
|
|
222
|
-
// overload signatures share one name; a doc on any of them documents the member
|
|
223
|
-
const groups = new Map()
|
|
224
|
-
for (const member of publicMembersOf(declaration)) {
|
|
225
|
-
const key = memberKey(member)
|
|
226
|
-
if (key === null) continue
|
|
227
|
-
if (!groups.has(key)) groups.set(key, [])
|
|
228
|
-
groups.get(key).push(member)
|
|
229
|
-
}
|
|
230
|
-
for (const [key, members] of groups) {
|
|
231
|
-
if (members.some((member) => hasJsdocBefore(sourceCode, member))) continue
|
|
232
|
-
context.report({ node: members[0].key, messageId: "jsdoc", data: { owner: declaration.id.name, name: key.replace(/^static /, "") } })
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return {
|
|
236
|
-
ExportNamedDeclaration: check,
|
|
237
|
-
ExportDefaultDeclaration: check,
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
// -- COMMENT-2 -------------------------------------------------------------------------------------
|
|
243
|
-
|
|
244
|
-
/** Every member of an exported enum carries its own doc. */
|
|
245
|
-
export const requireEnumMemberJsdoc = {
|
|
246
|
-
meta: {
|
|
247
|
-
type: "suggestion",
|
|
248
|
-
docs: { description: "Every member of an exported enum carries its own JSDoc." },
|
|
249
|
-
schema: [],
|
|
250
|
-
messages: {
|
|
251
|
-
jsdoc:
|
|
252
|
-
"Enum member `{{name}}` has no adjacent JSDoc description. State what CHOOSING it causes, not what it is called - a member is picked at a call site far from the switch that gives it meaning. (A rule can only see that a doc exists; whether it states a consequence is read by a person.)",
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
create(context) {
|
|
256
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
257
|
-
return {
|
|
258
|
-
TSEnumDeclaration(node) {
|
|
259
|
-
if (!node.parent || node.parent.type !== "ExportNamedDeclaration") return
|
|
260
|
-
for (const member of node.members || []) {
|
|
261
|
-
if (hasJsdocBefore(sourceCode, member)) continue
|
|
262
|
-
const name = member.id && (member.id.name || member.id.value)
|
|
263
|
-
context.report({ node: member, messageId: "jsdoc", data: { name: name || "?" } })
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// -- COMMENT-4 -------------------------------------------------------------------------------------
|
|
271
|
-
|
|
272
|
-
/** Source prose is English; there is no exemption marker. */
|
|
273
|
-
export const noNonAsciiSource = {
|
|
274
|
-
meta: {
|
|
275
|
-
type: "problem",
|
|
276
|
-
docs: { description: "Source stays English; no exemption marker." },
|
|
277
|
-
schema: [],
|
|
278
|
-
messages: {
|
|
279
|
-
nonAscii:
|
|
280
|
-
"This line carries {{offence}}. The bar is a reader who does not share the author's first language: a codebase with two languages in it has somebody for whom half the reasoning is unavailable, and it is the half explaining the surprising parts - and an emoji or an ornament carries tone rather than information, which reads differently to everybody. There is no exemption marker: write the text in English, or keep product copy in a locale or data file.",
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
create(context) {
|
|
284
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
285
|
-
// a message catalog is product copy in two languages; every other file is prose for the next reader
|
|
286
|
-
const slot = hfsOf(context).slotOf(context.filename)
|
|
287
|
-
if (CATALOG_SLOTS.has(slot) || FIXTURE_SLOTS.has(slot)) return {}
|
|
288
|
-
|
|
289
|
-
return {
|
|
290
|
-
"Program:exit"(node) {
|
|
291
|
-
const lines = sourceCode.getLines()
|
|
292
|
-
for (let index = 0; index < lines.length; index += 1) {
|
|
293
|
-
const line = lines[index]
|
|
294
|
-
const offence = offenceIn(line)
|
|
295
|
-
if (offence === null) continue
|
|
296
|
-
context.report({
|
|
297
|
-
node,
|
|
298
|
-
loc: {
|
|
299
|
-
line: index + 1,
|
|
300
|
-
column: 0,
|
|
301
|
-
},
|
|
302
|
-
messageId: "nonAscii",
|
|
303
|
-
data: {
|
|
304
|
-
offence,
|
|
305
|
-
},
|
|
306
|
-
})
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// -- law 7 -------------------------------------------------------------------------------------
|
|
314
|
-
|
|
315
|
-
/** Splits a declared name into its lowercase words, so `readUser` compares against "read user". */
|
|
316
|
-
const wordsOf = (name) =>
|
|
317
|
-
(String(name || "")
|
|
318
|
-
.replace(/([a-z0-9])([A-Z])/g, "$1 $2")
|
|
319
|
-
.replace(/[_-]+/g, " ")
|
|
320
|
-
.toLowerCase()
|
|
321
|
-
.match(/[a-z0-9]+/g) || [])
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Filler a doc contributes no information by using: articles and linking words, plus the two generic
|
|
325
|
-
* nouns the law's own anchor examples restate with ("the pending state", "the read user function").
|
|
326
|
-
* Nothing here strips a word that could carry real content, so a doc that explains anything beyond
|
|
327
|
-
* the name keeps enough leftover words to fail the equality check below.
|
|
328
|
-
*/
|
|
329
|
-
const RESTATEMENT_FILLER = new Set(["a", "an", "the", "is", "of", "for", "to", "this", "that", "function", "state"])
|
|
330
|
-
|
|
331
|
-
/** The content words a doc comment contributes once filler is stripped out. */
|
|
332
|
-
const docContentWords = (comment) =>
|
|
333
|
-
(jsdocDescription(comment).match(/[A-Za-z]+/g) || [])
|
|
334
|
-
.map((word) => word.toLowerCase())
|
|
335
|
-
.filter((word) => !RESTATEMENT_FILLER.has(word))
|
|
336
|
-
|
|
337
|
-
/** Whether a doc's leftover content words are exactly the declared name's own words - nothing added. */
|
|
338
|
-
const isPureRestatement = (comment, declaredName) => {
|
|
339
|
-
const content = docContentWords(comment)
|
|
340
|
-
const identifier = wordsOf(declaredName)
|
|
341
|
-
if (content.length === 0 || identifier.length === 0) return false
|
|
342
|
-
const contentSet = new Set(content)
|
|
343
|
-
const identifierSet = new Set(identifier)
|
|
344
|
-
if (contentSet.size !== identifierSet.size) return false
|
|
345
|
-
for (const word of contentSet) if (!identifierSet.has(word)) return false
|
|
346
|
-
return true
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/** A doc block that only re-spells the declared name is COMMENT-3's violation wearing COMMENT-1's shape. */
|
|
350
|
-
export const noRestatedNameJsdoc = {
|
|
351
|
-
meta: {
|
|
352
|
-
type: "suggestion",
|
|
353
|
-
docs: {
|
|
354
|
-
description:
|
|
355
|
-
"COMMENT-3, law 7: a doc block that restates the declared name is a COMMENT-3 violation wearing a COMMENT-1 shape, even while the lint gate that checks a doc EXISTS stays green.",
|
|
356
|
-
},
|
|
357
|
-
schema: [],
|
|
358
|
-
messages: {
|
|
359
|
-
restated:
|
|
360
|
-
"This doc block only re-spells `{{name}}` in words. A name plus a signature already says what it TAKES; the doc has to say what it is FOR, or what choosing it causes, or it is a COMMENT-3 violation wearing a COMMENT-1 shape. Delete the restatement and write the reason instead.",
|
|
361
|
-
},
|
|
362
|
-
},
|
|
363
|
-
create(context) {
|
|
364
|
-
const sourceCode = context.sourceCode || context.getSourceCode()
|
|
365
|
-
const checkExport = (node) => {
|
|
366
|
-
const declaration = node.declaration
|
|
367
|
-
// a re-export has nothing here to attach a doc to
|
|
368
|
-
if (!declaration) return
|
|
369
|
-
if (!hasDocumentedSurface(declaration)) return
|
|
370
|
-
const doc = jsdocBefore(sourceCode, node)
|
|
371
|
-
if (!doc) return
|
|
372
|
-
const name = nameOf(declaration)
|
|
373
|
-
if (!isPureRestatement(doc, name)) return
|
|
374
|
-
context.report({ node: declaration.id || declaration, messageId: "restated", data: { name } })
|
|
375
|
-
}
|
|
376
|
-
return {
|
|
377
|
-
ExportNamedDeclaration: checkExport,
|
|
378
|
-
ExportDefaultDeclaration: checkExport,
|
|
379
|
-
TSEnumDeclaration(node) {
|
|
380
|
-
if (!node.parent || node.parent.type !== "ExportNamedDeclaration") return
|
|
381
|
-
for (const member of node.members || []) {
|
|
382
|
-
const doc = jsdocBefore(sourceCode, member)
|
|
383
|
-
if (!doc) continue
|
|
384
|
-
const name = member.id && (member.id.name || member.id.value)
|
|
385
|
-
if (!name || !isPureRestatement(doc, name)) continue
|
|
386
|
-
context.report({ node: member, messageId: "restated", data: { name } })
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
/** The rules this law contributes to the plugin. */
|
|
394
|
-
export const rules = {
|
|
395
|
-
"require-export-jsdoc": requireExportJsdoc,
|
|
396
|
-
"require-enum-member-jsdoc": requireEnumMemberJsdoc,
|
|
397
|
-
"require-public-member-jsdoc": requirePublicMemberJsdoc,
|
|
398
|
-
"no-non-ascii-source": noNonAsciiSource,
|
|
399
|
-
"no-restated-name-jsdoc": noRestatedNameJsdoc,
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* The level this law asks for, as the plugin's own opinion.
|
|
404
|
-
*
|
|
405
|
-
* `no-non-ascii-source` replaces three separate rules in the reference plugin - one for Vietnamese,
|
|
406
|
-
* one for emoji, one for decorative symbols. They were three character classes answering one
|
|
407
|
-
* question, and a reader who hit the emoji rule learned nothing about the other two. One rule with
|
|
408
|
-
* one reason is easier to obey, and impossible to satisfy by switching alphabets.
|
|
409
|
-
*/
|
|
410
|
-
export const recommended = {
|
|
411
|
-
"starci-be/require-export-jsdoc": "error",
|
|
412
|
-
"starci-be/require-enum-member-jsdoc": "error",
|
|
413
|
-
"starci-be/require-public-member-jsdoc": "error",
|
|
414
|
-
"starci-be/no-non-ascii-source": "error",
|
|
415
|
-
"starci-be/no-restated-name-jsdoc": "error",
|
|
416
|
-
}
|
package/edge-hardening.mjs
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
/** R261: every API entrypoint declares its browser and proxy boundary. */
|
|
2
|
-
import { keyName, staticText, walk } from "./lib/ast.mjs"
|
|
3
|
-
import { hfsOf } from "./lib/hfs.mjs"
|
|
4
|
-
|
|
5
|
-
const unwrap = (node) => {
|
|
6
|
-
while (node && ["TSAsExpression", "TSTypeAssertion", "TSSatisfiesExpression", "TSNonNullExpression", "AwaitExpression", "ChainExpression"].includes(node.type)) node = node.expression ?? node.argument
|
|
7
|
-
return node
|
|
8
|
-
}
|
|
9
|
-
const property = (node, name, constants = new Map(), seen = new Set()) => {
|
|
10
|
-
if (node?.type !== "ObjectExpression") return undefined
|
|
11
|
-
for (const entry of [...node.properties].reverse()) {
|
|
12
|
-
if (entry.type === "SpreadElement") {
|
|
13
|
-
const spread = resolve(entry.argument, constants, seen)
|
|
14
|
-
if (spread?.type !== "ObjectExpression") return undefined
|
|
15
|
-
const value = property(spread, name, constants, seen)
|
|
16
|
-
if (value !== undefined) return value
|
|
17
|
-
} else {
|
|
18
|
-
const key = entry.computed ? staticText(entry.key) : keyName(entry.key)
|
|
19
|
-
if (key === null) return undefined
|
|
20
|
-
if (key === name) return entry.value
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return undefined
|
|
24
|
-
}
|
|
25
|
-
const method = (node) => node?.type === "MemberExpression" ? (node.computed ? staticText(node.property) : keyName(node.property)) : null
|
|
26
|
-
|
|
27
|
-
/** Only declared API entrypoints are judged; workers have no browser edge. */
|
|
28
|
-
const isApiMain = (context) => {
|
|
29
|
-
const hfs = hfsOf(context)
|
|
30
|
-
const file = hfs.relative(context.filename ?? context.getFilename())
|
|
31
|
-
return hfs.slotOf(context.filename ?? context.getFilename()) === "be.app.api"
|
|
32
|
-
&& hfs.apps.some((app) => app.kind === "api" && file === `apps/${app.name}/src/main.ts`)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** Resolve local constants without making an identifier's spelling a security proof. */
|
|
36
|
-
const resolve = (node, constants, seen = new Set()) => {
|
|
37
|
-
node = unwrap(node)
|
|
38
|
-
if (node?.type === "Identifier" && constants.has(node.name) && !seen.has(node.name)) return resolve(constants.get(node.name), constants, new Set([...seen, node.name]))
|
|
39
|
-
if (node?.type === "MemberExpression" && method(node) !== null) {
|
|
40
|
-
const value = property(resolve(node.object, constants, seen), method(node), constants, seen)
|
|
41
|
-
if (value !== undefined) return resolve(value, constants, seen)
|
|
42
|
-
}
|
|
43
|
-
return node
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const allowedOrigin = (node) => {
|
|
47
|
-
const value = staticText(node)
|
|
48
|
-
if (value === null || value.includes("*") || value.endsWith("/")) return false
|
|
49
|
-
try {
|
|
50
|
-
const url = new URL(value)
|
|
51
|
-
return value === url.origin && (url.protocol === "https:" || (url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname)))
|
|
52
|
-
} catch { return false }
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Config owns a dynamic allowlist; literal lists must contain exact origins. */
|
|
56
|
-
const allowlist = (node, constants) => {
|
|
57
|
-
node = resolve(node, constants)
|
|
58
|
-
if (node?.type === "MemberExpression") return method(node) === "allowedOrigins"
|
|
59
|
-
if (node?.type !== "ArrayExpression" || node.elements.length === 0) return false
|
|
60
|
-
return node.elements.every((entry) => entry?.type === "SpreadElement"
|
|
61
|
-
? allowlist(entry.argument, constants)
|
|
62
|
-
: allowedOrigin(resolve(entry, constants)))
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const hopCount = (node, constants) => {
|
|
66
|
-
node = resolve(node, constants)
|
|
67
|
-
return node?.type === "Literal" && Number.isSafeInteger(node.value) && node.value >= 0
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const audit = (program) => {
|
|
71
|
-
const constants = new Map()
|
|
72
|
-
const helpers = new Set()
|
|
73
|
-
const middleware = new Set()
|
|
74
|
-
const factories = new Set()
|
|
75
|
-
const applications = new Set()
|
|
76
|
-
const calls = []
|
|
77
|
-
walk(program, (node) => {
|
|
78
|
-
if (node.type === "ImportDeclaration") {
|
|
79
|
-
if (node.source.value === "@nestjs/core") {
|
|
80
|
-
for (const specifier of node.specifiers) if (specifier.imported?.name === "NestFactory") factories.add(specifier.local.name)
|
|
81
|
-
}
|
|
82
|
-
if (/^@modules\/platform\/http-security(?:\/|$)/.test(node.source.value)) {
|
|
83
|
-
for (const specifier of node.specifiers) {
|
|
84
|
-
if (["applyHttpSecurity", "configureHttpSecurity"].includes(specifier.imported?.name)) helpers.add(specifier.local.name)
|
|
85
|
-
if (["securityHeaders", "createSecurityHeadersMiddleware"].includes(specifier.imported?.name)) middleware.add(specifier.local.name)
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (node.type === "VariableDeclarator" && node.id.type === "Identifier" && node.init) constants.set(node.id.name, node.init)
|
|
90
|
-
if (node.type === "CallExpression") calls.push(node)
|
|
91
|
-
})
|
|
92
|
-
for (const [name, initializer] of constants) {
|
|
93
|
-
const node = resolve(initializer, constants)
|
|
94
|
-
if (node?.type === "CallExpression" && method(node.callee) === "create" && factories.has(node.callee.object.name)) applications.add(name)
|
|
95
|
-
}
|
|
96
|
-
const isApplication = (node) => {
|
|
97
|
-
if (node?.type === "Identifier" && applications.has(node.name)) return true
|
|
98
|
-
node = resolve(node, constants)
|
|
99
|
-
if (node?.type !== "CallExpression") return false
|
|
100
|
-
if (method(node.callee) === "create" && factories.has(node.callee.object.name)) return true
|
|
101
|
-
return ["getInstance", "getHttpAdapter"].includes(method(node.callee)) && isApplication(node.callee.object)
|
|
102
|
-
}
|
|
103
|
-
const direct = calls.filter((call) => call.callee.type === "MemberExpression" && isApplication(call.callee.object))
|
|
104
|
-
const applied = calls.filter((call) => call.callee.type === "Identifier" && helpers.has(call.callee.name) && isApplication(call.arguments[0]))
|
|
105
|
-
const helperCors = applied.some((call) => {
|
|
106
|
-
const config = resolve(call.arguments[1], constants)
|
|
107
|
-
return config?.type === "MemberExpression" || allowlist(property(config, "allowedOrigins", constants), constants)
|
|
108
|
-
})
|
|
109
|
-
const corsCalls = direct.filter((call) => method(call.callee) === "enableCors")
|
|
110
|
-
const cors = (helperCors || corsCalls.length > 0) && corsCalls.every((call) => allowlist(property(resolve(call.arguments[0], constants), "origin", constants), constants))
|
|
111
|
-
const headers = applied.length > 0 || direct.some((call) => method(call.callee) === "use" && call.arguments.some((argument) => {
|
|
112
|
-
const candidate = resolve(argument, constants)
|
|
113
|
-
return (candidate?.type === "Identifier" && middleware.has(candidate.name))
|
|
114
|
-
|| (candidate?.type === "CallExpression" && candidate.callee.type === "Identifier" && middleware.has(candidate.callee.name))
|
|
115
|
-
}))
|
|
116
|
-
const poweredCalls = direct.filter((call) => ["set", "enable", "disable"].includes(method(call.callee)) && staticText(call.arguments[0])?.toLowerCase() === "x-powered-by")
|
|
117
|
-
const poweredOff = (applied.length > 0 || poweredCalls.some((call) => method(call.callee) === "disable" || (method(call.callee) === "set" && call.arguments[1]?.value === false)))
|
|
118
|
-
&& poweredCalls.every((call) => method(call.callee) === "disable" || (method(call.callee) === "set" && call.arguments[1]?.value === false))
|
|
119
|
-
const proxyCalls = direct.filter((call) => method(call.callee) === "set" && staticText(call.arguments[0]) === "trust proxy")
|
|
120
|
-
const proxy = (proxyCalls.length > 0 || applied.length > 0)
|
|
121
|
-
&& proxyCalls.every((call) => hopCount(call.arguments[1], constants))
|
|
122
|
-
&& applied.every((call) => hopCount(property(resolve(call.arguments[2], constants), "trustProxy", constants), constants))
|
|
123
|
-
return { cors, headers: headers && poweredOff, proxy }
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const edgeRule = (field, code, description) => ({
|
|
127
|
-
meta: { type: "problem", docs: { description }, schema: [], messages: { boundary: `${code}: ${description}` } },
|
|
128
|
-
create(context) {
|
|
129
|
-
if (!isApiMain(context)) return {}
|
|
130
|
-
return { "Program:exit"(node) { if (!audit(node)[field]) context.report({ node, messageId: "boundary" }) } }
|
|
131
|
-
},
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
export const corsAllowlist = edgeRule("cors", "BE_CORS_ALLOWLIST", "Configure CORS with an explicit origin allowlist from http-security config; wildcard, open and missing origins are refused.")
|
|
135
|
-
export const securityHeaders = edgeRule("headers", "BE_SECURITY_HEADERS", "Apply the platform/http-security response middleware and disable x-powered-by.")
|
|
136
|
-
export const trustProxy = edgeRule("proxy", "BE_TRUST_PROXY", "Declare trust proxy as a nonnegative integer hop count; blanket trust and undeclared proxy trust are refused.")
|
|
137
|
-
|
|
138
|
-
export const rules = { "cors-allowlist": corsAllowlist, "security-headers": securityHeaders, "trust-proxy": trustProxy }
|
|
139
|
-
export const recommended = Object.fromEntries(Object.keys(rules).map((name) => [`starci-be/${name}`, "error"]))
|