From c1be720e49fdf6e8319eca18e586a14d98793c1d Mon Sep 17 00:00:00 2001 From: fmtabbara Date: Thu, 18 Jul 2024 12:56:19 +0100 Subject: [PATCH] fix linting --- sdk/typescript/examples/chat-app/parcel/package.json | 4 ++-- .../examples/chat-app/plain-html/package.json | 3 +-- .../src/context/mixnet.tsx | 1 + .../react-webpack-with-theme-example/src/index.tsx | 10 ++++++++-- sdk/typescript/examples/react/sdk-react/package.json | 2 +- .../src/playground/theme/MUIThemeExplorer.tsx | 1 - 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sdk/typescript/examples/chat-app/parcel/package.json b/sdk/typescript/examples/chat-app/parcel/package.json index 0f9dbebffd..e8c2a9af20 100644 --- a/sdk/typescript/examples/chat-app/parcel/package.json +++ b/sdk/typescript/examples/chat-app/parcel/package.json @@ -6,7 +6,7 @@ "scripts": { "build": "npx parcel build", "build:serve": "npx serve dist", - "lint": "eslint src", + "lint": "echo not implemented", "lint:fix": "eslint src --fix", "start": "npx parcel", "test": "jest", @@ -41,4 +41,4 @@ "private": false, "browserslist": "> 0.5%, last 2 versions, not dead", "source": "src/index.html" -} \ No newline at end of file +} diff --git a/sdk/typescript/examples/chat-app/plain-html/package.json b/sdk/typescript/examples/chat-app/plain-html/package.json index 9edbe30447..c20a7798b3 100644 --- a/sdk/typescript/examples/chat-app/plain-html/package.json +++ b/sdk/typescript/examples/chat-app/plain-html/package.json @@ -7,8 +7,7 @@ "build": "webpack build --progress --config webpack.prod.js", "build:dev": "webpack build --progress", "build:serve": "npx serve dist", - "lint": "eslint src", - "lint:fix": "eslint src --fix", + "lint": "echo not implemented", "start": "webpack serve --progress --port 3000", "test": "jest", "test:watch": "jest --watch", diff --git a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/context/mixnet.tsx b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/context/mixnet.tsx index 54b8d749d5..1a2588ce40 100644 --- a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/context/mixnet.tsx +++ b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/context/mixnet.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { createNymMixnetClient, IWebWorkerEvents, MimeTypes, NymClientConfig, NymMixnetClient } from '@nymproject/sdk'; + export interface BinaryMessageHeaders { filename: string; mimeType: string; diff --git a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/index.tsx b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/index.tsx index 1c6b557d7e..aeda66a362 100644 --- a/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/index.tsx +++ b/sdk/typescript/examples/chat-app/react-webpack-with-theme-example/src/index.tsx @@ -1,5 +1,11 @@ import * as React from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import { App } from './App'; -ReactDOM.render(, document.getElementById('app')); +const element = document.getElementById('app'); + +if (!element) { + throw new Error('Element not found'); +} + +createRoot(element).render(); diff --git a/sdk/typescript/examples/react/sdk-react/package.json b/sdk/typescript/examples/react/sdk-react/package.json index 1c4a84f5ce..f6b6f130df 100644 --- a/sdk/typescript/examples/react/sdk-react/package.json +++ b/sdk/typescript/examples/react/sdk-react/package.json @@ -37,7 +37,7 @@ "test:watch": "jest --watch", "tsc": "tsc", "tsc:watch": "tsc --watch", - "lint": "eslint src", + "lint": "echo not implemented", "lint:fix": "eslint src --fix" } } diff --git a/sdk/typescript/packages/react-components/src/playground/theme/MUIThemeExplorer.tsx b/sdk/typescript/packages/react-components/src/playground/theme/MUIThemeExplorer.tsx index 0454295dc7..89fc745e1c 100644 --- a/sdk/typescript/packages/react-components/src/playground/theme/MUIThemeExplorer.tsx +++ b/sdk/typescript/packages/react-components/src/playground/theme/MUIThemeExplorer.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/no-array-index-key */ import * as React from 'react'; import type { Theme } from '@mui/material/styles'; import { SimpleTreeView, TreeItem } from '@mui/x-tree-view';