hass.tibber_prices/.devcontainer/devcontainer.json
Julian Pawlowski d81ba5e977 chore(devcontainer): consolidate VS Code settings and remove deprecated options
Migrated all settings from .vscode/settings.json to devcontainer.json
for team-wide consistency. Removed .vscode/settings.json entirely.

Changes:
- Added python.analysis.exclude to prevent Pylance from analyzing
  .venv, .github, docs and other non-code directories (eliminates
  2000+ false errors)
- Added python.analysis.diagnosticMode: workspace for comprehensive
  analysis of integration code
- Added source.organizeImports.ruff for automatic import sorting
- Added markdown.wordWrap and disabled markdown link validation
- Removed deprecated python.linting.* settings (deprecated since 2023)
- Removed editor.formatOnPaste (conflicts with Copilot)
- Changed source.organizeImports to source.organizeImports.ruff
  (Ruff-specific, prevents conflicts with Pylance)
- Changed source.fixAll to source.fixAll.ruff (explicit Ruff action)

Impact: All developers get identical Copilot-friendly environment
without local overrides. No Pylance errors from .venv directories,
no markdown validation warnings, no conflicts between Copilot and
auto-formatting.
2025-11-09 16:01:54 +00:00

119 lines
4.4 KiB
JSON

{
"name": "jpawlowski/hass.tibber_prices",
"image": "mcr.microsoft.com/devcontainers/python:3.13",
"postCreateCommand": "scripts/setup",
"postStartCommand": "scripts/motd",
"containerEnv": {
"PYTHONASYNCIODEBUG": "1"
},
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
"onAutoForward": "notify"
}
},
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"github.copilot",
"github.vscode-pull-request-github",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode-remote.remote-containers",
"redhat.vscode-yaml",
"ryanluker.vscode-coverage-gutters",
"visualstudioexptteam.vscodeintellicode"
],
"settings": {
"editor.tabSize": 4,
"editor.formatOnSave": true,
"editor.formatOnType": false,
"extensions.ignoreRecommendations": false,
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true,
"python.analysis.diagnosticMode": "workspace",
"python.analysis.exclude": [
"**/.venv/**",
"**/venv/**",
"**/__pycache__/**",
"**/.git/**",
"**/.github/**",
"**/docs/**",
"**/node_modules/**"
],
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
"python.analysis.extraPaths": [
"${workspaceFolder}/.venv/lib/python3.13/site-packages"
],
"python.terminal.activateEnvironment": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.testing.pytestArgs": [
"--no-cov"
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.ruff": "explicit",
"source.organizeImports.ruff": "explicit"
}
},
"[markdown]": {
"editor.wordWrap": "on"
},
"yaml.customTags": [
"!secret scalar",
"!include scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_named scalar",
"!include_dir_merge_named scalar",
"!input scalar"
],
"markdown.validate.enabled": false,
"markdown.validate.fileLinks.enabled": "ignore",
"markdown.validate.fragmentLinks.enabled": "ignore",
"json.schemas": [
{
"fileMatch": [
"homeassistant/components/*/manifest.json"
],
"url": "${containerWorkspaceFolder}/scripts/json_schemas/manifest_schema.json"
},
{
"fileMatch": [
"homeassistant/components/*/translations/*.json"
],
"url": "${containerWorkspaceFolder}/scripts/json_schemas/translation_schema.json"
}
]
}
}
},
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "22"
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "latest",
"profile": "minimal"
},
"ghcr.io/devcontainers-extra/features/apt-packages:1": {
"packages": [
"ffmpeg",
"libturbojpeg0",
"libpcap-dev"
]
}
}
}