Skip to content

Commit e06cba2

Browse files
committed
Improve linting
1 parent 0fa1190 commit e06cba2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+547
-216
lines changed

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
.vscode-test
3+
package-lock.json
4+
dist/

.prettierrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ module.exports = {
44
bracketSpacing: true,
55
singleQuote: true,
66
trailingComma: 'all',
7+
overrides: [{ files: '*.svg', options: { parser: 'html' } }],
78
};

.vscode/extensions.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2-
// See http://go.microsoft.com/fwlink/?LinkId=827846
3-
// for the documentation about the extensions.json format
4-
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher", "esbenp.prettier-vscode"]
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"amodio.tsl-problem-matcher",
5+
"esbenp.prettier-vscode",
6+
"streetsidesoftware.code-spell-checker"
7+
]
58
}

.vscode/launch.json

+25-33
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
1-
// A launch configuration that compiles the extension and then opens it inside a new window
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
51
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/dist/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27-
],
28-
"outFiles": [
29-
"${workspaceFolder}/out/**/*.js",
30-
"${workspaceFolder}/dist/**/*.js"
31-
],
32-
"preLaunchTask": "tasks: watch-tests"
33-
}
34-
]
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9+
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
10+
"preLaunchTask": "${defaultBuildTask}"
11+
},
12+
{
13+
"name": "Extension Tests",
14+
"type": "extensionHost",
15+
"request": "launch",
16+
"args": [
17+
"--extensionDevelopmentPath=${workspaceFolder}",
18+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
19+
],
20+
"outFiles": [
21+
"${workspaceFolder}/out/**/*.js",
22+
"${workspaceFolder}/dist/**/*.js"
23+
],
24+
"preLaunchTask": "tasks: watch-tests"
25+
}
26+
]
3527
}

.vscode/settings.json

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
// Place your settings in this file to overwrite default and user settings.
21
{
32
"files.exclude": {
4-
"out": false, // set this to true to hide the "out" folder with the compiled JS files
5-
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
3+
"out": false,
4+
"dist": false
65
},
76
"search.exclude": {
8-
"out": true, // set this to false to include "out" folder in search results
9-
"dist": true // set this to false to include "dist" folder in search results
7+
"out": true,
8+
"dist": true
109
},
11-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
1210
"typescript.tsc.autoDetect": "off",
1311
"workbench.colorCustomizations": {
1412
"activityBar.background": "#073430",
@@ -28,15 +26,12 @@
2826
"[typescript]": {
2927
"editor.formatOnSave": false
3028
},
31-
"[javascript]": {
32-
"editor.formatOnSave": false
33-
},
34-
"[typescriptreact]": {
35-
"editor.formatOnSave": false
36-
},
3729
"[markdown]": {
3830
"editor.defaultFormatter": "esbenp.prettier-vscode"
3931
},
32+
"[html]": {
33+
"editor.defaultFormatter": "esbenp.prettier-vscode"
34+
},
4035
"[json]": {
4136
"editor.defaultFormatter": "esbenp.prettier-vscode"
4237
},
@@ -50,5 +45,5 @@
5045
"editor.defaultFormatter": "esbenp.prettier-vscode"
5146
},
5247
"cSpell.language": "en-GB",
53-
"cSpell.words": []
48+
"cSpell.words": ["dbcontext", "entityframework"]
5449
}

.vscode/tasks.json

