Skip to content

Commit 6c790e4

Browse files
authored
chore: remove linter warnings, and move jsdom to devDep (#1154)
1 parent 7d13174 commit 6c790e4

File tree

6 files changed

+57
-28
lines changed

6 files changed

+57
-28
lines changed

.eslintrc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"root": true,
33
"plugins": ["eslint-plugin-tsdoc"],
44
"parserOptions": {
5-
"project": ["tsconfig.json"],
5+
"project": ["tsconfig.json"]
66
},
77
"extends": ["@scaleway/react/typescript"],
88
"rules": {
@@ -17,23 +17,23 @@
1717
"import/prefer-default-export": "off",
1818
"import/no-default-export": "error",
1919
"no-await-in-loop": "off",
20-
"@typescript-eslint/no-namespace": "off",
20+
"@typescript-eslint/no-namespace": "off"
2121
},
2222
"overrides": [
2323
{
2424
"files": [
2525
"./packages/clients/src/scw/**/*.ts",
26-
"./packages/clients/src/internal/**/*.ts",
26+
"./packages/clients/src/internal/**/*.ts"
2727
],
2828
"rules": {
29-
"@typescript-eslint/consistent-type-definitions": "off",
29+
"@typescript-eslint/consistent-type-definitions": "off"
3030
}
3131
},
3232
{
3333
"files": ["**/*.test.ts", "__tests__/**/*.ts", "vite.config.ts"],
3434
"rules": {
3535
"eslint-disable import/no-extraneous-dependencies": "off"
36-
},
37-
},
38-
],
36+
}
37+
}
38+
]
3939
}

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"eslint": "8.56.0",
6565
"eslint-plugin-tsdoc": "0.2.17",
6666
"husky": "9.0.11",
67+
"jsdom": "24.0.0",
6768
"lerna": "7.4.2",
6869
"lint-staged": "15.2.2",
6970
"prettier": "3.2.5",
@@ -76,8 +77,5 @@
7677
"vite": "5.1.2",
7778
"vitest": "1.2.2"
7879
},
79-
"packageManager": "[email protected]",
80-
"dependencies": {
81-
"jsdom": "24.0.0"
82-
}
80+
"packageManager": "[email protected]"
8381
}

packages/clients/src/internal/async/interval-retrier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type Retry<T> = () => Promise<IteratorResult<T, T>>
2020
*
2121
* @internal
2222
*/
23-
type IntervalStrategy = Generator<number, never | number, number>
23+
type IntervalStrategy = Generator<number, number, number>
2424

2525
/**
2626
* Creates a fixed interval strategy.

packages/clients/src/internal/interceptors/types.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,7 @@ export interface ResponseInterceptor {
6868
* @public
6969
*/
7070
export interface ResponseErrorInterceptor {
71-
({
72-
request,
73-
error,
74-
}: {
75-
request: Request
76-
error: unknown
77-
}): unknown | Promise<unknown>
71+
({ request, error }: { request: Request; error: unknown }): unknown
7872
}
7973

8074
/**

packages/configuration-loader/src/types.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ export type Profile = {
4646
}
4747

4848
/** Configuration type. */
49-
export type ConfigurationType = Record<
50-
'default' | string,
51-
Record<string, string>
52-
>
49+
export type ConfigurationType = Record<string, Record<string, string>>
5350
/** Parameters to load the all the profiles from the configuration file */
5451
export type AllProfilesFromFileParams = {
5552
/**
@@ -68,5 +65,5 @@ export type ProfileFromFileParams = AllProfilesFromFileParams & {
6865
*
6966
* @defaultValue `default`
7067
* */
71-
profileName?: 'default' | string
68+
profileName?: string
7269
}

0 commit comments

Comments
 (0)