fix: Make lgtm corrections.

This commit is contained in:
Gervwyk 2021-04-25 22:36:25 +02:00
parent 1edc7cb70f
commit ef2085781a
9 changed files with 8 additions and 9 deletions

View File

@ -19,7 +19,7 @@ import blockDefaultProps from '../blockDefaultProps';
import Skeleton from './Skeleton';
const SkeletonButton = ({ properties, methods }) => {
let height = properties.height || 32;
let height;
switch (properties.size) {
case 'small':
height = 24;

View File

@ -49,7 +49,7 @@ const Examples = ({ type, Component }) => {
noRefs: true,
});
return (
<div key key={`${block.id}`}>
<div key={`${block.id}`}>
{values.map((initialValue, v) => {
const props = stubBlockProps({
block,

View File

@ -16,7 +16,7 @@
import React, { useState, useEffect } from 'react';
import { Drawer } from 'antd';
import { type, get } from '@lowdefy/helpers';
import { get } from '@lowdefy/helpers';
import { blockDefaultProps } from '@lowdefy/block-tools';
const triggerSetOpen = ({ state, setOpen, methods, rename }) => {

View File

@ -66,7 +66,7 @@ const labelLogic = ({
overflow: properties.inline && 'inherit', // wrap label content below input
whiteSpace: !properties.inline && 'normal', // set label title wrap for long labels
marginBottom: properties.size === 'small' ? 0 : 8,
overflow: 'visible',
// overflow: 'visible',
})]: true,
});

View File

@ -16,7 +16,7 @@
import React, { useState, useEffect } from 'react';
import { blockDefaultProps } from '@lowdefy/block-tools';
import { get, type } from '@lowdefy/helpers';
import { get } from '@lowdefy/helpers';
import { Modal } from 'antd';
const triggerSetOpen = ({ state, setOpen, methods }) => {

View File

@ -49,7 +49,7 @@ const Examples = ({ type, Component }) => {
noRefs: true,
});
return (
<div key key={`${block.id}`}>
<div key={`${block.id}`}>
{values.map((initialValue, v) => {
const props = stubBlockProps({
block,

View File

@ -1,6 +1,5 @@
const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const { ModuleFederationPlugin } = require('webpack').container;

View File

@ -24,7 +24,7 @@ const applyArrayIndices = (arrayIndices, name) => {
const index = copy.shift();
let newName;
if (name.includes('$')) {
newName = name.replace('$', index.toString());
newName = name.replace('$', index.toString()); // lgtm [js/incomplete-sanitization]
} else {
newName = name;
}

View File

@ -107,7 +107,7 @@ const unset = (obj, prop) => {
while (segs.length && segs[segs.length - 1].slice(-1) === '\\') {
last = `${segs.pop().slice(0, -1)}.${last}`;
}
while (segs.length) obj = obj[(prop = segs.shift())];
while (segs.length) obj = obj[segs.shift()];
return delete obj[last];
}
return true;