Skip to content

Commit

Permalink
include linting and formatting in ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jul 11, 2024
1 parent fa62f1c commit 4459d74
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .azure/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
npm install
displayName: 'Install dependencies'
- pwsh: |
npm run lint
npm run format-check
npm run lint:check
npm run format:check
displayName: 'Check code formatting'
- pwsh: |
npm run build:tools
Expand Down
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf

# Don't check these into the repo as LF to work around TeamCity bug
*.xml -text
*.targets -text

# Custom for Visual Studio
*.cs diff=csharp
*.sln
*.csproj
*.vbproj
*.fsproj
*.dbproj

# Denote all files that are truly binary and should not be modified.
*.dll binary
*.exe binary
*.png binary
*.ico binary
*.snk binary
*.pdb binary
*.svg binary

# Don't check for trailing whitespace at end of lines in the doc pages
*.md -whitespace=blank-at-eol
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
npm install
name: Install dependencies
- run: |
npm run lint
npm run format-check
npm run lint:check
npm run format:check
name: Check code formatting
- run: |
npm run build:tools
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"scripts": {
"build": "run-p build:tools build:agents",
"test": "run-p test:tools test:agents",
"lint": "eslint --ext .ts src",
"lint-fix": "eslint --ext .ts src --fix",
"format": "prettier --write \"src/**/*.ts\"",
"format-check": "prettier --check \"src/**/*.ts\"",
"lint:check": "eslint --ext .ts src",
"lint:fix": "eslint --ext .ts src --fix",
"format:check": "prettier --check \"src/**/*.ts\"",
"format:fix": "prettier --write \"src/**/*.ts\"",

"build:tools": "vite build --config src/tools/vite.config.mts",
"build:agents": "run-p build:agent:local build:agent:azure build:agent:github",
Expand Down

0 comments on commit 4459d74

Please sign in to comment.