Skip to content

Commit f993752

Browse files
prosdevclaude
andcommitted
chore: clean up Biome lint — ignore dist, suppress safe non-null assertions
Exclude dist/ from Biome scanning. Add noNonNullAssertion overrides for files with safe Map.get()! patterns (graph.ts, refs-adapter.ts, etc). Fix unused imports in map/index.ts and cli/commands/map.ts. Change test edge weight from 1.414 to 1.5 to avoid noApproximativeNumericConstant. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fee8bdf commit f993752

4 files changed

Lines changed: 24 additions & 4 deletions

File tree

biome.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
3+
"files": {
4+
"includes": ["**", "!**/dist"]
5+
},
36
"assist": { "actions": { "source": { "organizeImports": "on" } } },
47
"linter": {
58
"enabled": true,
@@ -23,6 +26,25 @@
2326
"rules": {
2427
"suspicious": {
2528
"noExplicitAny": "off"
29+
},
30+
"style": {
31+
"noNonNullAssertion": "off"
32+
}
33+
}
34+
}
35+
},
36+
{
37+
"includes": [
38+
"**/map/graph.ts",
39+
"**/refs-adapter.ts",
40+
"**/change-frequency.ts",
41+
"**/pattern-analysis-service.ts",
42+
"**/vector/index.ts"
43+
],
44+
"linter": {
45+
"rules": {
46+
"style": {
47+
"noNonNullAssertion": "off"
2648
}
2749
}
2850
}

packages/cli/src/commands/map.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { Command } from 'commander';
2020
import ora from 'ora';
2121
import { loadConfig } from '../utils/config.js';
2222
import { logger } from '../utils/logger.js';
23-
import { output } from '../utils/output.js';
2423

2524
export const mapCommand = new Command('map')
2625
.description('Show codebase structure with component counts')

packages/core/src/map/__tests__/graph.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ describe('shortestPath', () => {
345345
describe('serializeGraph / deserializeGraph', () => {
346346
it('should round-trip correctly', () => {
347347
const graph = new Map<string, WeightedEdge[]>();
348-
graph.set('src/a.ts', [edge('src/b.ts', 1.414), edge('src/c.ts', 1)]);
348+
graph.set('src/a.ts', [edge('src/b.ts', 1.5), edge('src/c.ts', 1)]);
349349
graph.set('src/b.ts', [edge('src/c.ts', 2)]);
350350

351351
const json = serializeGraph(graph);
@@ -354,7 +354,7 @@ describe('serializeGraph / deserializeGraph', () => {
354354
expect(restored).not.toBeNull();
355355
expect(restored!.size).toBe(2);
356356
expect(restored!.get('src/a.ts')).toEqual([
357-
{ target: 'src/b.ts', weight: 1.414 },
357+
{ target: 'src/b.ts', weight: 1.5 },
358358
{ target: 'src/c.ts', weight: 1 },
359359
]);
360360
expect(restored!.get('src/b.ts')).toEqual([{ target: 'src/c.ts', weight: 2 }]);

packages/core/src/map/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import * as path from 'node:path';
77
import type { Logger } from '@prosdevlab/kero';
88
import type { RepositoryIndexer } from '../indexer';
99
import { stripFocusPrefix } from '../indexer/utils/change-frequency.js';
10-
import { getFileIcon } from '../utils/icons';
1110
import type { SearchResult } from '../vector/types';
1211
import type { LocalGitExtractor } from './git-extractor';
1312
import { connectedComponents, loadOrBuildGraph, pageRank } from './graph';

0 commit comments

Comments
 (0)