-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Once #14584 is merged we should consider merging `vscode-bicep-ui` and `vscode-bicep` and configure it with npm workspaces. The PR cleans up the `vscode-bicep` project to make sure we have consistent linter rules and formatter settings to make it easier to merge the folders. Changes: - Consolidated TypeScript config files. - Updated ESLint rules. - Made rules less strict overall. - Removed the annoying Prettier formatting related rules. - ⭐**No more yellow or red squiggly line related to formatting violations**. - Cleaned up all stale linter rule disabling comments. - Updated prettier configuration - Changed printWidth from `80` to `120` since we all have modern high-resolution and ultra-wide monitors :p - Added a plugin for automatically sort imports. - ❗**Formatted all code under vscode-bicep, which accounts for 99% of the file changes**. - Fixed a critical Webpack bundling circular dependency warning. - Added CI steps for formatting the `vscode-bicep` folder.
- Loading branch information
Showing
130 changed files
with
2,132 additions
and
3,968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
module.exports = { | ||
root: true, | ||
ignorePatterns: ["out/**/*", ".eslintrc.cjs", "webpack.config.ts", "jest.config.*.js"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
plugins: ["header", "@typescript-eslint"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended", | ||
"plugin:react/jsx-runtime", | ||
"plugin:jest/recommended", | ||
"plugin:jest/style", | ||
], | ||
rules: { | ||
"header/header": [ | ||
2, | ||
"line", | ||
[ | ||
" Copyright (c) Microsoft Corporation.", | ||
" Licensed under the MIT License.", | ||
], | ||
], | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"printWidth": 120, | ||
"plugins": ["@ianvs/prettier-plugin-sort-imports"], | ||
"importOrder": [ | ||
"<TYPES>^(node:)", | ||
"<TYPES>", | ||
"<TYPES>^[.]", | ||
"", | ||
"<BUILTIN_MODULES>", | ||
"<THIRD_PARTY_MODULES>", | ||
"^[./]" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
src/vscode-bicep/media/walkthroughs/gettingStarted/2_Type_Params.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
# Add parameters to your Bicep file | ||
|
||
* First, create a parameter named location: | ||
- First, create a parameter named location: | ||
|
||
```bicep | ||
param location string = resourceGroup().location | ||
``` | ||
* Next, create a parameter named 'appPlanName': | ||
|
||
- Next, create a parameter named 'appPlanName': | ||
|
||
```bicep | ||
param appPlanName string = '${uniqueString(resourceGroup().id)}plan' | ||
``` | ||
|
||
These parameters will be used to fill in attributes in your resources. | ||
|
||
<!--- See https://github.com/Microsoft/vscode/issues/69757 for details of how to pass arguments --> | ||
|
||
[Copy code to clipboard](command:bicep.gettingStarted.copyToClipboard?%7B%22step%22%3A%22params%22%7D) | ||
|
||
![Typing parameters into Bicep](2_Type_Params.gif) |
7 changes: 4 additions & 3 deletions
7
src/vscode-bicep/media/walkthroughs/gettingStarted/3_Type_Resources.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
# Add resources to your Bicep file | ||
|
||
* First, type `'appplan'` to view the 'Application Service Plan' resource snippet and press Tab or Enter. Press Tab to jump to the `name` attribute and replace its value with the parameter `appPlanName`. | ||
- First, type `'appplan'` to view the 'Application Service Plan' resource snippet and press Tab or Enter. Press Tab to jump to the `name` attribute and replace its value with the parameter `appPlanName`. | ||
|
||
* Next, type `'storage'` to view the 'Storage Account' resource snippet and press Tab or Enter. Replace the `name` attribute's value with `'${appServicePlan.name}storage'` (including the single quotes). | ||
- Next, type `'storage'` to view the 'Storage Account' resource snippet and press Tab or Enter. Replace the `name` attribute's value with `'${appServicePlan.name}storage'` (including the single quotes). | ||
|
||
* Save the file. | ||
- Save the file. | ||
|
||
Feel free to search for other snippets that suit your needs. | ||
|
||
<!--- See https://github.com/Microsoft/vscode/issues/69757 for details of how to pass arguments --> | ||
|
||
[Copy code to clipboard](command:bicep.gettingStarted.copyToClipboard?%7B%22step%22%3A%22resources%22%7D) | ||
|
||
![Typing resources into Bicep file](3_Type_Resources.gif) |
Oops, something went wrong.