From bf5bc428492c6ec8731c4bdfeac09223d8df74c1 Mon Sep 17 00:00:00 2001
From: Vitaly Takmazov
Date: Wed, 14 Aug 2019 15:31:25 +0300
Subject: cleanup lint warnings / update jsdoc
---
vnext/.eslintrc | 2 +-
vnext/src/api/index.js | 6 ++++++
vnext/src/ui/Settings.js | 53 ++++++++++++++++++++++++------------------------
3 files changed, 34 insertions(+), 27 deletions(-)
(limited to 'vnext')
diff --git a/vnext/.eslintrc b/vnext/.eslintrc
index 62404fed..5ba7add9 100644
--- a/vnext/.eslintrc
+++ b/vnext/.eslintrc
@@ -61,7 +61,7 @@
"no-unused-vars": "off",
"no-useless-escape": "off",
- "only-ascii/only-ascii": ["warn", { "allowedChars": "✓←→♡ ·" }],
+ "only-ascii/only-ascii": ["warn", { "allowedChars": "✓←→♡ ·—" }],
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
diff --git a/vnext/src/api/index.js b/vnext/src/api/index.js
index f2112dda..31bb3096 100644
--- a/vnext/src/api/index.js
+++ b/vnext/src/api/index.js
@@ -25,6 +25,12 @@ const apiBaseUrl = 'https://juick.com';
* @typedef {Object} SecureUserProperties
* @property {string=} hash
* @property {Token[]=} tokens
+ * @property {string=} telegramName
+ * @property {string=} twitterName
+ * @property {string[]=} jids
+ * @property {string[]=} emails
+ * @property {string=} activeEmail
+ * @property {{connected: boolean, crosspostEnabled: boolean}=} facebookStatus
*/
/**
diff --git a/vnext/src/ui/Settings.js b/vnext/src/ui/Settings.js
index 72537d86..c16a8289 100644
--- a/vnext/src/ui/Settings.js
+++ b/vnext/src/ui/Settings.js
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, useRef } from 'react';
+import React, { useState, useRef } from 'react';
import { me, updateAvatar } from '../api';
@@ -8,7 +8,7 @@ import UploadButton from './UploadButton';
import Avatar from './Avatar';
/**
- * @param {{ visitor: import('../api').User, onChange: function }} props
+ * @param {{ visitor: import('../api').SecureUser, onChange: React.ChangeEvent