Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable Blazor linting #1283

Merged
merged 11 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
# Install dependencies
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
global-json-file: packages/nimble-blazor/global.json
- run: dotnet --info
working-directory: packages/nimble-blazor/
- uses: actions/setup-node@v3
with:
node-version: '16'
Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ This repository uses the following tooling. See below for more info.
First step in development is to build the monorepo which requires the following to be installed:

- Node.js version 16+ (run `node --version`) and npm version 8+ (run `npm --version`) which can be downloaded from https://nodejs.org/en/download/
- .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- .NET 6 SDK (`6.0.202 <= version < 7`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
- Run `dotnet --info` to verify the required version of the SDK is installed. A `v6` install is required, but it's fine if later versions are installed too.

From the `nimble` directory:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Specify .NET 6 via global.json file; re-enable Blazor linting",
"packageName": "@ni/nimble-blazor",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion packages/nimble-blazor/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Getting Started

If not already done, download and install the .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
If not already done, download and install the .NET SDK (see [the main contributing doc](/CONTRIBUTING.md) for the required version).

Initialize and build the Nimble monorepo (`npm install` + `npm run build` from the root `nimble` directory) before working with the Blazor codebase.

Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-blazor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This repo contains:
- Visual Studio 2022 ([Enterprise, if available](https://my.visualstudio.com/Downloads?PId=8229)): Choose the "ASP.NET and Web Development" Workload in the installer
- Ensure Visual Studio is completely up to date (v17.1.6+): In Visual Studio click "Help" then "Check for Updates"
- **Mac with Visual Studio Code**: Install [Visual Studio Code](https://code.visualstudio.com/) and open it. Open the Extensions pane ("Preferences" >> "Extensions"), and search for / install the `ms-dotnettools.csharp` extension.
2. .NET 6 SDK: If not already done, download and install the .NET 6 SDK version 6.0.202+ (run `dotnet --version`) which can be downloaded from https://dotnet.microsoft.com/en-us/download
2. .NET SDK: See [the main contributing doc](/CONTRIBUTING.md) for the required version.

### Creating a new Blazor project

Expand Down
7 changes: 7 additions & 0 deletions packages/nimble-blazor/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"version": "6.0.202",
"allowPrelease": "false",
"rollForward": "latestMinor"
}
}
2 changes: 1 addition & 1 deletion packages/nimble-blazor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"generate-icons:bundle": "rollup --bundleConfigAsCjs --config build/generate-icons/rollup.config.js",
"generate-icons:run": "node build/generate-icons/dist/index.js",
"generate-hybrid": "rollup --bundleConfigAsCjs --config build/generate-hybrid/rollup.config.js",
"lint": "npm run lint:js",
"lint": "npm run lint:cs && npm run lint:js",
"lint:cs": "dotnet format --verify-no-changes",
"lint:js": "eslint .",
"format": "npm run format:cs && npm run format:js",
Expand Down