Add multiline-comment-style lint rule and fix violations
Enable multiline-comment-style with starred-block to require JSDoc-style block comments with content on separate lines from the opening delimiter. Auto-fix existing violations across the codebase. Fixes #5899 Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
co-authored by
Daniel Imms
parent
1a67b6f4b3
commit
4ec85e67ba
@@ -227,9 +227,11 @@ test.describe('InputHandler Integration Tests', () => {
|
||||
await ctx.proxy.write('\x1b[2S');
|
||||
await pollFor(ctx.page, () => getLinesAsArray(5), ['3', '4', '5', '', '']);
|
||||
});
|
||||
// This is intentionally not implemented here are image support lives within an addon
|
||||
// test.skip('CSI ? Pi ; Pa ; Pv S - XTSMGRAPHICS: Set or request graphics attribute, xterm', async () => {
|
||||
// });
|
||||
/*
|
||||
* This is intentionally not implemented here are image support lives within an addon
|
||||
* test.skip('CSI ? Pi ; Pa ; Pv S - XTSMGRAPHICS: Set or request graphics attribute, xterm', async () => {
|
||||
* });
|
||||
*/
|
||||
test('CSI Ps T - SD: Scroll down Ps lines (default = 1), VT420', async () => {
|
||||
await ctx.proxy.write('1\r\n2\r\n3\r\n4\r\n5');
|
||||
await pollFor(ctx.page, () => getLinesAsArray(5), ['1', '2', '3', '4', '5']);
|
||||
@@ -349,8 +351,10 @@ test.describe('InputHandler Integration Tests', () => {
|
||||
await pollFor(ctx.page, () => getLinesAsArray(3), ['aoo', '', ' b']);
|
||||
});
|
||||
test('CSI Ps g - TBC: Tab Clear (default = 0)', async () => {
|
||||
// Default: Clear tab stop at cursor position
|
||||
// Move to column 9 (first tab stop), clear it, go back to column 1, tab should skip to column 17
|
||||
/*
|
||||
* Default: Clear tab stop at cursor position
|
||||
* Move to column 9 (first tab stop), clear it, go back to column 1, tab should skip to column 17
|
||||
*/
|
||||
await ctx.proxy.write('\x1b[9G\x1b[g\x1b[1G\ta');
|
||||
await pollFor(ctx.page, () => getLinesAsArray(1), [' a']);
|
||||
// Ps=3: Clear all tab stops
|
||||
@@ -523,8 +527,10 @@ test.describe('InputHandler Integration Tests', () => {
|
||||
test('Ps = 6 9 - Enable left and right margin mode (DECLRMM), VT420 and up', async () => {
|
||||
await assertNoModeChange('\x1b[?69h');
|
||||
});
|
||||
// test.skip('Ps = 8 0 - Enable Sixel Display Mode (DECSDM), VT330, VT340, VT382', async () => {
|
||||
// });
|
||||
/*
|
||||
* test.skip('Ps = 8 0 - Enable Sixel Display Mode (DECSDM), VT330, VT340, VT382', async () => {
|
||||
* });
|
||||
*/
|
||||
test('Ps = 9 5 - Do not clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up', async () => {
|
||||
await assertNoModeChange('\x1b[?95h');
|
||||
});
|
||||
@@ -881,9 +887,11 @@ test.describe('InputHandler Integration Tests', () => {
|
||||
test('Ps = 6 9 - Disable left and right margin mode (DECLRMM), VT420 and up.', async () => {
|
||||
await assertNoModeChange('\x1b[?69l');
|
||||
});
|
||||
// This is intentionally not implemented here are image support lives within an addon
|
||||
// test.skip('Ps = 8 0 - Disable Sixel Display Mode (DECSDM), VT330, VT340, VT382. Turns on "Sixel Scrolling". See the section Sixel Graphics and mode 8 4 5 2 .', async () => {
|
||||
// });
|
||||
/*
|
||||
* This is intentionally not implemented here are image support lives within an addon
|
||||
* test.skip('Ps = 8 0 - Disable Sixel Display Mode (DECSDM), VT330, VT340, VT382. Turns on "Sixel Scrolling". See the section Sixel Graphics and mode 8 4 5 2 .', async () => {
|
||||
* });
|
||||
*/
|
||||
test('Ps = 9 5 - Clear screen when DECCOLM is set/reset (DECNCSM), VT510 and up.', async () => {
|
||||
await assertNoModeChange('\x1b[?95l');
|
||||
});
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -378,8 +378,10 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
||||
const r = parseInt(cssColor.slice(1, 3), 16);
|
||||
const g = parseInt(cssColor.slice(3, 5), 16);
|
||||
const b = parseInt(cssColor.slice(5, 7), 16);
|
||||
// It's difficult to assert the exact color due to rounding, just ensure the color differs
|
||||
// to the regular color
|
||||
/*
|
||||
* It's difficult to assert the exact color due to rounding, just ensure the color differs
|
||||
* to the regular color
|
||||
*/
|
||||
await pollFor(ctx.value.page, async () => {
|
||||
const c = await getCellColor(ctx.value, x + 1, y + 1);
|
||||
return (
|
||||
@@ -783,9 +785,11 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 6, 2), [0xad, 0x7f, 0xa8, 255]);
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 7, 2), [0x34, 0xe2, 0xe2, 255]);
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 2), [0xee, 0xee, 0xec, 255]);
|
||||
// Setting and check for minimum contrast values, note that these are not
|
||||
// exact to the contrast ratio, if the increase luminance algorithm
|
||||
// changes then these will probably fail
|
||||
/*
|
||||
* Setting and check for minimum contrast values, note that these are not
|
||||
* exact to the contrast ratio, if the increase luminance algorithm
|
||||
* changes then these will probably fail
|
||||
*/
|
||||
await ctx.value.page.evaluate(`window.term.options.minimumContrastRatio = 10;`);
|
||||
frameDetails = undefined;
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [176, 180, 180, 255]);
|
||||
@@ -852,9 +856,11 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 6, 2), [0xad, 0x7f, 0xa8, 255]);
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 7, 2), [0x34, 0xe2, 0xe2, 255]);
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 8, 2), [0xee, 0xee, 0xec, 255]);
|
||||
// Setting and check for minimum contrast values, note that these are not
|
||||
// exact to the contrast ratio, if the increase luminance algorithm
|
||||
// changes then these will probably fail
|
||||
/*
|
||||
* Setting and check for minimum contrast values, note that these are not
|
||||
* exact to the contrast ratio, if the increase luminance algorithm
|
||||
* changes then these will probably fail
|
||||
*/
|
||||
await ctx.value.page.evaluate(`window.term.options.minimumContrastRatio = 10;`);
|
||||
frameDetails = undefined;
|
||||
await pollFor(ctx.value.page, () => getCellColor(ctx.value, 1, 1), [46, 52, 54, 255]);
|
||||
@@ -935,9 +941,11 @@ export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void
|
||||
await pollForApproximate(ctx.value.page, marginOfError, () => getFgColor(6, 2), [Math.floor((255 + 0xad) / 2), Math.floor((255 + 0x7f) / 2), Math.floor((255 + 0xa8) / 2), 255]);
|
||||
await pollForApproximate(ctx.value.page, marginOfError, () => getFgColor(7, 2), [Math.floor((255 + 0x34) / 2), Math.floor((255 + 0xe2) / 2), Math.floor((255 + 0xe2) / 2), 255]);
|
||||
await pollForApproximate(ctx.value.page, marginOfError, () => getFgColor(8, 2), [Math.floor((255 + 0xee) / 2), Math.floor((255 + 0xee) / 2), Math.floor((255 + 0xec) / 2), 255]);
|
||||
// Setting and check for minimum contrast values, note that these are not
|
||||
// exact to the contrast ratio, if the increase luminance algorithm
|
||||
// changes then these will probably fail
|
||||
/*
|
||||
* Setting and check for minimum contrast values, note that these are not
|
||||
* exact to the contrast ratio, if the increase luminance algorithm
|
||||
* changes then these will probably fail
|
||||
*/
|
||||
await waitForRenderAfter(ctx.value, () => ctx.value.page.evaluate(`window.term.options.minimumContrastRatio = 10;`));
|
||||
await pollForApproximate(ctx.value.page, marginOfError, () => getFgColor(1, 1), [150, 153, 154, 255]);
|
||||
await pollForApproximate(ctx.value.page, marginOfError, () => getFgColor(2, 1), [229, 127, 127, 255]);
|
||||
|
||||
@@ -837,8 +837,10 @@ test.describe('API Integration Tests', () => {
|
||||
test.describe('registerLinkProvider', () => {
|
||||
test('should fire provideLinks when hovering cells', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.proxy.focus();
|
||||
await ctx.page.evaluate(`
|
||||
window.calls = [];
|
||||
@@ -859,8 +861,10 @@ test.describe('API Integration Tests', () => {
|
||||
|
||||
test('should fire hover and leave events on the link', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.page.evaluate('window.term.focus()');
|
||||
await ctx.proxy.write('foo bar baz');
|
||||
// Wait for renderer to catch up as links are cleared on render
|
||||
@@ -897,8 +901,10 @@ test.describe('API Integration Tests', () => {
|
||||
|
||||
test('should work fine when hover and leave callbacks are not provided', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.page.evaluate('window.term.focus()');
|
||||
await ctx.proxy.write('foo bar baz');
|
||||
// Wait for renderer to catch up as links are cleared on render
|
||||
@@ -940,8 +946,10 @@ test.describe('API Integration Tests', () => {
|
||||
|
||||
test('should fire activate events when clicking the link', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.page.evaluate('window.term.focus()');
|
||||
await ctx.proxy.write('a b c');
|
||||
// Wait for renderer to catch up as links are cleared on render
|
||||
@@ -982,8 +990,10 @@ test.describe('API Integration Tests', () => {
|
||||
|
||||
test('should work when multiple links are provided on the same line', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.page.evaluate('window.term.focus()');
|
||||
await ctx.proxy.write('foo bar baz');
|
||||
// Wait for renderer to catch up as links are cleared on render
|
||||
@@ -1031,8 +1041,10 @@ test.describe('API Integration Tests', () => {
|
||||
|
||||
test('should dispose links when hovering away', async () => {
|
||||
await openTerminal(ctx);
|
||||
// Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
// active link
|
||||
/*
|
||||
* Focus the terminal as the cursor will show and trigger a rerender, which can clear the
|
||||
* active link
|
||||
*/
|
||||
await ctx.page.evaluate('window.term.focus()');
|
||||
await ctx.proxy.write('foo bar baz');
|
||||
// Wait for renderer to catch up as links are cleared on render
|
||||
|
||||
@@ -459,8 +459,10 @@ export async function openTerminal(
|
||||
} catch {}
|
||||
}
|
||||
`);
|
||||
// HACK: Tests may have side effects that could cause the terminal not to be removed. This
|
||||
// assertion catches this case early.
|
||||
/*
|
||||
* HACK: Tests may have side effects that could cause the terminal not to be removed. This
|
||||
* assertion catches this case early.
|
||||
*/
|
||||
strictEqual(await ctx.page.evaluate(`document.querySelector('#terminal-container').children.length`), 0, 'there must be no terminals on the page');
|
||||
|
||||
let script = `
|
||||
@@ -501,8 +503,10 @@ export async function openTerminal(
|
||||
|
||||
await ctx.page.evaluate(script);
|
||||
|
||||
// HACK: This is a soft layer breaker that's temporarily included until unicode graphemes have
|
||||
// more complete integration tests. See https://github.com/xtermjs/xterm.js/pull/4519#discussion_r1285234453
|
||||
/*
|
||||
* HACK: This is a soft layer breaker that's temporarily included until unicode graphemes have
|
||||
* more complete integration tests. See https://github.com/xtermjs/xterm.js/pull/4519#discussion_r1285234453
|
||||
*/
|
||||
if (testOptions.loadUnicodeGraphemesAddon) {
|
||||
await ctx.page.evaluate(`
|
||||
window.unicode = new UnicodeGraphemesAddon();
|
||||
|
||||
Reference in New Issue
Block a user