Skip to content

Commit 05cdaa0

Browse files
committed
Fix lint
1 parent 6d7900f commit 05cdaa0

File tree

8 files changed

+41
-9
lines changed

8 files changed

+41
-9
lines changed

packages/cli/.eslintrc.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,22 @@
1111
},
1212
"env": {
1313
"node": true,
14-
"es6": true
14+
"es6": true,
15+
"jest": true
1516
},
1617
"rules": {
1718
"@typescript-eslint/no-explicit-any": "warn",
18-
"@typescript-eslint/explicit-function-return-type": "off"
19-
}
19+
"@typescript-eslint/explicit-function-return-type": "off",
20+
"@typescript-eslint/no-var-requires": "error"
21+
},
22+
"overrides": [
23+
{
24+
"files": ["**/__tests__/**/*.ts", "**/*.test.ts", "**/*.spec.ts"],
25+
"rules": {
26+
"@typescript-eslint/no-explicit-any": "off",
27+
"@typescript-eslint/no-var-requires": "off"
28+
}
29+
}
30+
]
2031
}
2132

packages/cli/src/__tests__/lib/Config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('ConfigManager', () => {
3131
});
3232

3333
it('should use current directory as default', () => {
34-
const defaultConfig = new ConfigManager();
34+
new ConfigManager();
3535
expect(mockPath.join).toHaveBeenCalledWith(process.cwd(), '.ai-devkit.json');
3636
});
3737
});

packages/cli/src/__tests__/lib/PhaseSelector.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { PhaseSelector } from '../../lib/PhaseSelector';
2-
import { AVAILABLE_PHASES, PHASE_DISPLAY_NAMES } from '../../types';
2+
import { AVAILABLE_PHASES } from '../../types';
33

44
jest.mock('inquirer');
55

packages/cli/src/commands/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ConfigManager } from '../lib/Config';
55
import { TemplateManager } from '../lib/TemplateManager';
66
import { EnvironmentSelector } from '../lib/EnvironmentSelector';
77
import { PhaseSelector } from '../lib/PhaseSelector';
8-
import { EnvironmentCode, Phase, AVAILABLE_PHASES, PHASE_DISPLAY_NAMES } from '../types';
8+
import { EnvironmentCode, PHASE_DISPLAY_NAMES } from '../types';
99
import { isValidEnvironmentCode } from '../util/env.js';
1010

1111
function isGitAvailable(): boolean {
@@ -151,7 +151,7 @@ export async function initCommand(options: InitOptions) {
151151
}
152152

153153
if (shouldCopy) {
154-
const file = await templateManager.copyPhaseTemplate(phase);
154+
await templateManager.copyPhaseTemplate(phase);
155155
await configManager.addPhase(phase);
156156
console.log(chalk.green(`[OK] Created ${phase} phase`));
157157
} else {

packages/cli/src/lib/EnvironmentSelector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import inquirer from 'inquirer';
22
import { EnvironmentCode } from '../types';
3-
import { getAllEnvironments, getEnvironmentsByCodes, getEnvironmentDisplayName, getGlobalCapableEnvironments } from '../util/env';
3+
import { getAllEnvironments, getEnvironmentDisplayName, getGlobalCapableEnvironments } from '../util/env';
44

55
export class EnvironmentSelector {
66
async selectEnvironments(): Promise<EnvironmentCode[]> {

packages/memory/.eslintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended"
6+
],
7+
"plugins": ["@typescript-eslint"],
8+
"parserOptions": {
9+
"ecmaVersion": 2020,
10+
"sourceType": "module"
11+
},
12+
"env": {
13+
"node": true,
14+
"es6": true
15+
},
16+
"rules": {
17+
"@typescript-eslint/no-explicit-any": "warn",
18+
"@typescript-eslint/explicit-function-return-type": "off"
19+
}
20+
}

packages/memory/src/database/connection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export function getDatabase(options?: DatabaseOptions): DatabaseConnection {
8585
// Auto-run migrations on first access
8686
if (!schemaInitialized) {
8787
// Lazy import to avoid circular dependency
88+
// eslint-disable-next-line @typescript-eslint/no-var-requires
8889
const { initializeSchema } = require('./schema');
8990
initializeSchema(instance);
9091
schemaInitialized = true;

packages/memory/src/services/search.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function escapeFtsSpecialChars(text: string): string {
1010
// FTS5 special characters: " * ^ - : OR AND NOT ( )
1111
return text
1212
.replace(/"/g, '""') // Escape quotes by doubling
13-
.replace(/[*^():\-]/g, ' ') // Replace operators with space (including hyphen)
13+
.replace(/[*^():-]/g, ' ') // Replace operators with space (including hyphen)
1414
.replace(/\b(AND|OR|NOT)\b/gi, '') // Remove boolean operators
1515
.trim()
1616
.replace(/\s+/g, ' '); // Collapse multiple spaces

0 commit comments

Comments
 (0)