Skip to content

Commit 4dbf3b9

Browse files
committed
fix: Add ESLint config and fix linting errors
- Add .eslintrc.js with TypeScript rules - Fix unused variable errors in NodeQuery.ts - Remove unused imports from TraversalQuery.ts - All tests passing (294 tests) - Linter now passes with only warnings (29 warnings, 0 errors)
1 parent 03b9550 commit 4dbf3b9

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
],
7+
parserOptions: {
8+
ecmaVersion: 2020,
9+
sourceType: 'module',
10+
},
11+
rules: {
12+
'@typescript-eslint/no-explicit-any': 'warn',
13+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
14+
},
15+
};

src/query/NodeQuery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ export class NodeQuery {
379379
// Add WHERE conditions
380380
const conditions: string[] = [`n.type = ?`];
381381

382-
for (const [key, _value] of this.whereConditions) {
382+
for (const [key] of this.whereConditions) {
383383
conditions.push(`json_extract(n.properties, '$.${key}') = ?`);
384384
}
385385

@@ -424,7 +424,7 @@ export class NodeQuery {
424424
params.push(this.nodeType);
425425

426426
// Add WHERE condition values
427-
for (const [_key, value] of this.whereConditions) {
427+
for (const [, value] of this.whereConditions) {
428428
params.push(value);
429429
}
430430

src/query/TraversalQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Database from 'better-sqlite3';
2-
import { Node, NodeData, TraversalDirection, TraversalStep } from '../types';
2+
import { Node, TraversalStep } from '../types';
33
import { deserialize, timestampToDate } from '../utils/serialization';
44

55
/**

0 commit comments

Comments
 (0)