glosslint 0.0.0 → 0.1.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.
@@ -0,0 +1,520 @@
1
+ // src/presets/inclusive.ts
2
+ const corpus = {
3
+ kind: "glosslint.corpus",
4
+ terms: [
5
+ {
6
+ term: "allowlist",
7
+ description: "A list of entries that are let through.",
8
+ avoid: [{
9
+ word: "whitelist",
10
+ why: "It ties white to good and permitted."
11
+ }],
12
+ examples: {
13
+ good: ["Add the address to the allowlist."],
14
+ bad: ["Add the address to the whitelist."]
15
+ }
16
+ },
17
+ {
18
+ term: "allowlisted",
19
+ description: "On the list of entries that are let through.",
20
+ avoid: [{
21
+ word: "whitelisted",
22
+ why: "It ties white to good and permitted."
23
+ }],
24
+ examples: {
25
+ good: ["The domain is allowlisted."],
26
+ bad: ["The domain is whitelisted."]
27
+ }
28
+ },
29
+ {
30
+ term: "denylist",
31
+ description: "A list of entries that are refused.",
32
+ nuance: "Blocklist works too.",
33
+ avoid: [{
34
+ word: "blacklist",
35
+ why: "It ties black to bad and forbidden."
36
+ }],
37
+ examples: {
38
+ good: ["Requests from the denylist are dropped."],
39
+ bad: ["Requests from the blacklist are dropped."]
40
+ }
41
+ },
42
+ {
43
+ term: "denylisted",
44
+ description: "On the list of entries that are refused.",
45
+ avoid: [{
46
+ word: "blacklisted",
47
+ why: "It ties black to bad and forbidden."
48
+ }],
49
+ examples: {
50
+ good: ["The sender is denylisted."],
51
+ bad: ["The sender is blacklisted."]
52
+ }
53
+ },
54
+ {
55
+ term: "primary",
56
+ description: "The node that accepts writes and that the others copy from.",
57
+ nuance: "Leader works for consensus systems. A git branch called master is not flagged.",
58
+ avoid: [
59
+ {
60
+ word: "master server",
61
+ why: "It borrows the language of slavery."
62
+ },
63
+ {
64
+ word: "master node",
65
+ why: "It borrows the language of slavery."
66
+ },
67
+ {
68
+ word: "master database",
69
+ why: "It borrows the language of slavery."
70
+ },
71
+ {
72
+ word: "master process",
73
+ why: "It borrows the language of slavery."
74
+ }
75
+ ],
76
+ examples: {
77
+ good: ["Writes go to the primary database."],
78
+ bad: ["Writes go to the master database."]
79
+ }
80
+ },
81
+ {
82
+ term: "replica",
83
+ description: "A node that copies the primary and serves reads.",
84
+ nuance: "Follower, secondary or, for buses, target also work.",
85
+ avoid: [{
86
+ word: "slave",
87
+ why: "It borrows the language of slavery."
88
+ }],
89
+ examples: {
90
+ good: ["Reads are spread across three replicas."],
91
+ bad: ["Reads are spread across three slaves."]
92
+ }
93
+ },
94
+ {
95
+ term: "placeholder",
96
+ description: "A stand-in value used until the real one exists.",
97
+ nuance: "Sample or example data also work.",
98
+ avoid: [
99
+ {
100
+ word: "dummy value",
101
+ why: "Dummy has long been a slur for people who cannot speak."
102
+ },
103
+ {
104
+ word: "dummy data",
105
+ why: "Dummy has long been a slur for people who cannot speak."
106
+ },
107
+ {
108
+ word: "dummy text",
109
+ why: "Dummy has long been a slur for people who cannot speak."
110
+ }
111
+ ],
112
+ examples: {
113
+ good: ["Fill the form with a placeholder value."],
114
+ bad: ["Fill the form with a dummy value."]
115
+ }
116
+ },
117
+ {
118
+ term: "everyone",
119
+ description: "Every person you are addressing.",
120
+ nuance: "Folks, all and team also work.",
121
+ avoid: [{
122
+ word: "guys",
123
+ why: "It addresses a mixed group as men."
124
+ }, {
125
+ word: "ladies and gentlemen",
126
+ why: "It leaves out people who are neither."
127
+ }],
128
+ examples: {
129
+ good: ["Thanks, everyone, for testing."],
130
+ bad: ["Thanks, guys, for testing."]
131
+ }
132
+ },
133
+ {
134
+ term: "person-hours",
135
+ description: "A unit of work: one person working for one hour.",
136
+ avoid: [{
137
+ word: "man-hours",
138
+ why: "It counts only men as the people doing the work."
139
+ }],
140
+ examples: {
141
+ good: ["The migration took 40 person-hours."],
142
+ bad: ["The migration took 40 man-hours."]
143
+ }
144
+ },
145
+ {
146
+ term: "person-days",
147
+ description: "A unit of work: one person working for one day.",
148
+ avoid: [{
149
+ word: "man-days",
150
+ why: "It counts only men as the people doing the work."
151
+ }],
152
+ examples: {
153
+ good: ["We estimate 12 person-days for the redesign."],
154
+ bad: ["We estimate 12 man-days for the redesign."]
155
+ }
156
+ },
157
+ {
158
+ term: "coherence check",
159
+ description: "A quick test that a result is plausible before deeper work.",
160
+ nuance: "Quick check or smoke test also work.",
161
+ avoid: [{
162
+ word: "sanity check",
163
+ why: "It treats mental illness as a byword for being wrong."
164
+ }, {
165
+ word: "sanity test",
166
+ why: "It treats mental illness as a byword for being wrong."
167
+ }],
168
+ examples: {
169
+ good: ["Run a coherence check on the totals."],
170
+ bad: ["Run a sanity check on the totals."]
171
+ }
172
+ },
173
+ {
174
+ term: "legacy",
175
+ description: "Kept under the old rules after the rules changed.",
176
+ nuance: "Exempt also works.",
177
+ avoid: [{
178
+ word: "grandfathered",
179
+ why: "Grandfather clauses were written to keep Black men from voting."
180
+ }, {
181
+ word: "grandfather clause",
182
+ why: "Grandfather clauses were written to keep Black men from voting."
183
+ }],
184
+ examples: {
185
+ good: ["Existing plans keep their legacy price."],
186
+ bad: ["Existing plans are grandfathered at the old price."]
187
+ }
188
+ },
189
+ {
190
+ term: "workforce",
191
+ description: "The people available to do the work.",
192
+ nuance: "Staff or people also work.",
193
+ avoid: [{
194
+ word: "manpower",
195
+ why: "It counts only men as the people doing the work."
196
+ }],
197
+ examples: {
198
+ good: ["We lack the workforce for a weekend release."],
199
+ bad: ["We lack the manpower for a weekend release."]
200
+ }
201
+ },
202
+ {
203
+ term: "artificial",
204
+ description: "Made by people rather than occurring in nature.",
205
+ nuance: "Synthetic or human-made also work.",
206
+ avoid: [{
207
+ word: "man-made",
208
+ why: "It credits only men with making things."
209
+ }],
210
+ examples: {
211
+ good: ["The lake is artificial."],
212
+ bad: ["The lake is man-made."]
213
+ }
214
+ },
215
+ {
216
+ term: "chair",
217
+ description: "The person who runs a meeting or a committee.",
218
+ nuance: "Chairperson also works.",
219
+ avoid: [{
220
+ word: "chairman",
221
+ why: "It assumes the person is a man."
222
+ }],
223
+ examples: {
224
+ good: ["The chair opens the meeting."],
225
+ bad: ["The chairman opens the meeting."]
226
+ }
227
+ },
228
+ {
229
+ term: "salesperson",
230
+ description: "A person who sells to customers.",
231
+ avoid: [{
232
+ word: "salesman",
233
+ why: "It assumes the person is a man."
234
+ }],
235
+ examples: {
236
+ good: ["Ask a salesperson for a quote."],
237
+ bad: ["Ask a salesman for a quote."]
238
+ }
239
+ },
240
+ {
241
+ term: "spokesperson",
242
+ description: "A person who speaks for an organisation.",
243
+ avoid: [{
244
+ word: "spokesman",
245
+ why: "It assumes the person is a man."
246
+ }],
247
+ examples: {
248
+ good: ["A spokesperson confirmed the outage."],
249
+ bad: ["A spokesman confirmed the outage."]
250
+ }
251
+ },
252
+ {
253
+ term: "humanity",
254
+ description: "All people, taken together.",
255
+ nuance: "Humankind or people also work.",
256
+ avoid: [{
257
+ word: "mankind",
258
+ why: "It names all people after men."
259
+ }],
260
+ examples: {
261
+ good: ["A small step for humanity."],
262
+ bad: ["A small step for mankind."]
263
+ }
264
+ },
265
+ {
266
+ term: "staffed",
267
+ description: "Having people on duty.",
268
+ avoid: [{
269
+ word: "manned",
270
+ why: "It assumes the people on duty are men."
271
+ }],
272
+ examples: {
273
+ good: ["The help desk is staffed until six."],
274
+ bad: ["The help desk is manned until six."]
275
+ }
276
+ },
277
+ {
278
+ term: "uncrewed",
279
+ description: "Running with no people on board.",
280
+ avoid: [{
281
+ word: "unmanned",
282
+ why: "It assumes a crew would be men."
283
+ }],
284
+ examples: {
285
+ good: ["An uncrewed drone maps the site."],
286
+ bad: ["An unmanned drone maps the site."]
287
+ }
288
+ },
289
+ {
290
+ term: "intermediary",
291
+ description: "A party that sits between two others in a deal or a request.",
292
+ nuance: "Broker or go-between also work.",
293
+ avoid: [{
294
+ word: "middleman",
295
+ why: "It assumes the party is a man."
296
+ }],
297
+ examples: {
298
+ good: ["The proxy acts as an intermediary."],
299
+ bad: ["The proxy acts as a middleman."]
300
+ }
301
+ },
302
+ {
303
+ term: "first-year student",
304
+ description: "A student in their first year.",
305
+ avoid: [{
306
+ word: "freshman",
307
+ why: "It assumes the student is a man."
308
+ }],
309
+ examples: {
310
+ good: ["Every first-year student gets a mentor."],
311
+ bad: ["Every freshman gets a mentor."]
312
+ }
313
+ },
314
+ {
315
+ term: "degraded",
316
+ description: "Working, but worse than it should.",
317
+ nuance: "Hobbled, slowed or broken may fit better.",
318
+ avoid: [{
319
+ word: "crippled",
320
+ why: "It uses disability as a byword for broken."
321
+ }, {
322
+ word: "crippling",
323
+ why: "It uses disability as a byword for broken."
324
+ }],
325
+ examples: {
326
+ good: ["The cache miss left the page degraded."],
327
+ bad: ["The cache miss left the page crippled."]
328
+ }
329
+ },
330
+ {
331
+ term: "accessible",
332
+ description: "Usable by people with disabilities.",
333
+ avoid: [{
334
+ word: "handicapped",
335
+ why: "Disabled people widely reject it as dated."
336
+ }],
337
+ examples: {
338
+ good: ["Use the accessible entrance on the left."],
339
+ bad: ["Use the handicapped entrance on the left."]
340
+ }
341
+ },
342
+ {
343
+ term: "wheelchair user",
344
+ description: "A person who uses a wheelchair.",
345
+ avoid: [{
346
+ word: "wheelchair-bound",
347
+ why: "A wheelchair gives freedom, it does not bind."
348
+ }, {
349
+ word: "confined to a wheelchair",
350
+ why: "A wheelchair gives freedom, it does not confine."
351
+ }],
352
+ examples: {
353
+ good: ["The route works for a wheelchair user."],
354
+ bad: ["The route works for someone confined to a wheelchair."]
355
+ }
356
+ },
357
+ {
358
+ term: "surprising",
359
+ description: "Not what you expected.",
360
+ nuance: "Say what you mean: wild, absurd, unexpected or huge.",
361
+ avoid: [{
362
+ word: "insane",
363
+ why: "It uses mental illness as a byword for extreme or wrong."
364
+ }, {
365
+ word: "crazy",
366
+ why: "It uses mental illness as a byword for extreme or wrong."
367
+ }],
368
+ examples: {
369
+ good: ["The speedup is surprising."],
370
+ bad: ["The speedup is insane."]
371
+ }
372
+ },
373
+ {
374
+ term: "ignore",
375
+ description: "To leave something unattended on purpose.",
376
+ nuance: "Overlook also works.",
377
+ avoid: [{
378
+ word: "turn a blind eye",
379
+ why: "It uses blindness as a byword for not caring."
380
+ }],
381
+ examples: {
382
+ good: ["We cannot ignore flaky tests."],
383
+ bad: ["We cannot turn a blind eye to flaky tests."]
384
+ }
385
+ },
386
+ {
387
+ term: "easy task",
388
+ description: "Work that takes little effort.",
389
+ nuance: "Breeze also works.",
390
+ avoid: [{
391
+ word: "cakewalk",
392
+ why: "It comes from a dance enslaved people were made to perform."
393
+ }],
394
+ examples: {
395
+ good: ["The upgrade was an easy task."],
396
+ bad: ["The upgrade was a cakewalk."]
397
+ }
398
+ },
399
+ {
400
+ term: "undocumented knowledge",
401
+ description: "What a team knows that is written down nowhere.",
402
+ nuance: "Write it down, then link the page.",
403
+ avoid: [{
404
+ word: "tribal knowledge",
405
+ why: "It uses indigenous peoples as a byword for primitive."
406
+ }],
407
+ examples: {
408
+ good: ["The deploy steps are undocumented knowledge."],
409
+ bad: ["The deploy steps are tribal knowledge."]
410
+ }
411
+ },
412
+ {
413
+ term: "meeting",
414
+ description: "People getting together to discuss something.",
415
+ nuance: "Huddle or sync also work.",
416
+ avoid: [{
417
+ word: "powwow",
418
+ why: "It borrows a Native American ceremony for a work chat."
419
+ }],
420
+ examples: {
421
+ good: ["Let us have a quick meeting after lunch."],
422
+ bad: ["Let us have a quick powwow after lunch."]
423
+ }
424
+ },
425
+ {
426
+ term: "expert",
427
+ description: "A person with deep skill in a field.",
428
+ nuance: "Name the skill: senior engineer, Rust specialist.",
429
+ avoid: [{
430
+ word: "rockstar developer",
431
+ why: "It reads as a call for one kind of brash person."
432
+ }, {
433
+ word: "rockstar engineer",
434
+ why: "It reads as a call for one kind of brash person."
435
+ }],
436
+ examples: {
437
+ good: ["We are hiring a frontend expert."],
438
+ bad: ["We are hiring a rockstar developer."]
439
+ }
440
+ },
441
+ {
442
+ term: "ethical hacker",
443
+ description: "A person who breaks into systems with permission, to find flaws.",
444
+ avoid: [{
445
+ word: "white hat hacker",
446
+ why: "It ties white to good."
447
+ }],
448
+ examples: {
449
+ good: ["An ethical hacker found the leak."],
450
+ bad: ["A white hat hacker found the leak."]
451
+ }
452
+ },
453
+ {
454
+ term: "malicious hacker",
455
+ description: "A person who breaks into systems without permission, to do harm.",
456
+ nuance: "Attacker also works.",
457
+ avoid: [{
458
+ word: "black hat hacker",
459
+ why: "It ties black to bad."
460
+ }],
461
+ examples: {
462
+ good: ["A malicious hacker stole the keys."],
463
+ bad: ["A black hat hacker stole the keys."]
464
+ }
465
+ },
466
+ {
467
+ term: "freeze period",
468
+ description: "A stretch of time when changes are not allowed.",
469
+ avoid: [{
470
+ word: "blackout period",
471
+ why: "It ties black to forbidden."
472
+ }, {
473
+ word: "blackout window",
474
+ why: "It ties black to forbidden."
475
+ }],
476
+ examples: {
477
+ good: ["No deploys during the freeze period."],
478
+ bad: ["No deploys during the blackout period."]
479
+ }
480
+ },
481
+ {
482
+ term: "deceptive pattern",
483
+ description: "A design that tricks people into doing what they did not mean to.",
484
+ avoid: [{
485
+ word: "dark pattern",
486
+ why: "It ties dark to bad, and says less than deceptive."
487
+ }],
488
+ examples: {
489
+ good: ["A hidden unsubscribe link is a deceptive pattern."],
490
+ bad: ["A hidden unsubscribe link is a dark pattern."]
491
+ }
492
+ },
493
+ {
494
+ term: "they",
495
+ description: "A person whose gender you do not know or that does not matter.",
496
+ avoid: [{
497
+ word: "he or she",
498
+ why: "It leaves out people who are neither."
499
+ }],
500
+ examples: {
501
+ good: ["When a rider signs up, they get a code."],
502
+ bad: ["When a rider signs up, he or she gets a code."]
503
+ }
504
+ },
505
+ {
506
+ term: "their",
507
+ description: "Belonging to a person whose gender you do not know or that does not matter.",
508
+ avoid: [{
509
+ word: "his or her",
510
+ why: "It leaves out people who are neither."
511
+ }],
512
+ examples: {
513
+ good: ["Each rider sets their own PIN."],
514
+ bad: ["Each rider sets his or her own PIN."]
515
+ }
516
+ }
517
+ ],
518
+ allow: []
519
+ };
520
+ export { corpus as t };
@@ -0,0 +1,75 @@
1
+ import { S as X18nGlossaryEntry, _ as Link, a as CasingKind, b as TermSummary, c as Corpus, d as Finding, f as FindingCode, g as KindSite, h as KindOf, i as Casing, l as CorpusInput, m as FixKind, n as CaseMode, o as CliFinding, p as Fix, r as CaseStyle, s as CliReport, t as Avoid, u as CorpusTestFailure, v as Matcher, x as TextKind, y as Term } from "./types-Bbp_cYfZ.mjs";
2
+ import { n as fromGlossary, r as readGlossary, t as GlossaryProblem } from "./glossary-DmTK_e1d.mjs";
3
+ /** Stable codes of `GlosslintConfigError`. */
4
+ export declare const CONFIG_ERRORS: {
5
+ readonly unknownField: "GLOSSLINT_C001";
6
+ readonly missingTerm: "GLOSSLINT_C002";
7
+ readonly badCase: "GLOSSLINT_C003";
8
+ readonly avoidIsTerm: "GLOSSLINT_C004";
9
+ readonly duplicateTerm: "GLOSSLINT_C005";
10
+ readonly badSkip: "GLOSSLINT_C006";
11
+ readonly badType: "GLOSSLINT_C007";
12
+ readonly notCorpus: "GLOSSLINT_C008";
13
+ readonly noGlossary: "GLOSSLINT_C009";
14
+ readonly badCasing: "GLOSSLINT_C011";
15
+ readonly glossaryAndCorpus: "GLOSSLINT_C012";
16
+ };
17
+ /** Validates a corpus, merges what it extends, and returns it flat. Throws a `GlosslintConfigError` on a bad term. */
18
+ export declare function defineCorpus(input: CorpusInput): Corpus;
19
+ /** A problem in the corpus or the config, with what to change. */
20
+ export declare class GlosslintConfigError extends Error {
21
+ /** A stable code, such as `GLOSSLINT_C005`. */
22
+ readonly code: string;
23
+ /** Why the config is wrong. */
24
+ readonly why: string;
25
+ /** What to change. */
26
+ readonly fix: string;
27
+ /** The term the problem is in, when it is in one. */
28
+ readonly term?: string;
29
+ constructor(options: {
30
+ code: string;
31
+ why: string;
32
+ fix: string;
33
+ term?: string;
34
+ });
35
+ }
36
+ /** Options for `formatFinding` and `formatFindings`. */
37
+ interface FormatOptions {
38
+ /** Print ANSI colors. Off by default. */
39
+ color?: boolean;
40
+ /** How many files were read, for the summary line. */
41
+ files?: number;
42
+ }
43
+ /** One finding in the nostics tree format: the headline, then why, fix, term and see. */
44
+ export declare function formatFinding(finding: Finding | CliFinding, options?: FormatOptions): string;
45
+ /** Every finding in the tree format, followed by a summary line. */
46
+ export declare function formatFindings(findings: (Finding | CliFinding)[], options?: FormatOptions): string;
47
+ /** The JSON the CLI prints: `{ findings, summary }`. */
48
+ export declare function toJson(findings: CliFinding[], files: number): CliReport;
49
+ /**
50
+ * glosslint's default kind for a string: from its key, attribute or element name, else from a closing
51
+ * stop, else, when `shown` is set, from its length and capitals. Every adapter uses it unless its
52
+ * `kindOf` option decides first.
53
+ */
54
+ export declare function kindOf(site: KindSite): TextKind;
55
+ /** Options for `createMatcher`. */
56
+ interface MatcherOptions {
57
+ /** Report avoid words inside identifiers too. Off by default, since renaming touches every caller. */
58
+ identifierAvoid?: boolean;
59
+ }
60
+ /** Compiles a corpus for matching. Build it once and reuse it. */
61
+ export declare function createMatcher(corpus: Corpus, options?: MatcherOptions): Matcher;
62
+ /** Finds every problem in `text`, read as `kind` (default `unknown`). */
63
+ export declare function check(matcher: Matcher, text: string, kind?: TextKind): Finding[];
64
+ /** Checks every term's examples: each `bad` one must be reported and each `good` one must not. */
65
+ export declare function testCorpus(corpus: Corpus): CorpusTestFailure[];
66
+ /**
67
+ * The corpus as a Markdown glossary, for agents to read, or as JSON. The Markdown gives each term that
68
+ * says more than its spelling a section, and lists the rest on one "Spelling" line.
69
+ */
70
+ export declare function printCorpus(corpus: Corpus, format: "md" | "json"): string;
71
+ /** What the corpus says about a word or phrase: the term it belongs to, its meaning and nuance. */
72
+ export declare function explain(corpus: Corpus, query: string): string;
73
+ /** The corpus as x18n `glossary` entries, with only the fields x18n accepts. */
74
+ export declare function toX18nGlossary(corpus: Corpus): X18nGlossaryEntry[];
75
+ export { type Avoid, type CaseMode, type CaseStyle, type Casing, type CasingKind, type CliFinding, type CliReport, type Corpus, type CorpusInput, type CorpusTestFailure, type Finding, type FindingCode, type Fix, type FixKind, type FormatOptions, type GlossaryProblem, type KindOf, type KindSite, type Link, type Matcher, type MatcherOptions, type Term, type TermSummary, type TextKind, type X18nGlossaryEntry, fromGlossary, readGlossary };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { a as explain, c as testCorpus, d as createMatcher, g as defineCorpus, h as CONFIG_ERRORS, i as readGlossary, l as toX18nGlossary, m as kindOf, r as fromGlossary, s as printCorpus, u as check, y as GlosslintConfigError } from "./glossary-lk7EwGey.mjs";
2
+ import { n as formatFindings, r as toJson, t as formatFinding } from "./format-CQ9xdJYe.mjs";
3
+ export { CONFIG_ERRORS, GlosslintConfigError, check, createMatcher, defineCorpus, explain, formatFinding, formatFindings, fromGlossary, kindOf, printCorpus, readGlossary, testCorpus, toJson, toX18nGlossary };
@@ -0,0 +1,26 @@
1
+ /** `settings.glosslint` in `.oxlintrc.json`. */
2
+ export interface GlosslintOxlintSettings {
3
+ /** The glossary file to read instead of `.agents/glossary.md`, resolved from Oxlint's working folder. */
4
+ glossary?: string;
5
+ /** Callees whose first argument is never checked, added to `t`, `$t`, `te` and `tm`. */
6
+ ignoreCallees?: string[];
7
+ /** Report avoid words in declared names too. */
8
+ identifierAvoid?: boolean;
9
+ }
10
+ interface OxlintRule {
11
+ meta?: object;
12
+ create(context: never): object;
13
+ }
14
+ /** An Oxlint JS plugin, typed without Oxlint or ESLint so neither is needed for the types. */
15
+ export interface GlosslintOxlintPlugin {
16
+ meta: {
17
+ name: "glosslint";
18
+ };
19
+ rules: Record<"term" | "avoid" | "comment" | "identifier", OxlintRule>;
20
+ }
21
+ /**
22
+ * glosslint's rules as an Oxlint JS plugin: `"jsPlugins": ["glosslint/oxlint"]`. The rules read
23
+ * `.agents/glossary.md`, or `settings.glosslint.glossary`, from Oxlint's working folder on the first file.
24
+ */
25
+ declare const plugin: GlosslintOxlintPlugin;
26
+ export { plugin as default };
@@ -0,0 +1,33 @@
1
+ import { n as DEFAULT_IGNORE_CALLEES, t as createRules } from "./rules-D-PrDySk.mjs";
2
+ import { r as fromGlossary } from "./glossary-lk7EwGey.mjs";
3
+ import { resolve } from "node:path";
4
+ // src/oxlint.ts
5
+ const corpora = /* @__PURE__ */ new Map();
6
+ function corpusAt(file) {
7
+ let corpus = corpora.get(file);
8
+ if (!corpus) {
9
+ corpus = fromGlossary(file);
10
+ corpora.set(file, corpus);
11
+ }
12
+ return corpus;
13
+ }
14
+ function bind(context) {
15
+ const { cwd, settings } = context;
16
+ const options = settings.glosslint ?? {};
17
+ return {
18
+ corpus: corpusAt(resolve(cwd, options.glossary ?? ".agents/glossary.md")),
19
+ settings: {
20
+ ignoreCallees: options.ignoreCallees ?? DEFAULT_IGNORE_CALLEES,
21
+ identifierAvoid: options.identifierAvoid ?? false
22
+ }
23
+ };
24
+ }
25
+ /**
26
+ * glosslint's rules as an Oxlint JS plugin: `"jsPlugins": ["glosslint/oxlint"]`. The rules read
27
+ * `.agents/glossary.md`, or `settings.glosslint.glossary`, from Oxlint's working folder on the first file.
28
+ */
29
+ const plugin = {
30
+ meta: { name: "glosslint" },
31
+ rules: createRules(bind)
32
+ };
33
+ export { plugin as default };
@@ -0,0 +1,3 @@
1
+ import { c as Corpus } from "../types-Bbp_cYfZ.mjs";
2
+ declare const corpus: Corpus;
3
+ export { corpus as default };
@@ -0,0 +1 @@
1
+ export { t as default } from "../inclusive-CP6oU8NW.mjs";
@@ -0,0 +1,3 @@
1
+ import { c as Corpus } from "../types-Bbp_cYfZ.mjs";
2
+ declare const corpus: Corpus;
3
+ export { corpus as default };
@@ -0,0 +1 @@
1
+ export { t as default } from "../tech-D0v3ss45.mjs";