Restrict comments to 100 characters
This is a rule I try enforce in PR but it's a bit of a hassle, this will give a lint warning when it happens resulting in: - Yellow underline in supported editors when eslint is installed - Compilation will succeed since it's a warning not an error - CI will fail as it does not allow lint warnings Special case comments are ignored which includes @vt comments, table comments and commented out code.
This commit is contained in:
@@ -109,7 +109,8 @@ export class Linkifier2 extends Disposable implements ILinkifier2 {
|
||||
}
|
||||
|
||||
private _handleHover(position: IBufferCellPosition): void {
|
||||
// TODO: This currently does not cache link provider results across wrapped lines, activeLine should be something like `activeRange: {startY, endY}`
|
||||
// TODO: This currently does not cache link provider results across wrapped lines, activeLine
|
||||
// should be something like `activeRange: {startY, endY}`
|
||||
// Check if we need to clear the link
|
||||
if (this._activeLine !== position.y || this._wasResized) {
|
||||
this._clearCurrentLink();
|
||||
|
||||
@@ -104,7 +104,8 @@ export class OscLinkProvider implements ILinkProvider {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Handle fetching and returning other link ranges to underline other links with the same id
|
||||
// TODO: Handle fetching and returning other link ranges to underline other links with the same
|
||||
// id
|
||||
callback(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,8 @@ export class Viewport extends Disposable implements IViewport {
|
||||
super();
|
||||
|
||||
// Measure the width of the scrollbar. If it is 0 we can assume it's an OSX overlay scrollbar.
|
||||
// Unfortunately the overlay scrollbar would be hidden underneath the screen element in that case,
|
||||
// therefore we account for a standard amount to make it visible
|
||||
// Unfortunately the overlay scrollbar would be hidden underneath the screen element in that
|
||||
// case, therefore we account for a standard amount to make it visible
|
||||
this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;
|
||||
this.register(addDisposableDomListener(this._viewportElement, 'scroll', this._handleScroll.bind(this)));
|
||||
|
||||
|
||||
@@ -389,7 +389,8 @@ export class DomRenderer extends Disposable implements IRenderer {
|
||||
public clear(): void {
|
||||
for (const e of this._rowElements) {
|
||||
/**
|
||||
* NOTE: This used to be `e.innerText = '';` but that doesn't work when using `jsdom` and `@testing-library/react`
|
||||
* NOTE: This used to be `e.innerText = '';` but that doesn't work when using `jsdom` and
|
||||
* `@testing-library/react`
|
||||
*
|
||||
* references:
|
||||
* - https://github.com/testing-library/react-testing-library/issues/1146
|
||||
|
||||
@@ -285,7 +285,8 @@ export class DomRendererRowFactory {
|
||||
classes.push(RowCss.STRIKETHROUGH_CLASS);
|
||||
}
|
||||
|
||||
// apply link hover underline late, effectively overrides any previous text-decoration settings
|
||||
// apply link hover underline late, effectively overrides any previous text-decoration
|
||||
// settings
|
||||
if (isLinkHover) {
|
||||
charElement.style.textDecoration = 'underline';
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { isFirefox, isLegacyEdge } from 'common/Platform';
|
||||
export const INVERTED_DEFAULT_COLOR = 257;
|
||||
|
||||
export const DIM_OPACITY = 0.5;
|
||||
// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge would
|
||||
// result in truncated text (Issue 3353). Using 'bottom' for Chrome would result in slightly
|
||||
// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge
|
||||
// would result in truncated text (Issue 3353). Using 'bottom' for Chrome would result in slightly
|
||||
// unaligned Powerline fonts (PR 3356#issuecomment-850928179).
|
||||
export const TEXT_BASELINE: CanvasTextBaseline = isFirefox || isLegacyEdge ? 'bottom' : 'ideographic';
|
||||
|
||||
@@ -349,7 +349,8 @@ const enum VectorType {
|
||||
* not been patched with powerline characters and also to get pixel perfect rendering as rendering
|
||||
* issues can occur around AA/SPAA.
|
||||
*
|
||||
* The line variants draw beyond the cell and get clipped to ensure the end of the line is not visible.
|
||||
* The line variants draw beyond the cell and get clipped to ensure the end of the line is not
|
||||
* visible.
|
||||
*
|
||||
* Original symbols defined in https://github.com/powerline/fontpatcher
|
||||
*/
|
||||
|
||||
@@ -466,8 +466,8 @@ export class TextureAtlas implements ITextureAtlas {
|
||||
|
||||
// draw the background
|
||||
const backgroundColor = this._getBackgroundColor(bgColorMode, bgColor, inverse, dim);
|
||||
// Use a 'copy' composite operation to clear any existing glyph out of _tmpCtxWithAlpha, regardless of
|
||||
// transparency in backgroundColor
|
||||
// Use a 'copy' composite operation to clear any existing glyph out of _tmpCtxWithAlpha,
|
||||
// regardless of transparency in backgroundColor
|
||||
this._tmpCtx.globalCompositeOperation = 'copy';
|
||||
this._tmpCtx.fillStyle = backgroundColor.css;
|
||||
this._tmpCtx.fillRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height);
|
||||
@@ -559,7 +559,8 @@ export class TextureAtlas implements ITextureAtlas {
|
||||
const clipRegion = new Path2D();
|
||||
clipRegion.rect(xChLeft, yTop, this._config.deviceCellWidth, yBot - yTop);
|
||||
this._tmpCtx.clip(clipRegion);
|
||||
// Start 1/2 cell before and end 1/2 cells after to ensure a smooth curve with other cells
|
||||
// Start 1/2 cell before and end 1/2 cells after to ensure a smooth curve with other
|
||||
// cells
|
||||
this._tmpCtx.moveTo(xChLeft - this._config.deviceCellWidth / 2, yMid);
|
||||
this._tmpCtx.bezierCurveTo(
|
||||
xChLeft - this._config.deviceCellWidth / 2, yCurlyTop,
|
||||
|
||||
@@ -60,7 +60,8 @@ interface IMeasureResult {
|
||||
height: number;
|
||||
}
|
||||
|
||||
// TODO: For supporting browsers we should also provide a CanvasCharDimensionsProvider that uses ctx.measureText
|
||||
// TODO: For supporting browsers we should also provide a CanvasCharDimensionsProvider that uses
|
||||
// ctx.measureText
|
||||
class DomMeasureStrategy implements IMeasureStrategy {
|
||||
private _result: IMeasureResult = { width: 0, height: 0 };
|
||||
private _measureElement: HTMLElement;
|
||||
|
||||
Reference in New Issue
Block a user