Skip to content

Commit 3f6ba73

Browse files
Update dependency prettier to v2.3.0 (#6604)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
1 parent ce8b300 commit 3f6ba73

File tree

11 files changed

+44
-38
lines changed

11 files changed

+44
-38
lines changed

extensionBase.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ export async function activate(context: vscode.ExtensionContext, handleLocal: bo
162162
modeHandler.vimState.historyTracker.currentContentChanges = [];
163163
}
164164

165-
modeHandler.vimState.historyTracker.currentContentChanges = modeHandler.vimState.historyTracker.currentContentChanges.concat(
166-
event.contentChanges
167-
);
165+
modeHandler.vimState.historyTracker.currentContentChanges =
166+
modeHandler.vimState.historyTracker.currentContentChanges.concat(event.contentChanges);
168167
}
169168
};
170169

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@
11511151
"minimist": "1.2.5",
11521152
"mocha": "8.4.0",
11531153
"plugin-error": "1.0.1",
1154-
"prettier": "2.2.1",
1154+
"prettier": "2.3.0",
11551155
"sinon": "10.0.0",
11561156
"ts-loader": "9.1.2",
11571157
"tslint": "6.1.3",

src/actions/commands/commandLine.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ class CommandTabInCommandline extends BaseCommand {
9494
const currentUri = vimState.document.uri;
9595
const isRemote = !!vscode.env.remoteName;
9696

97-
const { fullDirPath, baseName, partialPath, path: p } = getPathDetails(
98-
filePathInCmd,
99-
currentUri,
100-
isRemote
101-
);
97+
const {
98+
fullDirPath,
99+
baseName,
100+
partialPath,
101+
path: p,
102+
} = getPathDetails(filePathInCmd, currentUri, isRemote);
102103
// Update the evalCmd in case of windows, where we change / to \
103104
evalCmd = evalCmd.slice(0, fileRegex.lastIndex) + partialPath;
104105

src/actions/plugins/surround.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,10 @@ class CommandSurroundAddToReplacement extends BaseCommand {
352352
});
353353
}
354354

