mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-21934] Upgrade to eslint 9 (#14754)
Upgrades to Eslint v9. Since this is a major version there were breaking changes, but since we've previously migrated to flat configs in #12806 those were minimal.
This commit is contained in:
10
libs/eslint/fix-jsdom.ts
Normal file
10
libs/eslint/fix-jsdom.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import JSDOMEnvironment from "jest-environment-jsdom";
|
||||
|
||||
export default class FixJSDOMEnvironment extends JSDOMEnvironment {
|
||||
constructor(...args: ConstructorParameters<typeof JSDOMEnvironment>) {
|
||||
super(...args);
|
||||
|
||||
// FIXME https://github.com/jsdom/jsdom/issues/3363
|
||||
this.global.structuredClone = structuredClone;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ const sharedConfig = require("../../libs/shared/jest.config.angular");
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
...sharedConfig,
|
||||
testEnvironment: "./fix-jsdom.ts",
|
||||
testMatch: ["**/+(*.)+(spec).+(mjs)"],
|
||||
displayName: "libs/eslint tests",
|
||||
preset: "jest-preset-angular",
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* eslint-disable no-undef */
|
||||
|
||||
import { clearImmediate, setImmediate } from "node:timers";
|
||||
|
||||
Object.defineProperties(globalThis, {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"extends": "../shared/tsconfig",
|
||||
"compilerOptions": {},
|
||||
"exclude": ["node_modules", "dist"]
|
||||
"exclude": ["node_modules", "dist"],
|
||||
"files": ["empty.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user