Skip to content

Commit 4cb9e0b

Browse files
committed
chore: remove eslint-plugin-github
1 parent 3cc259f commit 4cb9e0b

File tree

3 files changed

+207
-733
lines changed

3 files changed

+207
-733
lines changed

eslint.config.mjs

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
// @ts-check
22

3-
import { fixupPluginRules } from "@eslint/compat";
4-
import { FlatCompat } from "@eslint/eslintrc";
53
import jsEslint from "@eslint/js";
64
import eslintConfigPrettier from "eslint-config-prettier";
75
import eslintPluginImportX from "eslint-plugin-import-x";
86
import * as tsEslint from "typescript-eslint";
97

10-
const compat = new FlatCompat({
11-
baseDirectory: import.meta.dirname,
12-
recommendedConfig: jsEslint.configs.recommended,
13-
allConfig: jsEslint.configs.all,
14-
});
15-
16-
/* eslint-disable @typescript-eslint/explicit-function-return-type */
17-
/**
18-
* @param {string} name the pugin name
19-
* @param {string} alias the plugin alias
20-
* @returns {import("eslint").ESLint.Plugin}
21-
*/
22-
function legacyPlugin(name, alias = name) {
23-
const plugin = compat.plugins(name)[0]?.plugins?.[alias];
24-
25-
if (!plugin) {
26-
throw new Error(`Unable to resolve plugin ${name} and/or alias ${alias}`);
27-
}
28-
29-
return fixupPluginRules(plugin);
30-
}
31-
/* eslint-enable @typescript-eslint/explicit-function-return-type */
32-
338
export default tsEslint.config(
349
jsEslint.configs.recommended,
3510
eslintPluginImportX.flatConfigs.recommended,
@@ -55,10 +30,6 @@ export default tsEslint.config(
5530
],
5631
},
5732
{
58-
plugins: {
59-
github: legacyPlugin("eslint-plugin-github", "github"), // pending https://github.com/github/eslint-plugin-github/issues/513
60-
import: legacyPlugin("eslint-plugin-import", "import"), // Needed for above
61-
},
6233
rules: {
6334
"@typescript-eslint/await-thenable": "warn",
6435
"@typescript-eslint/explicit-function-return-type": "warn",
@@ -79,19 +50,15 @@ export default tsEslint.config(
7950
allowNumber: true,
8051
},
8152
],
82-
"github/array-foreach": "error",
83-
"github/no-implicit-buggy-globals": "error",
84-
"github/no-then": "error",
85-
"github/no-dynamic-script-tag": "error",
86-
"import/no-extraneous-dependencies": [
53+
"import-x/no-extraneous-dependencies": [
8754
"error",
8855
{
8956
devDependencies: true,
9057
optionalDependencies: true,
9158
peerDependencies: true,
9259
},
9360
],
94-
"import/order": [
61+
"import-x/order": [
9562
"warn",
9663
{ "newlines-between": "always", alphabetize: { order: "asc" } },
9764
],

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,25 @@
3434
"uuid": "^10.0.0"
3535
},
3636
"devDependencies": {
37-
"@eslint/compat": "^1.2.3",
38-
"@eslint/eslintrc": "^3.2.0",
3937
"@eslint/js": "^9.16.0",
4038
"@opentf/std": "^0.13.0",
4139
"@total-typescript/ts-reset": "^0.6.1",
4240
"@types/eslint__js": "^8.42.3",
4341
"@types/node": "~20.17.9",
4442
"@types/uuid": "^10.0.0",
45-
"@typescript-eslint/eslint-plugin": "^8.16.0",
46-
"@typescript-eslint/parser": "^8.16.0",
43+
"@typescript-eslint/eslint-plugin": "^8.18.0",
44+
"@typescript-eslint/parser": "^8.18.0",
4745
"@vitest/coverage-v8": "^2.1.6",
4846
"chalk": "^5.3.0",
4947
"changelogithub": "^0.13.11",
5048
"esbuild": "^0.24.0",
5149
"eslint": "^9.16.0",
5250
"eslint-config-prettier": "^9.1.0",
53-
"eslint-import-resolver-typescript": "^3.6.3",
54-
"eslint-plugin-github": "^5.1.3",
55-
"eslint-plugin-import": "^2.31.0",
56-
"eslint-plugin-import-x": "^4.4.3",
51+
"eslint-import-resolver-typescript": "^3.7.0",
52+
"eslint-plugin-import-x": "^4.5.0",
5753
"prettier": "3.4.1",
5854
"typescript": "^5.7.2",
59-
"typescript-eslint": "^8.16.0",
55+
"typescript-eslint": "^8.18.0",
6056
"vitest": "^2.1.6"
6157
}
6258
}

0 commit comments

Comments
 (0)