Skip to content

Commit 2e5655f

Browse files
committed
feat: use node 20
1 parent f4e54c7 commit 2e5655f

File tree

10 files changed

+27156
-6116
lines changed

10 files changed

+27156
-6116
lines changed

.editorconfig

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ root = true
66
charset = utf-8
77
indent_style = tab
88
trim_trailing_whitespace = true
9-
insert_final_newline = false
10-
end_of_line = lf
9+
insert_final_newline = true
10+
end_of_line = lf
11+
12+
[*.yml]
13+
indent_style = space

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node: [16]
15+
node: [20]
1616

1717
steps:
1818
- name: Checkout Repo
@@ -27,4 +27,4 @@ jobs:
2727

2828
- run: npm run lint
2929

30-
- run: npm test
30+
- run: npm test

.github/workflows/codeql-analysis.yml

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

__tests__/problemMatcher.test.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,71 @@
11
let problemMatcher = require('../.github/problem-matcher.json');
22
problemMatcher = problemMatcher.problemMatcher[0];
33

4-
const matchResults = function(string, regexp){
4+
const matchResults = function(string, regexp) {
55
return string.map(line => regexp.exec(line));
66
};
77

8-
describe("problemMatcher", () => {
9-
it("has the correct owner", () => {
10-
expect(problemMatcher.owner).toEqual("htmllint");
8+
describe('problemMatcher', () => {
9+
it('has the correct owner', () => {
10+
expect(problemMatcher.owner).toEqual('htmllint');
1111
});
12-
it("has one patterns", () => {
12+
it('has one patterns', () => {
1313
expect(problemMatcher.pattern.length).toEqual(1);
1414
});
15-
describe("file pattern", () => {
15+
describe('file pattern', () => {
1616
let pattern;
1717
let regexp;
1818
beforeEach(() => {
1919
pattern = problemMatcher.pattern[0];
2020
regexp = new RegExp(pattern.regexp);
2121
});
22-
it("matches file path", () => {
22+
it('matches file path', () => {
2323
const reportOutput = [
24-
"src/test.html: line 1, col 1, tag is not closed",
24+
'src/test.html: line 1, col 1, tag is not closed',
2525
];
2626
const results = matchResults(reportOutput, regexp);
2727
expect(results.length).toEqual(1);
28-
expect(results[0][pattern.file]).toEqual("src/test.html");
28+
expect(results[0][pattern.file]).toEqual('src/test.html');
2929
});
3030
});
31-
describe("violation pattern", () => {
31+
describe('violation pattern', () => {
3232
let pattern;
3333
let regexp;
3434
beforeEach(() => {
3535
pattern = problemMatcher.pattern[0];
3636
regexp = new RegExp(pattern.regexp);
3737
});
38-
it("matches violations", () => {
38+
it('matches violations', () => {
3939
const reportOutput = [
40-
"src/test.html: line 1, col 1, tag is not closed",
41-
"src/test.html: line 2, col 2, only <head> and <body> may be children of <html>",
40+
'src/test.html: line 1, col 1, tag is not closed',
41+
'src/test.html: line 2, col 2, only <head> and <body> may be children of <html>',
4242
];
4343
const results = matchResults(reportOutput, regexp);
4444
expect(results.length).toEqual(2);
4545
});
46-
it("matches violation details", () => {
46+
it('matches violation details', () => {
4747
const reportOutput = [
48-
"src/test.html: line 1, col 1, tag is not closed",
49-
"src/foo.html: line 2, col 2, only <head> and <body> may be children of <html>",
50-
"src/bar.html: line 22, col 52, only <head> and <body> may be children of <html>",
48+
'src/test.html: line 1, col 1, tag is not closed',
49+
'src/foo.html: line 2, col 2, only <head> and <body> may be children of <html>',
50+
'src/bar.html: line 22, col 52, only <head> and <body> may be children of <html>',
5151
];
5252
const results = matchResults(reportOutput, regexp);
5353
expect(results.length).toEqual(3);
5454

55-
expect(results[0][pattern.file]).toEqual("src/test.html");
56-
expect(results[0][pattern.line]).toEqual("1");
57-
expect(results[0][pattern.column]).toEqual("1");
58-
expect(results[0][pattern.message]).toEqual("tag is not closed");
55+
expect(results[0][pattern.file]).toEqual('src/test.html');
56+
expect(results[0][pattern.line]).toEqual('1');
57+
expect(results[0][pattern.column]).toEqual('1');
58+
expect(results[0][pattern.message]).toEqual('tag is not closed');
5959

60-
expect(results[1][pattern.file]).toEqual("src/foo.html");
61-
expect(results[1][pattern.line]).toEqual("2");
62-
expect(results[1][pattern.column]).toEqual("2");
63-
expect(results[1][pattern.message]).toEqual("only <head> and <body> may be children of <html>");
60+
expect(results[1][pattern.file]).toEqual('src/foo.html');
61+
expect(results[1][pattern.line]).toEqual('2');
62+
expect(results[1][pattern.column]).toEqual('2');
63+
expect(results[1][pattern.message]).toEqual('only <head> and <body> may be children of <html>');
6464

65-
expect(results[2][pattern.file]).toEqual("src/bar.html");
66-
expect(results[2][pattern.line]).toEqual("22");
67-
expect(results[2][pattern.column]).toEqual("52");
68-
expect(results[2][pattern.message]).toEqual("only <head> and <body> may be children of <html>");
65+
expect(results[2][pattern.file]).toEqual('src/bar.html');
66+
expect(results[2][pattern.line]).toEqual('22');
67+
expect(results[2][pattern.column]).toEqual('52');
68+
expect(results[2][pattern.message]).toEqual('only <head> and <body> may be children of <html>');
6969
});
7070
});
7171
});

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ inputs:
1515
default: add
1616

1717
runs:
18-
using: "node16"
19-
main: "dist/index.js"
18+
using: "node20"
19+
main: "dist/index.js"

0 commit comments

Comments
 (0)