|
| 1 | +/* |
| 2 | + * Copy this file as `.vscode/settings.json` to configure VSCode for this workspace. |
| 3 | + * Unfortunately, VSCode doesn't (yet) offer any way to have "workspace defaults" or "user-worspace settings", |
| 4 | + * so offering defaults to copy is the best we can do at the moment. |
| 5 | + * |
| 6 | + * ⚠ Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use. |
| 7 | +*/ |
| 8 | +{ |
| 9 | + // Don't format on save for formatters we don't explicitely control |
| 10 | + "editor.formatOnSave": false, |
| 11 | + "editor.codeActionsOnSave": { |
| 12 | + "source.fixAll": false |
| 13 | + }, |
| 14 | + // Set file associations to support comments syntax highlight |
| 15 | + "files.associations": { |
| 16 | + "settings.default.json": "jsonc", |
| 17 | + "pyrightconfig*.json": "jsonc", |
| 18 | + ".flake8": "properties", |
| 19 | + "stubtest_allowlist*.txt": "properties", |
| 20 | + "**/stubtest_allowlists/*.txt": "properties", |
| 21 | + "pytype_exclude_list.txt": "properties" |
| 22 | + }, |
| 23 | + "files.exclude": { |
| 24 | + "**/.mypy_cache": true |
| 25 | + }, |
| 26 | + "files.insertFinalNewline": true, |
| 27 | + "files.trimFinalNewlines": true, |
| 28 | + "files.trimTrailingWhitespace": true, |
| 29 | + "editor.comments.insertSpace": true, |
| 30 | + "editor.insertSpaces": true, |
| 31 | + "editor.detectIndentation": false, |
| 32 | + "editor.tabSize": 2, |
| 33 | + "[json][jsonc][python]": { |
| 34 | + "editor.tabSize": 4 |
| 35 | + }, |
| 36 | + "[markdown]": { |
| 37 | + "editor.rulers": [ |
| 38 | + 90, |
| 39 | + 130 |
| 40 | + ] |
| 41 | + }, |
| 42 | + "[git-commit]": { |
| 43 | + "editor.rulers": [ |
| 44 | + 72 |
| 45 | + ] |
| 46 | + }, |
| 47 | + "[yaml]": { |
| 48 | + "editor.defaultFormatter": "redhat.vscode-yaml", |
| 49 | + "editor.formatOnSave": true, |
| 50 | + "editor.codeActionsOnSave": { |
| 51 | + "source.fixAll": true |
| 52 | + } |
| 53 | + }, |
| 54 | + "[python]": { |
| 55 | + "editor.defaultFormatter": "ms-python.black-formatter", |
| 56 | + "editor.rulers": [ |
| 57 | + 130 |
| 58 | + ], |
| 59 | + "editor.formatOnSave": true, |
| 60 | + "editor.codeActionsOnSave": { |
| 61 | + "source.fixAll": true, |
| 62 | + "source.fixAll.unusedImports": true, |
| 63 | + "source.fixAll.convertImportFormat": true, |
| 64 | + "source.organizeImports": true |
| 65 | + } |
| 66 | + }, |
| 67 | + "isort.check": true, |
| 68 | + // Using the dedicated black extension |
| 69 | + "black-formatter.importStrategy": "fromEnvironment", |
| 70 | + "python.formatting.provider": "none", |
| 71 | + // Important to follow the config in pyrightconfig.json |
| 72 | + "python.analysis.useLibraryCodeForTypes": false, |
| 73 | + "python.analysis.extraPaths": [ |
| 74 | + "tests" |
| 75 | + ], |
| 76 | + "python.linting.enabled": true, |
| 77 | + "python.linting.mypyEnabled": true, |
| 78 | + "python.linting.mypyArgs": [ |
| 79 | + "--show-column-numbers", |
| 80 | + "--no-pretty", |
| 81 | + "--custom-typeshed-dir=${workspaceFolder}", |
| 82 | + "--python-version=3.7" |
| 83 | + ], |
| 84 | + "isort.importStrategy": "fromEnvironment", |
| 85 | + // Not using bandit |
| 86 | + "python.linting.banditEnabled": false, |
| 87 | + // Using dedicated Flake8 extension |
| 88 | + "python.linting.flake8Enabled": false, |
| 89 | + "python.linting.pycodestyleEnabled": false, |
| 90 | + "python.linting.prospectorEnabled": false, |
| 91 | + "python.linting.pylamaEnabled": false, |
| 92 | + // Use the new dedicated extensions instead (and we're not using pylint) |
| 93 | + "python.linting.pylintEnabled": false |
| 94 | +} |
0 commit comments