Skip to content

Commit 515d77d

Browse files
authored
chore: bump deps, drop eslint airbnb (it's unmaintained) (#2018)
This PR bumps deps, migrates to new eslint flat config and fixes new eslint issues. List of bumped deps: Dev: @release-it/conventional-changelog ^7.0.2 → ^10.0.1 @types/chai ^4.3.20 → ^5.2.2 @types/sinon ^17.0.3 → ^17.0.4 @typescript-eslint/eslint-plugin ^6.21.0 → ^8.38.0 @typescript-eslint/parser ^6.21.0 → ^8.38.0 @web/test-runner ^0.19.0 → ^0.20.2 @web/test-runner-playwright ^0.11.0 → ^0.11.1 chai ^4.5.0 → ^5.2.1 chokidar ^3.6.0 → ^4.0.3 conventional-changelog-cli ^4.1.0 → ^5.0.0 eslint ^8.57.1 → ^9.32.0 eslint-config-prettier ^9.1.0 → ^10.1.8 eslint-plugin-import ^2.31.0 → ^2.32.0 eslint-plugin-prettier ^5.2.3 → ^5.5.3 nyc ^15.1.0 → ^17.1.0 prettier ^3.4.2 → ^3.6.2 release-it ^16.3.0 → ^19.0.4 rimraf ^5.0.10 → ^6.0.1 typescript ^5.7.3 → ^5.8.3 Prod: @types/readable-stream ^4.0.18 → ^4.0.21 debug ^4.4.0 → ^4.4.1 end-of-stream ^1.4.4 → ^1.4.5 socks ^2.8.3 → ^2.8.6 ws ^8.18.0 → ^8.18.3 worker-timers ^7.1.8 → ^8.0.23
1 parent 1dd6c03 commit 515d77d

File tree

13 files changed

+6235
-20063
lines changed

13 files changed

+6235
-20063
lines changed

.eslintignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/browser-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
browser:
1212
runs-on: ubuntu-latest
13-
container: mcr.microsoft.com/playwright:v1.39.0 # https://playwright.dev/docs/ci-intro#via-containers
13+
container: mcr.microsoft.com/playwright:v1.54.1-noble # https://playwright.dev/docs/ci-intro#via-containers
1414
strategy:
1515
matrix:
1616
node-version: [20.x]

eslint.config.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
const {
2+
defineConfig,
3+
globalIgnores,
4+
} = require("eslint/config");
5+
6+
const tsParser = require("@typescript-eslint/parser");
7+
const typescriptEslintEslintPlugin = require("@typescript-eslint/eslint-plugin");
8+
const globals = require("globals");
9+
const js = require("@eslint/js");
10+
11+
const {
12+
FlatCompat,
13+
} = require("@eslint/eslintrc");
14+
15+
const compat = new FlatCompat({
16+
baseDirectory: __dirname,
17+
recommendedConfig: js.configs.recommended,
18+
allConfig: js.configs.all
19+
});
20+
21+
module.exports = defineConfig([{
22+
languageOptions: {
23+
parser: tsParser,
24+
25+
globals: {
26+
...globals.browser,
27+
...globals.commonjs,
28+
...globals.node,
29+
...globals.worker,
30+
},
31+
32+
sourceType: "module",
33+
34+
parserOptions: {
35+
project: "tsconfig.json",
36+
tsconfigRootDir: __dirname,
37+
},
38+
},
39+
40+
plugins: {
41+
"@typescript-eslint": typescriptEslintEslintPlugin,
42+
},
43+
44+
extends: compat.extends("plugin:prettier/recommended", "plugin:@typescript-eslint/recommended"),
45+
46+
rules: {
47+
"global-require": "off",
48+
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
49+
50+
"no-unused-vars": ["error", {
51+
args: "none",
52+
}],
53+
54+
"no-underscore-dangle": "off",
55+
"no-param-reassign": "off",
56+
"no-restricted-syntax": "off",
57+
"default-case": "off",
58+
"consistent-return": "off",
59+
"max-classes-per-file": "off",
60+
"no-plusplus": "off",
61+
"no-bitwise": "off",
62+
"class-methods-use-this": "off",
63+
"no-continue": "off",
64+
"@typescript-eslint/no-explicit-any": "off",
65+
66+
"@typescript-eslint/no-unused-vars": ["error", {
67+
args: "none",
68+
}],
69+
70+
"@typescript-eslint/naming-convention": "off",
71+
"@typescript-eslint/dot-notation": "off",
72+
"@typescript-eslint/no-use-before-define": "off",
73+
74+
"@typescript-eslint/consistent-type-imports": ["error", {
75+
"prefer": "type-imports",
76+
"fixStyle": "inline-type-imports",
77+
"disallowTypeAnnotations": true,
78+
}],
79+
},
80+
}, globalIgnores([
81+
"types/",
82+
"examples/",
83+
"doc/",
84+
"dist/",
85+
"build/",
86+
"electron-test/",
87+
"**/*.js",
88+
"**/*.mjs",
89+
])]);

0 commit comments

Comments
 (0)