|
5 | 5 | *
|
6 | 6 | * ⚠ Disclaimer: The typeshed team doesn't commit to maintaining this file. It exists purely for your ease of use.
|
7 | 7 | */
|
| 8 | +// TODO: Add charliermarsh.ruff to unrecommended extensions |
8 | 9 | {
|
9 | 10 | // Don't format on save for formatters we don't explicitely control
|
10 | 11 | "editor.formatOnSave": false,
|
|
33 | 34 | "[json][jsonc][python]": {
|
34 | 35 | "editor.tabSize": 4
|
35 | 36 | },
|
36 |
| - "[markdown]": { |
37 |
| - "editor.rulers": [ |
38 |
| - 90, |
39 |
| - 130 |
40 |
| - ] |
41 |
| - }, |
| 37 | + "editor.rulers": [ |
| 38 | + 90, |
| 39 | + 130 |
| 40 | + ], |
42 | 41 | "[git-commit]": {
|
43 | 42 | "editor.rulers": [
|
44 | 43 | 72
|
45 | 44 | ]
|
46 | 45 | },
|
47 |
| - "[yaml]": { |
48 |
| - "editor.defaultFormatter": "redhat.vscode-yaml", |
| 46 | + // Format on save for formatters we explicitely control |
| 47 | + "[json][jsonc][yaml][python][toml]": { |
49 | 48 | "editor.formatOnSave": true,
|
50 | 49 | "editor.codeActionsOnSave": {
|
51 |
| - "source.fixAll": true |
| 50 | + "source.fixAll": true, |
| 51 | + "source.organizeImports": true |
52 | 52 | }
|
53 | 53 | },
|
| 54 | + "[json][jsonc]": { |
| 55 | + "editor.defaultFormatter": "vscode.json-language-features" |
| 56 | + }, |
| 57 | + "[yaml]": { |
| 58 | + "editor.defaultFormatter": "redhat.vscode-yaml" |
| 59 | + }, |
| 60 | + "[toml]": { |
| 61 | + "editor.rulers": [ |
| 62 | + 90 |
| 63 | + ], |
| 64 | + "editor.defaultFormatter": "tamasfe.even-better-toml" |
| 65 | + }, |
54 | 66 | "[python]": {
|
55 |
| - "editor.defaultFormatter": "ms-python.black-formatter", |
56 | 67 | "editor.rulers": [
|
57 | 68 | 130
|
58 | 69 | ],
|
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 |
| - } |
| 70 | + "editor.defaultFormatter": "ms-python.black-formatter" |
66 | 71 | },
|
67 |
| - "isort.check": true, |
68 |
| - // Using the dedicated black extension |
69 |
| - "black-formatter.importStrategy": "fromEnvironment", |
| 72 | + // Use the new dedicated extensions instead |
70 | 73 | "python.formatting.provider": "none",
|
71 |
| - // Important to follow the config in pyrightconfig.json |
| 74 | + "python.linting.enabled": false, |
| 75 | + "python.linting.mypyEnabled": false, |
| 76 | + "python.linting.flake8Enabled": false, |
| 77 | + "python.linting.pycodestyleEnabled": false, |
| 78 | + "python.linting.prospectorEnabled": false, |
| 79 | + "python.linting.pylamaEnabled": false, |
| 80 | + "python.linting.pylintEnabled": false, |
| 81 | + // Not using bandit |
| 82 | + "python.linting.banditEnabled": false, |
| 83 | + // python.analysis is Pylance (pyright) configurations |
| 84 | + "python.analysis.fixAll": [ |
| 85 | + "source.unusedImports" |
| 86 | + // Explicitly omiting "source.convertImportFormat", some stubs use relative imports |
| 87 | + ], |
| 88 | + // Important to use `types-*` and flag untyped dependencies. |
72 | 89 | "python.analysis.useLibraryCodeForTypes": false,
|
| 90 | + "python.analysis.typeshedPaths": [ |
| 91 | + "${workspaceFolder}" |
| 92 | + ], |
73 | 93 | "python.analysis.extraPaths": [
|
74 | 94 | "tests"
|
75 | 95 | ],
|
76 |
| - "python.linting.enabled": true, |
77 |
| - "python.linting.mypyEnabled": true, |
78 |
| - "python.linting.mypyArgs": [ |
79 |
| - "--show-column-numbers", |
80 |
| - "--no-pretty", |
| 96 | + "mypy-type-checker.importStrategy": "fromEnvironment", |
| 97 | + "mypy-type-checker.args": [ |
81 | 98 | "--custom-typeshed-dir=${workspaceFolder}",
|
82 |
| - "--python-version=3.7" |
| 99 | + "--python-version=3.7", |
| 100 | + "--strict" |
| 101 | + // Needed because a library stubbed in typeshed won't necessarily be installed inthe dev's environment |
| 102 | + // Currentyl broken in dmypy: https://github.com/python/mypy/issues/10709 |
| 103 | + // "--ignore-missing-imports" |
83 | 104 | ],
|
| 105 | + // Ensure typeshed's configs are used, and not user's VSCode settings |
| 106 | + "flake8.args": [ |
| 107 | + "--config=.flake8" |
| 108 | + ], |
| 109 | + "flake8.importStrategy": "fromEnvironment", |
| 110 | + "isort.check": true, |
84 | 111 | "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 |
| 112 | + "black-formatter.importStrategy": "fromEnvironment", |
| 113 | + "evenBetterToml.formatter.alignComments": false, |
| 114 | + "evenBetterToml.formatter.alignEntries": false, |
| 115 | + "evenBetterToml.formatter.allowedBlankLines": 1, |
| 116 | + "evenBetterToml.formatter.arrayAutoCollapse": true, |
| 117 | + "evenBetterToml.formatter.arrayAutoExpand": true, |
| 118 | + "evenBetterToml.formatter.arrayTrailingComma": true, |
| 119 | + "evenBetterToml.formatter.columnWidth": 90, |
| 120 | + "evenBetterToml.formatter.compactArrays": true, |
| 121 | + "evenBetterToml.formatter.compactEntries": false, |
| 122 | + "evenBetterToml.formatter.compactInlineTables": false, |
| 123 | + "evenBetterToml.formatter.indentEntries": false, |
| 124 | + "evenBetterToml.formatter.indentTables": false, |
| 125 | + "evenBetterToml.formatter.inlineTableExpand": false, |
| 126 | + "evenBetterToml.formatter.reorderArrays": true, |
| 127 | + "evenBetterToml.formatter.trailingNewline": true, |
| 128 | + // We like keeping TOML keys in a certain non-alphabetical order that feels more natural |
| 129 | + "evenBetterToml.formatter.reorderKeys": false |
94 | 130 | }
|
0 commit comments