355-
private static getStartAndEndReplacements(
356-
replacement: string | undefined
357-
): { startReplace: string; endReplace: string } {
355+
private static getStartAndEndReplacements(replacement: string | undefined): {
356+
startReplace: string;
357+
endReplace: string;
358+
} {
358359
if (!replacement) {
359360
return { startReplace: '', endReplace: '' };
360361
}

src/cmd_line/subparsers/tab.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ function parseCount(args: string): number | undefined {
2828
}
2929
}
3030

31-
function parseCountOrOffset(
32-
args: string
33-
): { count: number | undefined; direction?: 'left' | 'right' } {
31+
function parseCountOrOffset(args: string): {
32+
count: number | undefined;
33+
direction?: 'left' | 'right';
34+
} {
3435
if (!args) {
3536
return { count: undefined };
3637
}

src/configuration/remapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ export class Remapper implements IRemapper {
223223

224224
if (remapState.wasPerformingRemapThatFinishedWaitingForTimeout) {
225225
// Some keys that broke the possible remap were typed by the user so handle them seperatly
226-
const lastRemapLength = remapState.wasPerformingRemapThatFinishedWaitingForTimeout.after!
227-
.length;
226+
const lastRemapLength =
227+
remapState.wasPerformingRemapThatFinishedWaitingForTimeout.after!.length;
228228
const keysPressedByUser = keys.slice(lastRemapLength);
229229
keys = keys.slice(0, lastRemapLength);
230230

src/configuration/vimrcKeyRemappingBuilder.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ class VimrcKeyRemappingBuilderImpl {
5757
* * `(?!.*<Plug>|.*<SID>)` -> don't allow mappings with <Plug> or <SID>
5858
* * `([\S ]+)$` -> match the {rhs} (we call it 'after') allowing spaces for commands like `:edit {file}<CR>`
5959
*/
60-
private static readonly KEY_REMAPPING_REG_EX = /^(map!?|smap|[nvxoilc]m(?:a(?:p)?)?|(?:[nvxl]no?r?|[oic]nor?|snor)(?:e(?:m(?:a(?:p)?)?)?)?|no(?:r(?:e(?:m(?:a(?:p)?)?)?)?)?!?)\s+(?!.*(?:<expr>|<script>))(?:(?:<buffer>|<silent>|<nowait>|<special>)\s?)*([\S]+)\s+(?!.*<Plug>|.*<SID>)([\S ]+)$/i;
60+
private static readonly KEY_REMAPPING_REG_EX =
61+
/^(map!?|smap|[nvxoilc]m(?:a(?:p)?)?|(?:[nvxl]no?r?|[oic]nor?|snor)(?:e(?:m(?:a(?:p)?)?)?)?|no(?:r(?:e(?:m(?:a(?:p)?)?)?)?)?!?)\s+(?!.*(?:<expr>|<script>))(?:(?:<buffer>|<silent>|<nowait>|<special>)\s?)*([\S]+)\s+(?!.*<Plug>|.*<SID>)([\S ]+)$/i;
6162

6263
/**
6364
* Regex for unmapping lines
@@ -86,7 +87,8 @@ class VimrcKeyRemappingBuilderImpl {
8687
* * `(?:(?:<buffer>|<silent>|<nowait>|<special>)\s?)*` -> allow any of these arguments without capture
8788
* * `([\S]+)$` -> match the {lhs} (we call it 'before')
8889
*/
89-
private static readonly KEY_UNREMAPPING_REG_EX = /^(unm(?:a(?:p)?)?!?|[nvxoilc]u(?:n(?:m(?:a(?:p)?)?)?)?|sunm(?:a(?:p)?)?)\s+(?:(?:<buffer>|<silent>|<nowait>|<special>)\s?)*([\S]+)$/i;
90+
private static readonly KEY_UNREMAPPING_REG_EX =
91+
/^(unm(?:a(?:p)?)?!?|[nvxoilc]u(?:n(?:m(?:a(?:p)?)?)?)?|sunm(?:a(?:p)?)?)\s+(?:(?:<buffer>|<silent>|<nowait>|<special>)\s?)*([\S]+)$/i;
9092

9193
/**
9294
* Regex for clear mapping lines
@@ -111,7 +113,8 @@ class VimrcKeyRemappingBuilderImpl {
111113
*
112114
* * `([\S]+)$` -> match the {lhs} (we call it 'before')
113115
*/
114-
private static readonly KEY_CLEAR_REMAPPING_REG_EX = /^(mapc(?:l(?:e(?:a(?:r)?)?)?)?!?|[nvxsoilc]mapc(?:l(?:e(?:a(?:r)?)?)?)?)$/i;
116+
private static readonly KEY_CLEAR_REMAPPING_REG_EX =
117+
/^(mapc(?:l(?:e(?:a(?:r)?)?)?)?!?|[nvxsoilc]mapc(?:l(?:e(?:a(?:r)?)?)?)?)$/i;
115118

116119
/**
117120
* Regex for each key of {lhs} and {rhs}

src/mode/modeHandler.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,10 @@ export class ModeHandler implements vscode.Disposable, IModeHandler {
463463
// Remove the <TimeoutFinished> key and get the key before that. If the <TimeoutFinished>
464464
// key was the last key, then 'key' will be undefined and won't be sent to handle action.
465465
this.vimState.recordedState.commandList.pop();
466-
key = this.vimState.recordedState.commandList[
467-
this.vimState.recordedState.commandList.length - 1
468-
];
466+
key =
467+
this.vimState.recordedState.commandList[
468+
this.vimState.recordedState.commandList.length - 1
469+
];
469470
}
470471
if (key !== undefined) {
471472
handledAsAction = await this.handleKeyAsAnAction(key);
@@ -1448,13 +1449,13 @@ export class ModeHandler implements vscode.Disposable, IModeHandler {
14481449
if (this.vimState.currentMode === Mode.Insert || this.vimState.currentMode === Mode.Replace) {
14491450
let virtualKey: string | undefined;
14501451
if (this.vimState.recordedState.bufferedKeys.length > 0) {
1451-
virtualKey = this.vimState.recordedState.bufferedKeys[
1452-
this.vimState.recordedState.bufferedKeys.length - 1
1453-
];
1452+
virtualKey =
1453+
this.vimState.recordedState.bufferedKeys[
1454+
this.vimState.recordedState.bufferedKeys.length - 1
1455+
];
14541456
} else if (this.vimState.recordedState.waitingForAnotherActionKey) {
1455-
virtualKey = this.vimState.recordedState.actionKeys[
1456-
this.vimState.recordedState.actionKeys.length - 1
1457-
];
1457+
virtualKey =
1458+
this.vimState.recordedState.actionKeys[this.vimState.recordedState.actionKeys.length - 1];
14581459
if (virtualKey === '<C-r>') {
14591460
virtualKey = '"';
14601461
} else if (virtualKey === '<C-k>') {
@@ -1609,9 +1610,8 @@ export class ModeHandler implements vscode.Disposable, IModeHandler {
16091610
// Return true if a new undo point should be created based on brackets and parentheses
16101611
private createUndoPointForBrackets(): boolean {
16111612
// }])> keys all start a new undo state when directly next to an {[(< opening character
1612-
const key = this.vimState.recordedState.actionKeys[
1613-
this.vimState.recordedState.actionKeys.length - 1
1614-
];
1613+
const key =
1614+
this.vimState.recordedState.actionKeys[this.vimState.recordedState.actionKeys.length - 1];
16151615

16161616
if (key === undefined) {
16171617
return false;

test/historyTracker.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ suite('historyTracker unit tests', () => {
1919
const retrieveFileMark = (markName: string): IMark | undefined =>
2020
historyTracker.getGlobalMarks().find((mark) => mark.name === markName);
2121

22-
const setupVimState = () => (sandbox.createStubInstance(VimState) as unknown) as VimState;
22+
const setupVimState = () => sandbox.createStubInstance(VimState) as unknown as VimState;
2323

2424
const setupHistoryTracker = (vimState = setupVimState()) => new HistoryTracker(vimState);
2525

test/testUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ export async function cleanUpWorkspace(): Promise<void> {
179179
}
180180

181181
export async function reloadConfiguration() {
182-
const validatorResults = (await require('../src/configuration/configuration').configuration.load()) as ValidatorResults;
182+
const validatorResults =
183+
(await require('../src/configuration/configuration').configuration.load()) as ValidatorResults;
183184
for (const validatorResult of validatorResults.get()) {
184185
console.log(validatorResult);
185186
}

0 commit comments

Comments
 (0)