refactoring devcontainer

This commit is contained in:
Julian Pawlowski 2025-04-23 18:27:46 +00:00
parent 59cd48977b
commit eacc249ad6
4 changed files with 76 additions and 18 deletions

View file

@ -0,0 +1,6 @@
{
"recommendations": [],
"unwantedRecommendations": [
"ms-python.pylint"
]
}

View file

@ -5,7 +5,9 @@
"containerEnv": {
"PYTHONASYNCIODEBUG": "1"
},
"forwardPorts": [8123],
"forwardPorts": [
8123
],
"portsAttributes": {
"8123": {
"label": "Home Assistant",
@ -16,30 +18,42 @@
"vscode": {
"extensions": [
"charliermarsh.ruff",
"github.vscode-pull-request-github",
"ms-python.python",
"ms-python.pylint",
"ms-python.vscode-pylance",
"ryanluker.vscode-coverage-gutters",
"visualstudioexptteam.vscodeintellicode",
"redhat.vscode-yaml",
"EditorConfig.EditorConfig",
"esbenp.prettier-vscode",
"github.copilot",
"ms-vscode-remote.remote-containers"
"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.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": false,
"extensions.ignoreRecommendations": false,
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"python.analysis.typeCheckingMode": "basic",
"python.analysis.autoImportCompletions": true,
"python.defaultInterpreterPath": "/usr/local/bin/python",
"pylint.importStrategy": "fromEnvironment",
"python.linting.enabled": true,
"python.linting.ruffEnabled": true,
"python.terminal.activateEnvInCurrentTerminal": true,
"python.testing.pytestArgs": ["--no-cov"],
"python.testing.pytestArgs": [
"--no-cov"
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.fixAll.ruff": "explicit"
}
},
"yaml.customTags": [
"!input scalar",
"!secret scalar",
@ -48,16 +62,17 @@
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
],
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"json.schemas": [
{
"fileMatch": ["homeassistant/components/*/manifest.json"],
"fileMatch": [
"homeassistant/components/*/manifest.json"
],
"url": "${containerWorkspaceFolder}/scripts/json_schemas/manifest_schema.json"
},
{
"fileMatch": ["homeassistant/components/*/translations/*.json"],
"fileMatch": [
"homeassistant/components/*/translations/*.json"
],
"url": "${containerWorkspaceFolder}/scripts/json_schemas/translation_schema.json"
}
]
@ -68,7 +83,11 @@
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers-extra/features/apt-packages:1": {
"packages": ["ffmpeg", "libturbojpeg0", "libpcap-dev"]
"packages": [
"ffmpeg",
"libturbojpeg0",
"libpcap-dev"
]
}
}
}

17
.editorconfig Normal file
View file

@ -0,0 +1,17 @@
# top-most EditorConfig file
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
[*.py]
# Python style aligns with Black
indent_size = 4
[*.md]
trim_trailing_whitespace = false

16
.prettierignore Normal file
View file

@ -0,0 +1,16 @@
# Ignore Python files handled by Ruff/Black
*.py
*.pyi
# Ignore Home Assistant compiled files
__pycache__/
*.pyc
# Ignore virtual environments or dependencies
.venv/
env/
venv/
# Ignore compiled YAML or generated docs
*.yaml
*.yml