-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdevcontainer.json
More file actions
99 lines (94 loc) · 3.61 KB
/
devcontainer.json
File metadata and controls
99 lines (94 loc) · 3.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
"name": "React Three.js Game Template Dev Container",
"image": "mcr.microsoft.com/devcontainers/javascript-node:25-trixie",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "25"
}
},
// MCP Servers: See .github/mcp-config.json for Model Context Protocol configuration
// These enhance GitHub Copilot with filesystem, git, github, and search capabilities
// Update system dependencies
"onCreateCommand": "sudo apt-get update && sudo apt-get install -y graphviz libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb dbus dbus-x11",
// Improve service initialization
"initializeCommand": {
"dbus": "sudo service dbus start"
},
"customizations": {
"vscode": {
"extensions": [
// Core Development
"dbaeumer.vscode-eslint",
// GitHub extensions - Copilot with MCP server support
"GitHub.copilot",
"GitHub.copilot-chat",
"github.vscode-github-actions",
// TypeScript/Node support
"christian-kohler.npm-intellisense",
"ritwickdey.LiveServer",
// Keep minimal formatting support
"esbenp.prettier-vscode"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
// Updated ESLint options with absolute path to configuration file
"eslint.workingDirectories": [
{ "mode": "auto" },
{ "directory": "./src", "changeProcessCWD": true },
{ "directory": "./cypress", "changeProcessCWD": true }
],
"eslint.options": {
"overrideConfigFile": "/workspaces/cia-compliance-manager/.eslintrc.cjs"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.suggest.completeFunctionCalls": true,
// Better import organization
"typescript.preferences.importModuleSpecifier": "shortest",
"javascript.preferences.importModuleSpecifier": "shortest",
// Ensure Copilot prefers TypeScript file extensions
"github.copilot.fileTypes": {
"javascript": "typescript",
"javascriptreact": "typescriptreact"
}
},
// Add VS Code tasks properly in the customizations section
"tasks": {
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "npm",
"script": "build",
"problemMatcher": ["$tsc"],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
}
},
// Update post-create commands to include ESLint installation and build
"postCreateCommand": "chmod +x .devcontainer/init-xvfb.sh && sudo mkdir -p /var/run/dbus && sudo dbus-daemon --system --fork && npm install -g npm@latest eslint && npm install && npx cypress verify",
// Add post-start command to ensure build is run when container starts
"postStartCommand": "npm run build",
"remoteUser": "node",
// Expand environment variables
"containerEnv": {
"CYPRESS_VERIFY_TIMEOUT": "100000",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/dbus/system_bus_socket",
"NODE_OPTIONS": "--max-old-space-size=8192"
},
// Use privileged mode for X11 and Cypress
"runArgs": ["--privileged"],
// Fix: Use proper shutdown action instead of postStopCommand
"shutdownAction": "none"
}