Skip to content

Commit bcebcdd

Browse files
committed
fix: missing change version issue location
1 parent 7e9a3f4 commit bcebcdd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/linter/rules/missing-change-version.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export const missingChangeVersion = entry => {
1616
message: 'Missing change version',
1717
location: {
1818
path: entry.api_doc_source,
19-
line: entry.yaml_position.start.line,
20-
column: entry.yaml_position.start.column,
19+
position: entry.yaml_position,
2120
},
2221
}));
2322
};

src/linter/tests/rules/missing-change-version.test.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ describe('missingChangeVersion', () => {
2020
{
2121
level: 'warn',
2222
location: {
23-
column: 1,
24-
line: 7,
2523
path: 'doc/api/assert.md',
24+
position: {
25+
end: { column: 35, line: 7, offset: 137 },
26+
start: { column: 1, line: 7, offset: 103 },
27+
},
2628
},
2729
message: 'Missing change version',
2830
},

0 commit comments

Comments
 (0)