Skip to content

Commit 41ea4ba

Browse files
authored
Merge pull request #3 from devcontainer-config/dev
Add C# support
2 parents 5c8853b + 8f3db6c commit 41ea4ba

66 files changed

Lines changed: 874 additions & 71 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

.config/cspell/cspell.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,18 @@
33
"enableGlobDot": true,
44
"useGitignore": true,
55
"ignorePaths": ["**/node_modules/**", "LICENSE"],
6-
"words": ["devcontainer", "devcontainers", "execa", "npmjs", "packagejson", "pacote", "rsort", "syncpack"]
6+
"words": [
7+
"csharpierrc",
8+
"devcontainer",
9+
"devcontainers",
10+
"execa",
11+
"globalconfig",
12+
"msbuild",
13+
"npmjs",
14+
"packagejson",
15+
"pacote",
16+
"rcompare",
17+
"rsort",
18+
"syncpack"
19+
]
720
}

.config/dotnet/tools.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpier": {
6+
"version": "0.28.2",
7+
"commands": ["dotnet-csharpier"],
8+
"rollForward": false
9+
}
10+
}
11+
}

.config/eslint/eslint.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import nodePlugin from "eslint-plugin-n";
66
import simpleImportSort from "eslint-plugin-simple-import-sort";
77
import eslintPluginUnicorn from "eslint-plugin-unicorn";
88
import vitest from "eslint-plugin-vitest";
9+
import globals from "globals";
910
import tsESLint from "typescript-eslint";
1011

1112
const compat = new FlatCompat({ baseDirectory: import.meta.dirname });
@@ -14,6 +15,7 @@ export default tsESLint.config(
1415
await gitignore(import.meta.dirname),
1516
{
1617
linterOptions: { reportUnusedDisableDirectives: true },
18+
languageOptions: { globals: globals.node },
1719
},
1820
eslint.configs.recommended,
1921
{

.config/prettier/.prettierrc.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
22
"printWidth": 120,
3-
"plugins": ["prettier-plugin-packagejson"]
3+
"plugins": ["prettier-plugin-packagejson", "@prettier/plugin-xml"],
4+
"xmlWhitespaceSensitivity": "ignore",
5+
"overrides": [
6+
{
7+
"files": "app.manifest",
8+
"options": {
9+
"parser": "xml"
10+
}
11+
}
12+
]
413
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
packages:
2-
- "setup/**"
3-
- "!**/dist/"
2+
- "devcontainer-config-setup/**"
3+
- "!devcontainer-config-setup/**/dist/"

.devcontainer/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
COMPOSE_PROJECT_NAME=setup
1+
COMPOSE_PROJECT_NAME=devcontainer-config-setup
22
WORKSPACES=/workspaces
33
XDG_CONFIG_HOME=/home/dev/.config
44
XDG_CACHE_HOME=/home/dev/.cache
55
XDG_DATA_HOME=/home/dev/.local/share
66
XDG_STATE_HOME=/home/dev/.local/state
77
XDG_DATA_DIRS=/usr/local/share:/usr/share
88
XDG_CONFIG_DIRS=/etc/xdg
9+
NUGET_PACKAGES=/home/dev/.local/share/NuGet/global-packages

.devcontainer/devcontainer.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
// spell-checker:ignore esbenp azuretools dbaeumer
1+
// spell-checker:ignore esbenp azuretools dbaeumer dotnettools
22
{
3-
"name": "setup",
3+
"name": "devcontainer-config-setup",
44
"dockerComposeFile": "docker-compose.yml",
55
"service": "devcontainer",
66
"remoteUser": "dev",
77
"overrideCommand": true,
8-
"workspaceFolder": "/workspaces/setup",
8+
"workspaceFolder": "/workspaces/devcontainer-config-setup",
99
"features": {
1010
"ghcr.io/devcontainer-config/features/user-init:2": {},
1111
"ghcr.io/devcontainer-config/features/dot-config:2": {},
12-
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
12+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
13+
"ghcr.io/devcontainers/features/dotnet:2": { "version": "8.0" }
1314
},
1415
"customizations": {
1516
"vscode": {
@@ -18,13 +19,16 @@
1819
"ms-azuretools.vscode-docker",
1920
"streetsidesoftware.code-spell-checker",
2021
"dbaeumer.vscode-eslint",
22+
"ms-dotnettools.csharp",
23+
"csharpier.csharpier-vscode",
2124
"vitest.explorer"
2225
],
2326
"settings": {
2427
"files.associations": {
2528
"ignore": "ignore",
2629
"attributes": "properties",
27-
"rc": "properties"
30+
"rc": "properties",
31+
"*.globalconfig": "ini"
2832
},
2933
"editor.formatOnSave": true,
3034
"editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -41,7 +45,10 @@
4145
"eslint.experimental.useFlatConfig": true,
4246
"typescript.preferences.importModuleSpecifier": "non-relative",
4347
"typescript.preferences.includePackageJsonAutoImports": "on",
44-
"typescript.tsdk": "/workspaces/node_modules/typescript/lib"
48+
"typescript.tsdk": "/workspaces/node_modules/typescript/lib",
49+
"[csharp]": {
50+
"editor.defaultFormatter": "csharpier.csharpier-vscode"
51+
}
4552
}
4653
}
4754
},

.devcontainer/dot-config.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,26 @@
33
"attributes": "/home/dev/.config/git/attributes",
44
"ignore": "/home/dev/.config/git/ignore"
55
},
6-
"cspell": {
7-
"cspell.json": "cspell.json"
8-
},
96
"pnpm": {
107
"rc": "/home/dev/.config/pnpm/rc"
118
},
129
"prettier": {
1310
".prettierrc.json": ".prettierrc.json"
1411
},
12+
"cspell": {
13+
"cspell.json": "cspell.json"
14+
},
15+
"csharpier": {
16+
".csharpierrc.json": ".csharpierrc.json"
17+
},
18+
"dotnet": {
19+
"tools.json": ".config/dotnet-tools.json"
20+
},
1521
"workspaces": {
1622
"../git/attributes": ".gitattributes",
1723
"../git/ignore": ".gitignore",
1824
"../../package.json": "package.json",
19-
"pnpm-workspace.yaml": "pnpm-workspace.yaml"
25+
"pnpm-workspace.yaml": "pnpm-workspace.yaml",
26+
"Directory.Build.props": "Directory.Build.props"
2027
}
2128
}

0 commit comments

Comments
 (0)