mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Add terminal-specific tslint rule to allow vscode-xterm imports
This commit is contained in:
parent
fe169ce4d2
commit
5d2a154da6
|
@ -15,52 +15,7 @@ import { ITerminalService } from 'vs/workbench/contrib/terminal/common/terminal'
|
|||
import { ITextEditorSelection } from 'vs/platform/editor/common/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
|
||||
// Since importing from vscode-xterm would be a layer breakage here the type is copied inline
|
||||
// import { ILinkMatcherOptions } from 'vscode-xterm';
|
||||
|
||||
/**
|
||||
* An object containing options for a link matcher.
|
||||
*/
|
||||
export interface ILinkMatcherOptions {
|
||||
/**
|
||||
* The index of the link from the regex.match(text) call. This defaults to 0
|
||||
* (for regular expressions without capture groups).
|
||||
*/
|
||||
matchIndex?: number;
|
||||
|
||||
/**
|
||||
* A callback that validates whether to create an individual link, pass
|
||||
* whether the link is valid to the callback.
|
||||
*/
|
||||
validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mouse hovers over a link for a moment.
|
||||
*/
|
||||
tooltipCallback?: (event: MouseEvent, uri: string) => boolean | void;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mouse leaves a link. Note that this can
|
||||
* happen even when tooltipCallback hasn't fired for the link yet.
|
||||
*/
|
||||
leaveCallback?: (event: MouseEvent, uri: string) => boolean | void;
|
||||
|
||||
/**
|
||||
* The priority of the link matcher, this defines the order in which the link
|
||||
* matcher is evaluated relative to others, from highest to lowest. The
|
||||
* default value is 0.
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mousedown and click events occur that
|
||||
* determines whether a link will be activated upon click. This enables
|
||||
* only activating a link when a certain modifier is held down, if not the
|
||||
* mouse event will continue propagation (eg. double click to select word).
|
||||
*/
|
||||
willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
|
||||
}
|
||||
import { ILinkMatcherOptions } from 'vscode-xterm';
|
||||
|
||||
const pathPrefix = '(\\.\\.?|\\~)';
|
||||
const pathSeparatorClause = '\\/';
|
||||
|
|
|
@ -485,6 +485,13 @@
|
|||
"assert"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "**/vs/workbench/contrib/terminal/browser/**",
|
||||
"restrictions": [
|
||||
"vscode-xterm",
|
||||
"**/vs/**"
|
||||
]
|
||||
},
|
||||
{
|
||||
"target": "**/vs/code/node/**",
|
||||
"restrictions": [
|
||||
|
|
Loading…
Reference in a new issue