+33-38
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
1-
// See https://go.microsoft.com/fwlink/?LinkId=733558
2-
// for the documentation about the tasks.json format
31
{
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"type": "npm",
8-
"script": "watch",
9-
"problemMatcher": "$ts-webpack-watch",
10-
"isBackground": true,
11-
"presentation": {
12-
"reveal": "never",
13-
"group": "watchers"
14-
},
15-
"group": {
16-
"kind": "build",
17-
"isDefault": true
18-
}
19-
},
20-
{
21-
"type": "npm",
22-
"script": "watch-tests",
23-
"problemMatcher": "$tsc-watch",
24-
"isBackground": true,
25-
"presentation": {
26-
"reveal": "never",
27-
"group": "watchers"
28-
},
29-
"group": "build"
30-
},
31-
{
32-
"label": "tasks: watch-tests",
33-
"dependsOn": [
34-
"npm: watch",
35-
"npm: watch-tests"
36-
],
37-
"problemMatcher": []
38-
}
39-
]
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "watch",
7+
"problemMatcher": "$ts-webpack-watch",
8+
"isBackground": true,
9+
"presentation": {
10+
"reveal": "never",
11+
"group": "watchers"
12+
},
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"type": "npm",
20+
"script": "watch-tests",
21+
"problemMatcher": "$tsc-watch",
22+
"isBackground": true,
23+
"presentation": {
24+
"reveal": "never",
25+
"group": "watchers"
26+
},
27+
"group": "build"
28+
},
29+
{
30+
"label": "tasks: watch-tests",
31+
"dependsOn": ["npm: watch", "npm: watch-tests"],
32+
"problemMatcher": []
33+
}
34+
]
4035
}

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## [Unreleased]
88

9-
- Initial release
9+
- Initial release

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,15 @@ A VS Code extension to manage Entity Framework migrations.
88

99
![treeview](images/treeview-screenshot.png)
1010

11-
- List dbcontexts for all projects within a solution
11+
- List dbContexts for all projects within a solution
1212
- Add/remove/run/undo migrations
1313

1414
## Requirements
1515

1616
- [dotnet sdk](https://dotnet.microsoft.com/download)
1717
- [efcore tools](https://learn.microsoft.com/en-us/ef/core/cli/dotnet)
1818
- A solution (`.sln`) file with projects
19-
20-
## Performance
21-
22-
The EF tools execute application code at design time to get information about the project, thus performance can be slow on large projects.
19+
- [Microsoft.EntityFrameworkCore.Design](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Design) must be installed in one of the projects
2320

2421
## Extension Settings
2522

@@ -35,6 +32,7 @@ This extension contributes the following settings:
3532
}
3633
```
3734
- `entityframework.commands`: Custom commands, for example:
35+
3836
```json
3937
{
4038
"entityframework.commands": {
@@ -49,7 +47,7 @@ This extension contributes the following settings:
4947
"--startup-project",
5048
"\"$project\"",
5149
"--context",
52-
"\"$dbcontext\""
50+
"\"$dbContext\""
5351
],
5452
"removeMigration": [
5553
"dotnet",
@@ -61,7 +59,7 @@ This extension contributes the following settings:
6159
"--startup-project",
6260
"\"$project\"",
6361
"--context",
64-
"\"$dbcontext\""
62+
"\"$dbContext\""
6563
],
6664
"runMigration": [
6765
"dotnet",
@@ -73,7 +71,7 @@ This extension contributes the following settings:
7371
"--startup-project",
7472
"\"$project\"",
7573
"--context",
76-
"\"$dbcontext\"",
74+
"\"$dbContext\"",
7775
"\"$migrationId\""
7876
],
7977
"generateScript": [
@@ -84,12 +82,16 @@ This extension contributes the following settings:
8482
"--project",
8583
"\"$project\"",
8684
"--context",
87-
"\"$dbcontext\""
85+
"\"$dbContext\""
8886
]
8987
}
9088
}
9189
```
9290

91+
## Performance
92+
93+
The EF tools execute application code at design time to get information about the project, thus performance can be slow on large projects.
94+
9395
## License
9496

9597
See [LICENSE.md](./LICENSE.md).

icons/add_dark.svg

+9-2
Loading

icons/add_light.svg

+9-2
Loading

icons/csproj.svg

+24-1
Loading

icons/database_dark.svg

+9-2
Loading

icons/database_light.svg

+9-2
Loading

icons/export_dark.svg

+11-2
Loading

icons/export_light.svg

+11-2
Loading

0 commit comments

Comments
 (0)