update all dependencies

This commit is contained in:
Athou
2022-10-12 08:34:52 +02:00
parent 97d290de9d
commit a151646850
7 changed files with 1647 additions and 659 deletions

View File

@@ -1,6 +1,14 @@
{
"extends": ["plugin:react/recommended", "react-app", "airbnb", "airbnb-typescript", "prettier"],
"plugins": ["prettier", "hooks"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"react-app",
"airbnb",
"airbnb-typescript",
"prettier"
],
"plugins": ["@typescript-eslint", "prettier", "hooks"],
"parserOptions": {
"project": "./tsconfig.json"
},

File diff suppressed because it is too large Load Diff

View File

@@ -16,19 +16,19 @@
"postinstall": "npm run i18n:compile"
},
"dependencies": {
"@emotion/react": "^11.10.0",
"@fontsource/open-sans": "^4.5.11",
"@emotion/react": "^11.10.4",
"@fontsource/open-sans": "^4.5.12",
"@lingui/core": "^3.14.0",
"@lingui/macro": "^3.14.0",
"@lingui/react": "^3.14.0",
"@mantine/core": "^5.2.0",
"@mantine/form": "^5.2.0",
"@mantine/hooks": "^5.2.0",
"@mantine/modals": "^5.2.0",
"@mantine/notifications": "^5.2.0",
"@mantine/spotlight": "^5.2.0",
"@reduxjs/toolkit": "^1.8.4",
"axios": "^0.27.2",
"@mantine/core": "^5.5.5",
"@mantine/form": "^5.5.5",
"@mantine/hooks": "^5.5.5",
"@mantine/modals": "^5.5.5",
"@mantine/notifications": "^5.5.5",
"@mantine/spotlight": "^5.5.5",
"@reduxjs/toolkit": "^1.8.6",
"axios": "^1.1.2",
"dayjs": "^1.11.5",
"interweave": "^13.0.0",
"make-plural": "^7.1.0",
@@ -38,22 +38,24 @@
"react-dom": "^18.2.0",
"react-icons": "^4.4.0",
"react-infinite-scroller": "^1.2.6",
"react-redux": "^8.0.2",
"react-router-dom": "^6.3.0",
"swagger-ui-react": "^4.14.0",
"react-redux": "^8.0.4",
"react-router-dom": "^6.4.2",
"swagger-ui-react": "^4.14.3",
"tinycon": "^0.6.8"
},
"devDependencies": {
"@lingui/cli": "^3.14.0",
"@types/eslint": "^8.4.6",
"@types/mousetrap": "^1.6.9",
"@types/react": "^18.0.17",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@types/react-infinite-scroller": "^1.2.3",
"@types/swagger-ui-react": "^4.11.0",
"@types/tinycon": "^0.6.3",
"@vitejs/plugin-react": "^2.0.1",
"eslint": "^8.22.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@vitejs/plugin-react": "^2.1.0",
"eslint": "^8.25.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
@@ -61,12 +63,12 @@
"eslint-plugin-hooks": "^0.4.3",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"rollup-plugin-visualizer": "^5.7.1",
"typescript": "^4.7.4",
"vite": "^3.0.8",
"rollup-plugin-visualizer": "^5.8.2",
"typescript": "^4.8.4",
"vite": "^3.1.7",
"vite-plugin-eslint": "^1.8.1",
"vite-tsconfig-paths": "^3.5.0",
"vitest": "^0.22.1",
"vitest-mock-extended": "^0.1.13"
"vite-tsconfig-paths": "^3.5.1",
"vitest": "^0.24.1",
"vitest-mock-extended": "^0.1.16"
}
}

View File

@@ -93,12 +93,12 @@ export const client = {
* @param err an error object (e.g. from axios)
* @returns an array of messages to show the user
*/
export const errorToStrings = (err: any) => {
export const errorToStrings = (err: unknown) => {
let strings: string[] = []
if (axios.isAxiosError(err)) {
if (err.response) {
const data = err.response.data as any
const { data } = err.response
if (typeof data === "string") strings.push(data)
if (typeof data === "object" && data.message) strings.push(data.message)
if (typeof data === "object" && data.errors) strings = [...strings, ...data.errors]

View File

@@ -30,8 +30,10 @@ const transform: TransformCallback = node => {
const src = node.getAttribute("src") ?? undefined
const alt = node.getAttribute("alt") ?? undefined
const title = node.getAttribute("title") ?? undefined
const width = node.getAttribute("width") ? parseInt(node.getAttribute("width")!, 10) : undefined
const height = node.getAttribute("height") ? parseInt(node.getAttribute("height")!, 10) : undefined
const nodeWidth = node.getAttribute("width")
const nodeHeight = node.getAttribute("height")
const width = nodeWidth ? parseInt(nodeWidth, 10) : undefined
const height = nodeHeight ? parseInt(nodeHeight, 10) : undefined
const placeholderSize = calculatePlaceholderSize({
width,
height,

View File

@@ -243,7 +243,7 @@ export function FeedEntries() {
<div
key={entry.id}
ref={el => {
refs.current[entry.id] = el!
if (el) refs.current[entry.id] = el
}}
>
<FeedEntry

View File

@@ -74,7 +74,7 @@ export function Tree() {
/>
)
const categoryNode = (category: Category, level: number = 0) => {
const categoryNode = (category: Category, level = 0) => {
const unreadCount = categoryUnreadCount(category)
if (unreadCount === 0 && !showRead) return null
@@ -96,7 +96,7 @@ export function Tree() {
)
}
const feedNode = (feed: Subscription, level: number = 0) => {
const feedNode = (feed: Subscription, level = 0) => {
if (feed.unread === 0 && !showRead) return null
return (
@@ -114,7 +114,7 @@ export function Tree() {
)
}
const recursiveCategoryNode = (category: Category, level: number = 0) => (
const recursiveCategoryNode = (category: Category, level = 0) => (
<React.Fragment key={`recursiveCategoryNode-${category.id}`}>
{categoryNode(category, level)}
{category.expanded && category.children.map(c => recursiveCategoryNode(c, level + 1))}