@grunnverk/kilde 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.
Files changed (75) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +31 -0
  3. package/.github/pull_request_template.md +48 -0
  4. package/.github/workflows/deploy-docs.yml +59 -0
  5. package/.github/workflows/npm-publish.yml +48 -0
  6. package/.github/workflows/test.yml +48 -0
  7. package/CHANGELOG.md +92 -0
  8. package/CONTRIBUTING.md +438 -0
  9. package/LICENSE +190 -0
  10. package/PROJECT_SUMMARY.md +318 -0
  11. package/README.md +444 -0
  12. package/RELEASE_CHECKLIST.md +182 -0
  13. package/dist/application.js +166 -0
  14. package/dist/application.js.map +1 -0
  15. package/dist/commands/release.js +326 -0
  16. package/dist/commands/release.js.map +1 -0
  17. package/dist/constants.js +122 -0
  18. package/dist/constants.js.map +1 -0
  19. package/dist/logging.js +176 -0
  20. package/dist/logging.js.map +1 -0
  21. package/dist/main.js +24 -0
  22. package/dist/main.js.map +1 -0
  23. package/dist/mcp-server.js +17467 -0
  24. package/dist/mcp-server.js.map +7 -0
  25. package/dist/utils/config.js +89 -0
  26. package/dist/utils/config.js.map +1 -0
  27. package/docs/AI_GUIDE.md +618 -0
  28. package/eslint.config.mjs +85 -0
  29. package/guide/architecture.md +776 -0
  30. package/guide/commands.md +580 -0
  31. package/guide/configuration.md +779 -0
  32. package/guide/mcp-integration.md +708 -0
  33. package/guide/overview.md +225 -0
  34. package/package.json +91 -0
  35. package/scripts/build-mcp.js +115 -0
  36. package/scripts/test-mcp-compliance.js +254 -0
  37. package/src/application.ts +246 -0
  38. package/src/commands/release.ts +450 -0
  39. package/src/constants.ts +162 -0
  40. package/src/logging.ts +210 -0
  41. package/src/main.ts +25 -0
  42. package/src/mcp/prompts/index.ts +98 -0
  43. package/src/mcp/resources.ts +121 -0
  44. package/src/mcp/server.ts +195 -0
  45. package/src/mcp/tools.ts +219 -0
  46. package/src/types.ts +131 -0
  47. package/src/utils/config.ts +181 -0
  48. package/tests/application.test.ts +114 -0
  49. package/tests/commands/commit.test.ts +248 -0
  50. package/tests/commands/release.test.ts +325 -0
  51. package/tests/constants.test.ts +118 -0
  52. package/tests/logging.test.ts +142 -0
  53. package/tests/mcp/prompts/index.test.ts +202 -0
  54. package/tests/mcp/resources.test.ts +166 -0
  55. package/tests/mcp/tools.test.ts +211 -0
  56. package/tests/utils/config.test.ts +212 -0
  57. package/tsconfig.json +32 -0
  58. package/vite.config.ts +107 -0
  59. package/vitest.config.ts +40 -0
  60. package/website/index.html +14 -0
  61. package/website/src/App.css +142 -0
  62. package/website/src/App.tsx +34 -0
  63. package/website/src/components/Commands.tsx +182 -0
  64. package/website/src/components/Configuration.tsx +214 -0
  65. package/website/src/components/Examples.tsx +234 -0
  66. package/website/src/components/Footer.css +99 -0
  67. package/website/src/components/Footer.tsx +93 -0
  68. package/website/src/components/GettingStarted.tsx +94 -0
  69. package/website/src/components/Hero.css +95 -0
  70. package/website/src/components/Hero.tsx +50 -0
  71. package/website/src/components/Navigation.css +102 -0
  72. package/website/src/components/Navigation.tsx +57 -0
  73. package/website/src/index.css +36 -0
  74. package/website/src/main.tsx +10 -0
  75. package/website/vite.config.ts +12 -0
