Skip to content

Commit 58ea742

Browse files
committed
Enable func-style ESLint rule
1 parent 188bc53 commit 58ea742

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

extensions/ql-vscode/.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const baseConfig = {
5353
"etc/no-implicit-any-catch": "error",
5454
"filenames/match-regex": "off",
5555
"filenames/match-regexp": "off",
56-
"func-style": "off",
5756
"i18n-text/no-en": "off",
5857
"no-invalid-this": "off",
5958
"no-console": "off",

extensions/ql-vscode/src/common/helpers-pure.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export function assertNever(value: never): never {
2727
/**
2828
* Use to perform array filters where the predicate is asynchronous.
2929
*/
30-
export const asyncFilter = async function <T>(
30+
export async function asyncFilter<T>(
3131
arr: T[],
3232
predicate: (arg0: T) => Promise<boolean>,
3333
) {
3434
const results = await Promise.all(arr.map(predicate));
3535
return arr.filter((_, index) => results[index]);
36-
};
36+
}
3737

3838
/**
3939
* This regex matches strings of the form `owner/repo` where:

extensions/ql-vscode/test/matchers/toEqualPath.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { expect } from "@jest/globals";
22
import type { MatcherFunction } from "expect";
33
import { pathsEqual } from "../../src/common/files";
44

5+
// eslint-disable-next-line func-style -- We need to set the type of this function
56
const toEqualPath: MatcherFunction<[expectedPath: unknown]> = function (
67
actual,
78
expectedPath,

0 commit comments

Comments
 (0)