mirror of
https://github.com/esphome/esphome.git
synced 2024-11-09 16:57:47 +01:00
Enable devcontainer linters (#7019)
This commit is contained in:
parent
e9cf3623d1
commit
6294c3b913
1 changed files with 21 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "ESPHome Dev",
|
"name": "ESPHome Dev",
|
||||||
"image": "ghcr.io/esphome/esphome-lint:dev",
|
"image": "ghcr.io/esphome/esphome-lint:dev",
|
||||||
"postCreateCommand": ["script/devcontainer-post-create"],
|
"postCreateCommand": [
|
||||||
|
"script/devcontainer-post-create"
|
||||||
|
],
|
||||||
"containerEnv": {
|
"containerEnv": {
|
||||||
"DEVCONTAINER": "1",
|
"DEVCONTAINER": "1",
|
||||||
"PIP_BREAK_SYSTEM_PACKAGES": "1",
|
"PIP_BREAK_SYSTEM_PACKAGES": "1",
|
||||||
|
@ -27,6 +29,9 @@
|
||||||
"extensions": [
|
"extensions": [
|
||||||
// python
|
// python
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
|
"ms-python.pylint",
|
||||||
|
"ms-python.flake8",
|
||||||
|
"ms-python.black-formatter",
|
||||||
"visualstudioexptteam.vscodeintellicode",
|
"visualstudioexptteam.vscodeintellicode",
|
||||||
// yaml
|
// yaml
|
||||||
"redhat.vscode-yaml",
|
"redhat.vscode-yaml",
|
||||||
|
@ -38,9 +43,21 @@
|
||||||
"settings": {
|
"settings": {
|
||||||
"python.languageServer": "Pylance",
|
"python.languageServer": "Pylance",
|
||||||
"python.pythonPath": "/usr/bin/python3",
|
"python.pythonPath": "/usr/bin/python3",
|
||||||
"python.linting.pylintEnabled": true,
|
"pylint.args": [
|
||||||
"python.linting.enabled": true,
|
"--rcfile=${workspaceFolder}/pyproject.toml"
|
||||||
"python.formatting.provider": "black",
|
],
|
||||||
|
"flake8.args": [
|
||||||
|
"--config=${workspaceFolder}/.flake8"
|
||||||
|
],
|
||||||
|
"black-formatter.args": [
|
||||||
|
"--config",
|
||||||
|
"${workspaceFolder}/pyproject.toml"
|
||||||
|
],
|
||||||
|
"[python]": {
|
||||||
|
// VS will say "Value is not accepted" before building the devcontainer, but the warning
|
||||||
|
// should go away after build is completed.
|
||||||
|
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||||
|
},
|
||||||
"editor.formatOnPaste": false,
|
"editor.formatOnPaste": false,
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.formatOnType": true,
|
"editor.formatOnType": true,
|
||||||
|
|
Loading…
Reference in a new issue