Skip to content

Commit 5b4ebdb

Browse files
authored
Merge pull request #371 from htmlhint/copilot/update-eslint-and-github-actions
Updates: ESLint v10, GitHub Actions, Dependabot cooldown, housekeeping
2 parents 9646efa + b7e57d5 commit 5b4ebdb

9 files changed

Lines changed: 312 additions & 369 deletions

File tree

.gemini/config.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/AGENTS.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# AGENTS.md
2+
3+
<!-- https://agents.md -->
4+
5+
## GitHub Actions
6+
7+
- The GitHub Actions workflows should be placed in the .github/workflows directory.
8+
- The workflows should be named <workflow-name>.yml.
9+
- All GitHub Actions should be pinned versions to avoid breaking changes (SHA-1).
10+
- If using actions/checkout, it should have persist-credentials: false set.
11+
12+
## Dependabot
13+
14+
- GitHub Actions updates should be grouped and updated monthly.
15+
- npm packages should be grouped and updated monthly.
16+
- Dependabot config should be formatted with Prettier.
17+
- Dependencies should have a cooldown period of 7 days

.github/copilot-instructions.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: monthly
7+
cooldown:
8+
default-days: 7
79
labels:
810
- github-actions
911
groups:
@@ -16,19 +18,25 @@ updates:
1618
directory: "/"
1719
schedule:
1820
interval: weekly
21+
cooldown:
22+
default-days: 7
1923
versioning-strategy: increase
2024
open-pull-requests-limit: 1
2125

2226
- package-ecosystem: npm
2327
directory: "/htmlhint"
2428
schedule:
2529
interval: weekly
30+
cooldown:
31+
default-days: 7
2632
versioning-strategy: increase
2733
open-pull-requests-limit: 1
2834

2935
- package-ecosystem: npm
3036
directory: "/htmlhint-server"
3137
schedule:
3238
interval: weekly
39+
cooldown:
40+
default-days: 7
3341
versioning-strategy: increase
3442
open-pull-requests-limit: 1

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
persist-credentials: false
3333

3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
35+
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
3636
with:
3737
languages: ${{ matrix.language }}
3838
queries: +security-and-quality
@@ -41,9 +41,9 @@ jobs:
4141
- test/*
4242
4343
- name: Autobuild
44-
uses: github/codeql-action/autobuild@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
44+
uses: github/codeql-action/autobuild@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
47+
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
4848
with:
4949
category: "/language:${{matrix.language}}"

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
retention-days: 5
3939

4040
- name: "Upload to code-scanning"
41-
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
41+
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4.33.0
4242
with:
4343
sarif_file: results.sarif

htmlhint-server/src/server.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,6 @@ function findTagBoundaries(
19091909
position: number,
19101910
): { tagStart: number; tagEnd: number } | null {
19111911
// Start from the position and work backwards to find the opening <
1912-
let tagStart = -1;
19131912
let i = position;
19141913

19151914
// Look backwards for the start of a tag
@@ -1920,8 +1919,7 @@ function findTagBoundaries(
19201919
const tagEndResult = findTagEnd(text, i);
19211920
if (tagEndResult && tagEndResult.tagEnd >= position) {
19221921
// This tag contains our position
1923-
tagStart = i;
1924-
return { tagStart, tagEnd: tagEndResult.tagEnd };
1922+
return { tagStart: i, tagEnd: tagEndResult.tagEnd };
19251923
}
19261924
}
19271925
i--;
@@ -2694,7 +2692,7 @@ function doValidate(connection: Connection, document: TextDocument): void {
26942692
} catch (err) {
26952693
trace(`[DEBUG] doValidate error: ${err}`);
26962694
if (isErrorWithMessage(err)) {
2697-
throw new Error(err.message);
2695+
throw new Error(err.message, { cause: err });
26982696
}
26992697
throw err;
27002698
}

0 commit comments

Comments
 (0)