Skip to content

Commit 97ccb58

Browse files
committed
chore: clean up unused ignore directives
1 parent cd44fd1 commit 97ccb58

File tree

24 files changed

+27
-44
lines changed

24 files changed

+27
-44
lines changed

packages/blobs/src/store.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class Store {
107107
async get(key: string, opts: GetOptions): Promise<string>
108108
async get(key: string, { type }: GetOptions & { type: 'arrayBuffer' }): Promise<ArrayBuffer>
109109
async get(key: string, { type }: GetOptions & { type: 'blob' }): Promise<Blob>
110-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
110+
111111
async get(key: string, { type }: GetOptions & { type: 'json' }): Promise<any>
112112
async get(key: string, { type }: GetOptions & { type: 'stream' }): Promise<ReadableStream>
113113
async get(key: string, { type }: GetOptions & { type: 'text' }): Promise<string>
@@ -185,14 +185,14 @@ export class Store {
185185
options: { type: 'blob' } & GetWithMetadataOptions,
186186
): Promise<({ data: Blob } & GetWithMetadataResult) | null>
187187

188-
/* eslint-disable @typescript-eslint/no-explicit-any */
188+
189189

190190
async getWithMetadata(
191191
key: string,
192192
options: { type: 'json' } & GetWithMetadataOptions,
193193
): Promise<({ data: any } & GetWithMetadataResult) | null>
194194

195-
/* eslint-enable @typescript-eslint/no-explicit-any */
195+
196196

197197
async getWithMetadata(
198198
key: string,
@@ -276,7 +276,6 @@ export class Store {
276276

277277
// We can't use `async/await` here because that would make the signature
278278
// incompatible with one of the overloads.
279-
// eslint-disable-next-line promise/prefer-await-to-then
280279
return collectIterator(iterator).then((items) =>
281280
items.reduce(
282281
(acc, item) => ({

packages/blobs/src/store_factory.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export const getDeployStore = (input: GetDeployStoreOptions | string = {}): Stor
2727
// If a region hasn't been supplied and we're dealing with an edge request,
2828
// use the region from the context if one is defined, otherwise throw.
2929
if (clientOptions.edgeURL || clientOptions.uncachedEdgeURL) {
30-
// eslint-disable-next-line max-depth
3130
if (!context.primaryRegion) {
3231
throw new Error(
3332
'When accessing a deploy store, the Netlify Blobs client needs to be configured with a region, and one was not found in the environment. To manually set the region, set the `region` property in the `getDeployStore` options. If you are using the Netlify CLI, you may have an outdated version; run `npm install -g netlify-cli@latest` to update and try again.',

packages/blobs/src/store_list.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export function listStores(
2121

2222
// We can't use `async/await` here because that would make the signature
2323
// incompatible with one of the overloads.
24-
// eslint-disable-next-line promise/prefer-await-to-then
2524
return collectIterator(iterator).then((results) => ({ stores: results.flatMap((page) => page.stores) }))
2625
}
2726

packages/blobs/test/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const base64Encode = (input: string | object) => {
77
}
88

99
export const streamToString = async function streamToString(stream: NodeJS.ReadableStream): Promise<string> {
10-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
10+
1111
const chunks: Array<any> = []
1212

1313
for await (const chunk of stream) {

packages/cache/src/bootstrap/cache.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class NetlifyCache implements Cache {
101101
await Promise.allSettled(requests.map((request) => this.add(request)))
102102
}
103103

104-
// eslint-disable-next-line class-methods-use-this, require-await, @typescript-eslint/no-unused-vars
104+
105105
async delete(request: RequestInfo | URL) {
106106
const context = this.#getContext({ operation: Operation.Delete })
107107

@@ -117,7 +117,6 @@ export class NetlifyCache implements Cache {
117117
return true
118118
}
119119

120-
// eslint-disable-next-line class-methods-use-this, require-await, @typescript-eslint/no-unused-vars
121120
async keys(_request?: Request | URL) {
122121
// Not implemented.
123122
return []
@@ -151,7 +150,6 @@ export class NetlifyCache implements Cache {
151150
}
152151
}
153152

154-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
155153
async matchAll(request?: RequestInfo | URL, _options?: CacheQueryOptions): Promise<readonly Response[]> {
156154
if (!request) {
157155
return []

packages/dev-utils/src/lib/global-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ import { sync as writeFileAtomicSync } from 'write-file-atomic'
99
import { getLegacyPathInHome, getPathInHome } from './paths.js'
1010

1111
type ConfigStoreOptions<
12-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
12+
1313
T extends Record<string, any>,
1414
> = {
1515
defaults?: T | undefined
1616
}
1717

1818
export class GlobalConfigStore<
19-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
19+
2020
T extends Record<string, any> = Record<string, any>,
2121
> {
2222
#storagePath: string
@@ -41,7 +41,7 @@ export class GlobalConfigStore<
4141
}
4242

4343
public get(key: string): T[typeof key] {
44-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
44+
4545
return dot.getProperty(this.getConfig(), key)
4646
}
4747

packages/dev-utils/src/lib/local-state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export class LocalState {
8787
// TODO figure out cleaner way of grabbing ENV vars
8888
return process.env.NETLIFY_SITE_ID
8989
}
90-
// eslint-disable-next-line @typescript-eslint/no-confusing-void-expression
90+
9191
return getProperty(this.all, key)
9292
}
9393

packages/dev-utils/src/lib/memoize.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ interface MemoizeOptions<T> {
2222
// This allows us to discard any duplicate filesystem events, while ensuring
2323
// that actual updates happening during the zip operation will be executed
2424
// after it finishes (only the last update will run).
25-
/* eslint-disable no-param-reassign */
25+
2626
export const memoize = <T>({ cache, cacheKey, command }: MemoizeOptions<T>) => {
2727
if (cache[cacheKey] === undefined) {
2828
cache[cacheKey] = {
29-
// eslint-disable-next-line promise/prefer-await-to-then
3029
task: command().finally(() => {
3130
const entry = cache[cacheKey]
3231

@@ -44,4 +43,4 @@ export const memoize = <T>({ cache, cacheKey, command }: MemoizeOptions<T>) => {
4443

4544
return cache[cacheKey].task
4645
}
47-
/* eslint-enable no-param-reassign */
46+

packages/dev-utils/src/test/fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class MockFetch {
6464
}
6565

6666
get fetch() {
67-
// eslint-disable-next-line require-await
67+
6868
return async (...args: Parameters<typeof globalThis.fetch>) => {
6969
const [reqOrURL, options] = args
7070
const url = (reqOrURL instanceof Request ? reqOrURL.url : reqOrURL).toString()

packages/functions/dev/function.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export class NetlifyFunction {
159159

160160
hasValidName() {
161161
// same as https://github.com/netlify/bitballoon/blob/fbd7881e6c8e8c48e7a0145da4ee26090c794108/app/models/deploy.rb#L482
162-
// eslint-disable-next-line unicorn/better-regex
163162
return /^[A-Za-z0-9_-]+$/.test(this.name)
164163
}
165164

@@ -186,7 +185,7 @@ export class NetlifyFunction {
186185
return null
187186
}
188187

189-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
188+
190189
return getNextRun(this.schedule!)
191190
}
192191

0 commit comments

Comments
 (0)