@@ -0,0 +1,618 @@
1
+ # Kilde AI Integration Guide
2
+
3
+ This guide explains how to integrate Kilde with AI assistants like Claude using the Model Context Protocol (MCP).
4
+
5
+ ## Table of Contents
6
+
7
+ - [Overview](#overview)
8
+ - [Setup](#setup)
9
+ - [Using with Claude Desktop](#using-with-claude-desktop)
10
+ - [Using with Claude Code](#using-with-claude-code)
11
+ - [Available Tools](#available-tools)
12
+ - [Available Resources](#available-resources)
13
+ - [Available Prompts](#available-prompts)
14
+ - [Best Practices](#best-practices)
15
+ - [Examples](#examples)
16
+ - [Troubleshooting](#troubleshooting)
17
+
18
+ ## Overview
19
+
20
+ Kilde implements the Model Context Protocol (MCP), allowing AI assistants to:
21
+
22
+ - Generate and create git commits with AI-powered messages
23
+ - Generate release notes from git history
24
+ - Access repository configuration and status
25
+ - Follow guided workflows for common git tasks
26
+
27
+ The MCP server runs as a separate process and communicates with AI assistants via stdio.
28
+
29
+ ## Setup
30
+
31
+ ### Prerequisites
32
+
33
+ - Node.js 24.0.0 or higher
34
+ - Kilde installed (`npm install -g @grunnverk/kilde`)
35
+ - Git repository
36
+ - OpenAI API key set in environment
37
+
38
+ ### Installation Methods
39
+
40
+ #### Method 1: Global Installation
41
+
42
+ ```bash
43
+ npm install -g @grunnverk/kilde
44
+ ```
45
+
46
+ Then reference `kilde-mcp` in your MCP configuration.
47
+
48
+ #### Method 2: npx
49
+
50
+ Use `npx` to run Kilde without global installation:
51
+
52
+ ```json
53
+ {
54
+ "command": "npx",
55
+ "args": ["-y", "@grunnverk/kilde", "mcp"]
56
+ }
57
+ ```
58
+
59
+ ## Using with Claude Desktop
60
+
61
+ ### Configuration
62
+
63
+ Add Kilde to your Claude Desktop MCP configuration file:
64
+
65
+ **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
66
+
67
+ **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
68
+
69
+ **Linux**: `~/.config/Claude/claude_desktop_config.json`
70
+
71
+ ### Example Configuration
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "kilde": {
77
+ "command": "npx",
78
+ "args": ["-y", "@grunnverk/kilde", "mcp"],
79
+ "env": {
80
+ "OPENAI_API_KEY": "sk-..."
81
+ }
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ Or with global installation:
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "kilde": {
93
+ "command": "kilde-mcp",
94
+ "env": {
95
+ "OPENAI_API_KEY": "sk-..."
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ```
101
+
102
+ ### Restart Claude Desktop
103
+
104
+ After updating the configuration, restart Claude Desktop for changes to take effect.
105
+
106
+ ## Using with Claude Code
107
+
108
+ ### Configuration
109
+
110
+ Add Kilde to your Claude Code MCP settings:
111
+
112
+ **File**: `~/.config/claude-code/settings.json`
113
+
114
+ ```json
115
+ {
116
+ "mcp": {
117
+ "servers": {
118
+ "kilde": {
119
+ "command": "npx",
120
+ "args": ["-y", "@grunnverk/kilde", "mcp"]
121
+ }
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ ### Usage in Claude Code
128
+
129
+ Once configured, Claude Code can automatically use Kilde tools when working with git repositories:
130
+
131
+ ```
132
+ User: "Create a commit with the changes I've staged"
133
+ Claude: [Uses kilde_commit tool to generate and create commit]
134
+
135
+ User: "Generate release notes for v2.0.0"
136
+ Claude: [Uses kilde_release tool to create release notes]
137
+ ```
138
+
139
+ ## Available Tools
140
+
141
+ ### `kilde_commit`
142
+
143
+ Generate AI-powered commit messages and create commits.
144
+
145
+ **Parameters:**
146
+
147
+ | Parameter | Type | Required | Description |
148
+ |-----------|------|----------|-------------|
149
+ | `add` | boolean | No | Stage all changes before committing |
150
+ | `cached` | boolean | No | Only use staged changes |
151
+ | `sendit` | boolean | No | Automatically commit with generated message |
152
+ | `interactive` | boolean | No | Interactive mode for reviewing message |
153
+ | `amend` | boolean | No | Amend the previous commit |
154
+ | `context` | string | No | Additional context for commit message |
155
+ | `contextFiles` | array | No | Context files to include |
156
+ | `dryRun` | boolean | No | Preview without making changes |
157
+ | `verbose` | boolean | No | Enable verbose logging |
158
+ | `debug` | boolean | No | Enable debug logging |
159
+
160
+ **Example Usage:**
161
+
162
+ ```javascript
163
+ // Preview commit message
164
+ {
165
+ "add": true,
166
+ "dryRun": true
167
+ }
168
+
169
+ // Create commit with context
170
+ {
171
+ "add": true,
172
+ "sendit": true,
173
+ "context": "Fixes authentication bug reported in issue #123"
174
+ }
175
+
176
+ // Interactive commit
177
+ {
178
+ "cached": true,
179
+ "interactive": true
180
+ }
181
+ ```
182
+
183
+ **Response Format:**
184
+
185
+ ```json
186
+ {
187
+ "content": [
188
+ {
189
+ "type": "text",
190
+ "text": "✓ Commit created: abc1234 - feat: add user authentication\n\nCommit message:\nfeat: add user authentication\n\nImplements secure login flow with JWT tokens..."
191
+ }
192
+ ]
193
+ }
194
+ ```
195
+
196
+ ### `kilde_release`
197
+
198
+ Generate release notes from git commit history.
199
+
200
+ **Parameters:**
201
+
202
+ | Parameter | Type | Required | Description |
203
+ |-----------|------|----------|-------------|
204
+ | `fromTag` | string | No | Start tag for release notes |
205
+ | `toTag` | string | No | End tag (default: HEAD) |
206
+ | `version` | string | No | Version number for release |
207
+ | `output` | string | No | Output file path |
208
+ | `interactive` | boolean | No | Interactive mode |
209
+ | `focus` | string | No | Focus area (e.g., "breaking changes") |
210
+ | `context` | string | No | Additional context |
211
+ | `contextFiles` | array | No | Context files to include |
212
+ | `dryRun` | boolean | No | Preview without saving |
213
+ | `verbose` | boolean | No | Enable verbose logging |
214
+ | `debug` | boolean | No | Enable debug logging |
215
+
216
+ **Example Usage:**
217
+
218
+ ```javascript
219
+ // Generate release notes for version
220
+ {
221
+ "version": "v2.0.0",
222
+ "fromTag": "v1.0.0",
223
+ "output": "RELEASE_NOTES.md"
224
+ }
225
+
226
+ // Focus on breaking changes
227
+ {
228
+ "version": "v2.0.0",
229
+ "focus": "breaking changes and migration guide"
230
+ }
231
+
232
+ // Preview release notes
233
+ {
234
+ "fromTag": "v1.5.0",
235
+ "toTag": "HEAD",
236
+ "dryRun": true
237
+ }
238
+ ```
239
+
240
+ **Response Format:**
241
+
242
+ ```json
243
+ {
244
+ "content": [
245
+ {
246
+ "type": "text",
247
+ "text": "# Release v2.0.0\n\n## Features\n- Add user authentication\n- Implement caching layer\n\n## Breaking Changes\n- Remove deprecated API endpoints..."
248
+ }
249
+ ]
250
+ }
251
+ ```
252
+
253
+ ## Available Resources
254
+
255
+ Resources provide read-only access to repository information.
256
+
257
+ ### `kilde://config`
258
+
259
+ Current Kilde configuration (merged from defaults, config file, and CLI args).
260
+
261
+ **MIME Type**: `application/json`
262
+
263
+ **Example Response:**
264
+
265
+ ```json
266
+ {
267
+ "verbose": false,
268
+ "debug": false,
269
+ "model": "gpt-4o-mini",
270
+ "commit": {
271
+ "sendit": false,
272
+ "interactive": false
273
+ },
274
+ "release": {
275
+ "interactive": false
276
+ }
277
+ }
278
+ ```
279
+
280
+ ### `kilde://status`
281
+
282
+ Git repository status and branch information.
283
+
284
+ **MIME Type**: `text/plain`
285
+
286
+ **Example Response:**
287
+
288
+ ```
289
+ Current Branch: main
290
+ Last Commit: abc1234 feat: add authentication
291
+
292
+ On branch main
293
+ Your branch is up to date with 'origin/main'.
294
+
295
+ Changes not staged for commit:
296
+ modified: src/auth.ts
297
+ ```
298
+
299
+ ### `kilde://workspace`
300
+
301
+ Workspace information including working directory and git repository status.
302
+
303
+ **MIME Type**: `application/json`
304
+
305
+ **Example Response:**
306
+
307
+ ```json
308
+ {
309
+ "workingDirectory": "/Users/user/project",
310
+ "isGitRepository": true,
311
+ "gitRoot": "/Users/user/project",
312
+ "configExists": true
313
+ }
314
+ ```
315
+
316
+ ## Available Prompts
317
+
318
+ Prompts provide interactive workflows with step-by-step guidance.
319
+
320
+ ### `commit-workflow`
321
+
322
+ Interactive workflow for creating commits with AI-generated messages.
323
+
324
+ **Arguments:**
325
+ - `context` (optional): Additional context for the commit
326
+
327
+ **Workflow Steps:**
328
+ 1. Preview commit message with `kilde_commit` (dryRun=true)
329
+ 2. Review the generated message
330
+ 3. If approved, create commit with `kilde_commit` (sendit=true)
331
+ 4. If adjustments needed, provide feedback and regenerate
332
+
333
+ **Example Usage:**
334
+
335
+ ```
336
+ User: Use the commit-workflow prompt with context "Bug fix for login"
337
+ Claude: [Initiates commit workflow with guided steps]
338
+ ```
339
+
340
+ ### `release-workflow`
341
+
342
+ Interactive workflow for generating release notes.
343
+
344
+ **Arguments:**
345
+ - `version` (optional): Version number for the release
346
+ - `fromTag` (optional): Starting tag for release notes
347
+
348
+ **Workflow Steps:**
349
+ 1. Preview release notes with `kilde_release` (dryRun=true)
350
+ 2. Review the generated notes
351
+ 3. If approved, save with `kilde_release` (output specified)
352
+ 4. If adjustments needed, use `focus` parameter to guide generation
353
+
354
+ **Example Usage:**
355
+
356
+ ```
357
+ User: Use the release-workflow prompt for version v2.0.0
358
+ Claude: [Initiates release workflow with guided steps]
359
+ ```
360
+
361
+ ## Best Practices
362
+
363
+ ### Commit Messages
364
+
365
+ 1. **Add Context**: Use the `context` parameter to provide background
366
+ ```javascript
367
+ {
368
+ "add": true,
369
+ "sendit": true,
370
+ "context": "Implements feature from sprint planning meeting"
371
+ }
372
+ ```
373
+
374
+ 2. **Review First**: Use `dryRun` to preview before committing
375
+ ```javascript
376
+ {
377
+ "add": true,
378
+ "dryRun": true
379
+ }
380
+ ```
381
+
382
+ 3. **Include Relevant Files**: Use `contextFiles` for additional context
383
+ ```javascript
384
+ {
385
+ "add": true,
386
+ "contextFiles": ["ARCHITECTURE.md", "CHANGELOG.md"]
387
+ }
388
+ ```
389
+
390
+ ### Release Notes
391
+
392
+ 1. **Specify Version**: Always include version number
393
+ ```javascript
394
+ {
395
+ "version": "v2.0.0",
396
+ "output": "RELEASE_NOTES.md"
397
+ }
398
+ ```
399
+
400
+ 2. **Focus on Key Changes**: Use `focus` parameter for specific aspects
401
+ ```javascript
402
+ {
403
+ "version": "v2.0.0",
404
+ "focus": "breaking changes and migration steps"
405
+ }
406
+ ```
407
+
408
+ 3. **Compare Tags**: Specify tag range for accurate notes
409
+ ```javascript
410
+ {
411
+ "fromTag": "v1.5.0",
412
+ "toTag": "v2.0.0"
413
+ }
414
+ ```
415
+
416
+ ### Error Handling
417
+
418
+ Always check tool responses for errors:
419
+
420
+ ```javascript
421
+ if (response.isError) {
422
+ // Handle error
423
+ console.error(response.content[0].text);
424
+ }
425
+ ```
426
+
427
+ ## Examples
428
+
429
+ ### Example 1: Quick Commit
430
+
431
+ **User Request**: "Create a commit with my staged changes"
432
+
433
+ **Claude Response**:
434
+ ```
435
+ I'll create a commit with your staged changes.
436
+ [Calls kilde_commit with {"cached": true, "sendit": true}]
437
+
438
+ ✓ Commit created successfully
439
+ Message: "feat: add user profile page
440
+
441
+ Implements new user profile view with avatar upload
442
+ and bio editing functionality."
443
+ ```
444
+
445
+ ### Example 2: Release Notes for Specific Version
446
+
447
+ **User Request**: "Generate release notes for v2.0.0 from v1.0.0"
448
+
449
+ **Claude Response**:
450
+ ```
451
+ I'll generate release notes for version 2.0.0.
452
+ [Calls kilde_release with {
453
+ "version": "v2.0.0",
454
+ "fromTag": "v1.0.0",
455
+ "output": "RELEASE_NOTES.md"
456
+ }]
457
+
458
+ ✓ Release notes generated and saved to RELEASE_NOTES.md
459
+
460
+ # Release v2.0.0
461
+
462
+ ## Breaking Changes
463
+ - Removed deprecated /api/v1 endpoints
464
+ - Changed authentication token format
465
+
466
+ ## Features
467
+ - New user dashboard
468
+ - Real-time notifications
469
+ ...
470
+ ```
471
+
472
+ ### Example 3: Interactive Commit with Context
473
+
474
+ **User Request**: "Create a commit for the authentication refactoring"
475
+
476
+ **Claude Response**:
477
+ ```
478
+ I'll create a commit with context about the authentication refactoring.
479
+ Let me first preview the commit message.
480
+
481
+ [Calls kilde_commit with {
482
+ "add": true,
483
+ "dryRun": true,
484
+ "context": "Refactoring authentication module for better security"
485
+ }]
486
+
487
+ Here's the proposed commit message:
488
+ "refactor: improve authentication security
489
+
490
+ - Switch to bcrypt for password hashing
491
+ - Add rate limiting to login endpoint
492
+ - Implement JWT token rotation"
493
+
494
+ Should I create this commit? [Then calls with sendit=true if approved]
495
+ ```
496
+
497
+ ### Example 4: Focus on Breaking Changes
498
+
499
+ **User Request**: "Generate release notes focusing on breaking changes"
500
+
501
+ **Claude Response**:
502
+ ```
503
+ I'll generate release notes with a focus on breaking changes.
504
+
505
+ [Calls kilde_release with {
506
+ "version": "v2.0.0",
507
+ "focus": "breaking changes with migration guide",
508
+ "output": "RELEASE_NOTES.md"
509
+ }]
510
+
511
+ ✓ Release notes generated with emphasis on breaking changes
512
+
513
+ # Release v2.0.0
514
+
515
+ ## Breaking Changes
516
+
517
+ ### API Endpoint Changes
518
+ - REMOVED: `/api/v1/users` - Use `/api/v2/users` instead
519
+ - CHANGED: Authentication header format...
520
+
521
+ ## Migration Guide
522
+ 1. Update API endpoint URLs...
523
+ ```
524
+
525
+ ## Troubleshooting
526
+
527
+ ### "MCP server not responding"
528
+
529
+ 1. Check that Kilde is installed:
530
+ ```bash
531
+ npm list -g @grunnverk/kilde
532
+ ```
533
+
534
+ 2. Verify MCP configuration path
535
+ 3. Check Claude logs for error messages
536
+ 4. Restart Claude Desktop
537
+
538
+ ### "OPENAI_API_KEY not set"
539
+
540
+ Ensure your MCP configuration includes the API key:
541
+
542
+ ```json
543
+ {
544
+ "mcpServers": {
545
+ "kilde": {
546
+ "command": "kilde-mcp",
547
+ "env": {
548
+ "OPENAI_API_KEY": "sk-your-key-here"
549
+ }
550
+ }
551
+ }
552
+ }
553
+ ```
554
+
555
+ ### "Not a git repository"
556
+
557
+ Kilde requires being run in a git repository. Ensure Claude is working in the correct directory:
558
+
559
+ ```
560
+ User: "Change to my project directory first"
561
+ Claude: [Changes directory, then uses Kilde tools]
562
+ ```
563
+
564
+ ### "Tool execution failed"
565
+
566
+ Enable debug mode to see detailed logs:
567
+
568
+ ```javascript
569
+ {
570
+ "add": true,
571
+ "debug": true,
572
+ "verbose": true
573
+ }
574
+ ```
575
+
576
+ Check debug logs at `output/kilde/debug/*.log`
577
+
578
+ ## Advanced Usage
579
+
580
+ ### Custom Workflows
581
+
582
+ You can create custom workflows by chaining multiple tool calls:
583
+
584
+ 1. Check repository status (`kilde://status`)
585
+ 2. Preview commit (`kilde_commit` with `dryRun`)
586
+ 3. Create commit (`kilde_commit` with `sendit`)
587
+ 4. Generate release notes (`kilde_release`)
588
+
589
+ ### Integration with Other Tools
590
+
591
+ Kilde MCP tools can be combined with other MCP servers:
592
+
593
+ ```json
594
+ {
595
+ "mcpServers": {
596
+ "kilde": {
597
+ "command": "kilde-mcp"
598
+ },
599
+ "github": {
600
+ "command": "mcp-server-github"
601
+ }
602
+ }
603
+ }
604
+ ```
605
+
606
+ Then chain operations:
607
+ 1. Use Kilde to create commit
608
+ 2. Use GitHub MCP to create pull request
609
+
610
+ ## Support
611
+
612
+ - [GitHub Issues](https://github.com/grunnverk/kilde/issues)
613
+ - [Documentation](https://github.com/grunnverk/kilde)
614
+ - [MCP Specification](https://modelcontextprotocol.io/)
615
+
616
+ ---
617
+
618
+ **Last Updated**: 2026-01-21
@@ -0,0 +1,85 @@
1
+ import { defineConfig, globalIgnores } from "eslint/config";
2
+ import typescriptEslint from "@typescript-eslint/eslint-plugin";
3
+ import importPlugin from "eslint-plugin-import";
4
+ import globals from "globals";
5
+ import tsParser from "@typescript-eslint/parser";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+ import js from "@eslint/js";
9
+ import { FlatCompat } from "@eslint/eslintrc";
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+ const compat = new FlatCompat({
14
+ baseDirectory: __dirname,
15
+ recommendedConfig: js.configs.recommended,
16
+ allConfig: js.configs.all
17
+ });
18
+
19
+ export default defineConfig([
20
+ globalIgnores([
21
+ "dist/**",
22
+ "docs/**",
23
+ "node_modules/**",
24
+ "**/*.test.ts",
25
+ "temp-dist/**",
26
+ "scripts/**",
27
+ ]),
28
+ {
29
+ extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
30
+
31
+ plugins: {
32
+ "@typescript-eslint": typescriptEslint,
33
+ "import": importPlugin,
34
+ },
35
+
36
+ languageOptions: {
37
+ globals: {
38
+ ...globals.node,
39
+ },
40
+
41
+ parser: tsParser,
42
+ ecmaVersion: "latest",
43
+ sourceType: "module",
44
+ },
45
+
46
+ rules: {
47
+ "@typescript-eslint/no-explicit-any": "off",
48
+ "@typescript-eslint/explicit-function-return-type": "off",
49
+
50
+ "@typescript-eslint/no-unused-vars": ["warn", {
51
+ argsIgnorePattern: "^_",
52
+ }],
53
+
54
+ indent: ["warn", 4, {
55
+ SwitchCase: 1,
56
+ }],
57
+
58
+ "import/extensions": ["error", "never", {
59
+ ignorePackages: true,
60
+ pattern: {
61
+ "js": "never",
62
+ "ts": "never",
63
+ "d": "always"
64
+ }
65
+ }],
66
+
67
+ "import/no-extraneous-dependencies": ["error", {
68
+ devDependencies: true,
69
+ optionalDependencies: false,
70
+ peerDependencies: false,
71
+ }],
72
+
73
+ "no-console": ["error"],
74
+
75
+ "no-restricted-imports": ["error", {
76
+ paths: ["dayjs", "fs"],
77
+ patterns: [
78
+ {
79
+ group: ["src/**"],
80
+ message: "Use absolute imports instead of relative imports"
81
+ }
82
+ ]
83
+ }]
84
+ },
85
+ }]);