Skip to content

Commit b774208

Browse files
committed
chore: clear pre-existing lint errors
- caveman.ts: drop unused ARTICLES constant (dropArticles has always used a hardcoded regex) and simplify the dropArticles replacement callback to a literal empty-string replacement. The callback never branched on its match/offset parameters, so the simpler form is equivalent and removes two biome noUnusedFunctionParameters hints. - event-resolvers.test.ts: remove the biome-ignore comment for lint/performance/noDelete that no longer suppresses anything. The rule stopped firing on that site and biome promoted the stale suppression to an error.
1 parent 34d4c65 commit b774208

2 files changed

Lines changed: 1 addition & 7 deletions

File tree

packages/plugin/src/hooks/magic-context/caveman.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ const HEDGING_PHRASES = [
121121

122122
const PLEASANTRIES = ["please", "thanks", "thank you", "kindly", "if possible"];
123123

124-
const ARTICLES = ["the", "a", "an"];
125-
126124
/** Auxiliary verbs we drop when they appear in non-essential positions.
127125
* We only drop them between a subject noun and a participle/verb, where
128126
* dropping changes tense but preserves meaning enough for a terse summary. */
@@ -222,10 +220,7 @@ function dropPhrases(text: string, phrases: string[]): string {
222220
function dropArticles(text: string): string {
223221
// Match " the ", " a ", " an " (with leading space) and replace with single space.
224222
// Also match at start of line: "The X" → "X".
225-
let working = text.replace(/\b(?:the|a|an)\b\s+/gi, (match, _offset, full) => {
226-
// Keep if at end of sentence fragment (before a period or line end) — rare.
227-
return "";
228-
});
223+
let working = text.replace(/\b(?:the|a|an)\b\s+/gi, "");
229224
// Collapse resulting multiple spaces.
230225
working = working.replace(/ +/g, " ");
231226
return working;

packages/plugin/src/hooks/magic-context/event-resolvers.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ describe("event-resolvers", () => {
160160
[key: string]: number;
161161
};
162162
// Simulate missing default by deleting
163-
// biome-ignore lint/performance/noDelete: test setup requires actual missing key
164163
delete (config as Record<string, unknown>).default;
165164

166165
//#when

0 commit comments

Comments
 (0)