Showing 502 of 8,855 total issues
Function EditAppModal
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export default function EditAppModal({ open, setOpen, app }: TProps) {
const fileRef = React.useRef<HTMLInputElement>(null);
const [loading, setLoading] = useState(false)
const updateApp = useStoreState(state => state.updateApp)
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MetaNavigation
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const MetaNavigation: React.FC<IMetaNavigation> = ({
chatId,
open,
onClose,
}) => {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ChangeBackgroundScreen
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const ChangeBackgroundScreen = observer((props: any) => {
const navigation = useNavigation();
const {chatStore, loginStore, apiStore} = useStores();
const roomJID = props.route.params.roomJID;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AuthenticationScreen
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const AuthenticationScreen: React.FC<IAuthentication> = ({ }) => {
//mobx stores
const { loginStore } = useStores();
//mobx stores
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ChatScreen
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const ChatScreen = observer(({route}: any) => {
const {chatStore} = useStores();
const {chatJid, chatName} = route.params;
const room:roomListProps = chatStore.roomList.find(item => item.jid === chatJid)||{
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fetchWalletBalance
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
async fetchWalletBalance(token: string, isOwn: boolean) {
let url = tokenEtherBalanceURL;
runInAction(() => {
this.isFetching = true;
});
- Create a ticketCreate a ticket
Function downloadFile
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const downloadFile = async (url: string, filename: string) => {
// Get today's date to add the time suffix in filename
var date = new Date();
const {
- Create a ticketCreate a ticket
Function getConnectData
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
let dataBaseStatus = false;
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function getConnectData
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
let dataBaseStatus = false;
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function getConnectData
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
let dataBaseStatus = false;
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function sendMediaMessageStanza
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const sendMediaMessageStanza = async (
from: string,
to: string,
data: any,
xmpp: any,
- Create a ticketCreate a ticket
Function getMentionPartSuggestionKeywords
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getMentionPartSuggestionKeywords = (
parts: Part[],
plainText: string,
selection: Position,
partTypes: PartType[],
- Create a ticketCreate a ticket
Function HeaderBalanceButton
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const HeaderBalanceButton = observer(() => {
const {walletStore} = useStores();
const navigation = useNavigation<HomeStackNavigationProp>();
const onButtonPress = () => {
navigation.navigate('ProfileScreen');
- Create a ticketCreate a ticket
Function onDirectMessagePress
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onDirectMessagePress = async () => {
const otherUserWalletAddress = dataForTransfer?.walletFromJid;
const myWalletAddress = loginStore.initialData.walletAddress;
const combinedWalletAddress = [myWalletAddress, otherUserWalletAddress]
.sort()
- Create a ticketCreate a ticket
Function sendMediaMessageStanza
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
sendMediaMessageStanza(roomJID: string, data: any) {
const message = xml(
"message",
{
id: "sendMessage",
- Create a ticketCreate a ticket
Function onDirectChatPress
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onDirectChatPress = () => {
const otherUserWalletAddress = loginStore.anotherUserWalletAddress;
const myWalletAddress = loginStore.initialData.walletAddress;
const combinedWalletAddress = [myWalletAddress, otherUserWalletAddress]
.sort()
- Create a ticketCreate a ticket
Function getConnectData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
let dataBaseStatus = false;
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function getConnectData
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getConnectData = async () => {
console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
let dataBaseStatus = false;
if (
!process.env.TYPE ||
- Create a ticketCreate a ticket
Function Privacy
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Privacy = () => {
const [tab, setTab] = useState(0);
const handleChangeTab = (event: React.SyntheticEvent, newValue: number) => {
setTab(newValue);
- Create a ticketCreate a ticket
Function message
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
message: async (p) => {
return {
messages: [
{
type: 'text',
- Create a ticketCreate a ticket