diff --git a/.vscode/settings.json b/.vscode/settings.json
index eb7a9947b2..65feac3c69 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -72,6 +72,7 @@
"piptools",
"Prenoun",
"Preverb",
+ "recaptcha",
"reportgenerator",
"sched",
"sillsdev",
diff --git a/package.json b/package.json
index 433e9ff515..948c50c354 100644
--- a/package.json
+++ b/package.json
@@ -127,6 +127,7 @@
},
"eslintConfig": {
"extends": [
+ "plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
@@ -142,8 +143,9 @@
],
"rules": {
"@typescript-eslint/no-empty-interface": "warn",
+ "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "warn",
- "@typescript-eslint/no-unused-vars": "off",
+ "@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"import/first": "warn",
"import/newline-after-import": "warn",
@@ -173,9 +175,8 @@
],
"no-undef": "off",
"prefer-const": "warn",
- "react/display-name": "off",
"react/jsx-boolean-value": "warn",
- "unused-imports/no-unused-imports": "error"
+ "unused-imports/no-unused-imports": "warn"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
@@ -189,6 +190,7 @@
"react",
"unused-imports"
],
+ "root": true,
"settings": {
"react": {
"version": "detect"
diff --git a/src/components/App/App.test.tsx b/src/components/App/App.test.tsx
index c53bf846be..488de0d03a 100644
--- a/src/components/App/App.test.tsx
+++ b/src/components/App/App.test.tsx
@@ -1,6 +1,6 @@
import "jest-canvas-mock";
import { Provider } from "react-redux";
-import renderer from "react-test-renderer";
+import { act, create } from "react-test-renderer";
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
@@ -9,9 +9,13 @@ import "tests/reactI18nextMock";
import { defaultState } from "components/App/DefaultState";
import App from "components/App/component";
-jest.mock("@matt-block/react-recaptcha-v2", () => () => (
-
Recaptcha
-));
+jest.mock(
+ "@matt-block/react-recaptcha-v2",
+ () =>
+ function MockRecaptcha() {
+ return Recaptcha
;
+ }
+);
jest.mock("components/AnnouncementBanner/AnnouncementBanner", () => "div");
const createMockStore = configureMockStore([thunk]);
@@ -23,9 +27,9 @@ global.innerHeight = 100;
global.analytics = { track: jest.fn() } as any;
describe("App", () => {
- it("renders without crashing", () => {
- renderer.act(() => {
- renderer.create(
+ it("renders without crashing", async () => {
+ await act(async () => {
+ create(
diff --git a/src/components/AppBar/UserMenu.tsx b/src/components/AppBar/UserMenu.tsx
index 1a256d6db5..1eea6f9426 100644
--- a/src/components/AppBar/UserMenu.tsx
+++ b/src/components/AppBar/UserMenu.tsx
@@ -105,21 +105,12 @@ export default function UserMenu(props: TabProps): ReactElement {
open={Boolean(anchorElement)}
transformOrigin={{ horizontal: "right", vertical: "top" }}
>
-
+
>
);
}
-//