Skip to content

Commit 62f5f51

Browse files
chore(deps): update typescript-eslint monorepo to v6 (major) (#4289)
* chore(deps): update typescript-eslint monorepo to v6 * fix new lint issues --------- Co-authored-by: Matt Seddon <[email protected]>
1 parent fd7560b commit 62f5f51

File tree

15 files changed

+108
-87
lines changed

15 files changed

+108
-87
lines changed

extension/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ module.exports = {
3535
'jest/valid-expect': 'off',
3636
'no-unused-expressions': 'off'
3737
}
38+
},
39+
{
40+
files: ['src/test/e2e/**/*'],
41+
rules: { '@typescript-eslint/no-unsafe-declaration-merging': 'off' }
3842
}
3943
]
4044
}

extension/src/cli/dvc/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export enum SubCommand {
5353

5454
export enum Flag {
5555
ALL_COMMITS = '-A',
56-
FOLLOW = '-f',
56+
FOLLOW = '--follow',
5757
DEFAULT = '-d',
5858
FORCE = '-f',
5959
GLOBAL = '--global',

extension/src/cli/git/constants.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export enum Flag {
4141
OTHERS = '--others',
4242
QUIET = '-q',
4343
RAW_WITH_NUL = '-z',
44-
SEPARATE_WITH_NULL = '-z',
4544
SHOW_TOPLEVEL = '--show-toplevel'
4645
}
4746

@@ -53,4 +52,4 @@ export const DEFAULT_REMOTE = 'origin'
5352

5453
export const COMMITS_SEPARATOR = '\u0000'
5554

56-
export type Args = (Command | Flag | Commit | typeof DEFAULT_REMOTE | string)[]
55+
export type Args = (Command | Flag | Commit | string)[]

extension/src/cli/git/reader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class GitReader extends GitCli {
5555
Command.LOG,
5656
revision,
5757
Flag.PRETTY_FORMAT_COMMIT_MESSAGE,
58-
Flag.SEPARATE_WITH_NULL,
58+
Flag.RAW_WITH_NUL,
5959
Flag.NUMBER,
6060
revisions
6161
],

extension/src/commands/internal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Toast } from '../vscode/toast'
1616
import { Response } from '../vscode/response'
1717
import { Disposable } from '../class/dispose'
1818

19-
type Command = (...args: Args) => unknown | Promise<unknown>
19+
type Command = (...args: Args) => unknown
2020

2121
export const AvailableCommands = Object.assign(
2222
{},

extension/src/experiments/model/collect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ export const collectRunningInWorkspace = (
473473
if (!ids.has(id)) {
474474
continue
475475
}
476-
if (executor === EXPERIMENT_WORKSPACE_ID) {
476+
if (executor === (EXPERIMENT_WORKSPACE_ID as Executor)) {
477477
return id
478478
}
479479
}

extension/src/experiments/model/filterBy/quickPick.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ describe('pickFilterToAdd', () => {
7979
expect(mockedQuickPickValue).toHaveBeenCalledWith(
8080
OPERATORS.filter(
8181
({ types }) =>
82-
!(types.length === 1 && types[0] === ColumnType.TIMESTAMP)
82+
!(
83+
types.length === 1 &&
84+
(types[0] as ColumnType) === ColumnType.TIMESTAMP
85+
)
8386
),
8487
{
8588
title: Title.SELECT_OPERATOR

extension/src/setup/collect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const collectSectionCollapsed = (
1515

1616
const acc = { ...DEFAULT_SECTION_COLLAPSED }
1717
for (const section of Object.keys(acc)) {
18-
if (section !== focusedSection) {
18+
if ((section as SetupSection) !== focusedSection) {
1919
acc[section as SetupSection] = true
2020
}
2121
}

extension/src/setup/commands/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ const modifyRemote = async (
173173
dvcRoot: string,
174174
remote: RemoteWithConfig
175175
): Promise<void> => {
176-
const option = await quickPickOne(
176+
const option = (await quickPickOne(
177177
Object.values(ModifyOptions),
178178
'Select an Option to Modify'
179-
)
179+
)) as ModifyOptions | undefined
180180

181181
if (!option) {
182182
return

extension/src/vscode/quickPick.test.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@ import { Title } from './title'
1313
jest.mock('vscode')
1414

1515
const mockedShowQuickPick = jest.mocked<
16-
(
17-
items: QuickPickItemWithValue[],
16+
<T>(
17+
items: QuickPickItemWithValue<T>[],
1818
options: QuickPickOptionsWithTitle
1919
) => Thenable<
20-
| QuickPickItemWithValue[]
21-
| QuickPickItemWithValue
22-
| string
23-
| undefined
24-
| unknown
20+
QuickPickItemWithValue<T>[] | QuickPickItemWithValue<T> | string | undefined
2521
>
2622
>(window.showQuickPick)
2723

@@ -31,7 +27,9 @@ beforeEach(() => {
3127

3228
describe('quickPickValue', () => {
3329
it('should call window.showQuickPick with the correct arguments', async () => {
34-
mockedShowQuickPick.mockResolvedValueOnce({ value: 'c' } as unknown)
30+
mockedShowQuickPick.mockResolvedValueOnce({
31+
value: 'c'
32+
} as QuickPickItemWithValue)
3533
const placeHolder = 'these letters are very important'
3634
const title = 'Choose a letter, any letter...' as Title
3735
const items = [
@@ -69,7 +67,7 @@ describe('quickPickManyValues', () => {
6967
mockedShowQuickPick.mockResolvedValueOnce([
7068
{ value: 'b' },
7169
{ value: 'c' }
72-
] as unknown[])
70+
] as QuickPickItemWithValue[])
7371
const placeHolder = 'these letters are very important'
7472
const title = 'Choose a letter, any letter...' as Title
7573
const items = [
@@ -126,7 +124,7 @@ describe('quickPickYesOrNo', () => {
126124
description: yesDescription,
127125
label: Response.YES,
128126
value: true
129-
}
127+
} as QuickPickItemWithValue<boolean>
130128
const noDescription = 'me'
131129
mockedShowQuickPick.mockResolvedValueOnce(yesItem)
132130

0 commit comments

Comments
 (0)