Skip to content

Commit e7a5f89

Browse files
authored
Merge pull request #163 from peterjuras/renovate/major-typescript-eslint-monorepo
chore(deps): update typescript-eslint monorepo to v8 (major)
2 parents 0230ef0 + 6a0dfd6 commit e7a5f89

7 files changed

+194
-198
lines changed

.eslintrc

-43
This file was deleted.

eslint.config.mjs

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
6+
import js from "@eslint/js";
7+
import { FlatCompat } from "@eslint/eslintrc";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all
15+
});
16+
17+
export default [...compat.extends(
18+
"eslint:recommended",
19+
"plugin:@typescript-eslint/eslint-recommended",
20+
"plugin:@typescript-eslint/recommended",
21+
"plugin:react/recommended",
22+
"prettier",
23+
), {
24+
plugins: {
25+
"@typescript-eslint": typescriptEslint,
26+
},
27+
28+
languageOptions: {
29+
globals: {
30+
...globals.node,
31+
},
32+
33+
parser: tsParser,
34+
},
35+
36+
settings: {
37+
react: {
38+
version: "detect",
39+
},
40+
},
41+
}, {
42+
files: ["**/*.test.ts", "**/*.test.tsx", "test/**/*.tsx"],
43+
44+
languageOptions: {
45+
globals: {
46+
...globals.jest,
47+
fail: true,
48+
},
49+
},
50+
51+
rules: {
52+
"@typescript-eslint/no-explicit-any": 0,
53+
"@typescript-eslint/no-var-requires": 0,
54+
"@typescript-eslint/explicit-function-return-type": 0,
55+
},
56+
}, {
57+
files: ["**/*.js"],
58+
59+
rules: {
60+
"@typescript-eslint/no-var-requires": 0,
61+
"no-console": 0,
62+
},
63+
}];

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"@types/jest": "29.5.12",
3636
"@types/lolex": "5.1.6",
3737
"@types/react": "18.3.3",
38-
"@typescript-eslint/eslint-plugin": "7.18.0",
39-
"@typescript-eslint/parser": "7.18.0",
38+
"@typescript-eslint/eslint-plugin": "8.0.1",
39+
"@typescript-eslint/parser": "8.0.1",
4040
"babel-jest": "29.7.0",
41-
"eslint": "8.57.0",
41+
"eslint": "9.9.0",
4242
"eslint-config-prettier": "9.1.0",
4343
"eslint-plugin-react": "7.35.0",
4444
"jest": "29.7.0",

renovate.json

-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313
"matchCurrentVersion": "!/^0/",
1414
"automerge": true,
1515
"automergeType": "branch"
16-
},
17-
{
18-
"matchPackageNames": ["eslint"],
19-
"allowedVersions": "<9.0.0"
2016
}
2117
]
2218
}

scripts/ensure-publish-path.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @typescript-eslint/no-require-imports
12
const path = require("path");
23

34
const splitted = process.cwd().split(path.sep);

src/is-function.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// eslint-disable-next-line @typescript-eslint/ban-types
1+
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
22
export function isFunction<S>(input: S | Function): input is Function {
33
return typeof input === "function";
44
}

0 commit comments

Comments
 (0)