Skip to content

Commit 38977f6

Browse files
authored
Update to eslint 9 (microsoft#1778)
A number of rules disablings no longer apply. Also prettier now applies to the eslint config file, so fix that up.
1 parent 7261455 commit 38977f6

File tree

7 files changed

+243
-326
lines changed

7 files changed

+243
-326
lines changed

Diff for: deploy/createTypesPackages.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// @ts-check
22
// node deploy/createTypesPackages.js
33

4-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
5-
64
/**
75
* @template T
86
* @typedef {T extends (infer U)[] ? U : T} ArrayInner

Diff for: deploy/deployChangedPackages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ async function createRelease(tag, body) {
146146
name: tag,
147147
body,
148148
});
149-
} catch (error) {
149+
} catch {
150150
console.error(
151151
"Creating the GitHub release failed, this is likely due to re-running the deploy.",
152152
);

Diff for: eslint.config.mjs

+19-16
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,36 @@ import { FlatCompat } from "@eslint/eslintrc";
99
const __filename = fileURLToPath(import.meta.url);
1010
const __dirname = path.dirname(__filename);
1111
const compat = new FlatCompat({
12-
baseDirectory: __dirname,
13-
recommendedConfig: js.configs.recommended,
14-
allConfig: js.configs.all
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
1515
});
1616

17-
export default [...compat.extends(
17+
export default [
18+
...compat.extends(
1819
"eslint:recommended",
1920
"plugin:@typescript-eslint/recommended",
2021
"plugin:prettier/recommended",
21-
), {
22+
),
23+
{
2224
plugins: {
23-
"@typescript-eslint": typescriptEslint,
25+
"@typescript-eslint": typescriptEslint,
2426
},
2527

2628
languageOptions: {
27-
globals: {
28-
...globals.node,
29-
...globals.browser,
30-
},
29+
globals: {
30+
...globals.node,
31+
...globals.browser,
32+
},
3133

32-
parser: tsParser,
34+
parser: tsParser,
3335
},
3436

3537
rules: {
36-
"no-prototype-builtins": 0,
37-
"@typescript-eslint/no-explicit-any": 0,
38-
"@typescript-eslint/no-non-null-assertion": 0,
39-
"@typescript-eslint/no-var-requires": 0,
38+
"no-prototype-builtins": 0,
39+
"@typescript-eslint/no-explicit-any": 0,
40+
"@typescript-eslint/no-non-null-assertion": 0,
41+
"@typescript-eslint/no-var-requires": 0,
4042
},
41-
}];
43+
},
44+
];

0 commit comments

Comments
 (0)