Run eslint src --fix

This commit is contained in:
Eric NGUYEN 2023-02-10 16:29:10 +01:00
parent c6c4bd1e32
commit 25cb0d14f7
82 changed files with 363 additions and 342 deletions

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { Interweave, Node } from 'interweave';
import { IContainerModel } from '../../../Interfaces/IContainerModel';
import { IContainerProperties } from '../../../Interfaces/IContainerProperties';
import { Interweave, type Node } from 'interweave';
import { type IContainerModel } from '../../../Interfaces/IContainerModel';
import { type IContainerProperties } from '../../../Interfaces/IContainerProperties';
import { Camelize } from '../../../utils/stringtools';
import { SHOW_TEXT } from '../../../utils/default';
import { FindContainerById } from '../../../utils/itertools';
@ -67,7 +67,7 @@ export function Container(props: IContainerProps): JSX.Element {
width={width}
height={height}
style={style}
onClick={() => props.selectContainer(props.model.properties.id)}
onClick={() => { props.selectContainer(props.model.properties.id); }}
>
</rect>);
@ -108,7 +108,7 @@ function CreateReactCustomSVG(customSVG: string, properties: IContainerPropertie
function Transform(node: HTMLElement, children: Node[], properties: IContainerProperties): React.ReactNode {
const supportedTags = ['line', 'path', 'rect'];
if (supportedTags.includes(node.tagName.toLowerCase())) {
const attributes: { [att: string]: string | object | null } = {};
const attributes: Record<string, string | object | null> = {};
node.getAttributeNames().forEach(attName => {
const attributeValue = node.getAttribute(attName);
if (attributeValue === null) {

View file

@ -1,5 +1,5 @@
import * as React from 'react';
import { IContainerModel } from '../../../Interfaces/IContainerModel';
import { type IContainerModel } from '../../../Interfaces/IContainerModel';
import { DIMENSION_MARGIN } from '../../../utils/default';
import { GetAbsolutePosition, MakeBFSIterator } from '../../../utils/itertools';
import { TransformX } from '../../../utils/svg';

View file

@ -1,7 +1,7 @@
import * as React from 'react';
import { Orientation } from '../../../Enums/Orientation';
import { Position } from '../../../Enums/Position';
import { IContainerModel } from '../../../Interfaces/IContainerModel';
import { type IContainerModel } from '../../../Interfaces/IContainerModel';
import {
DIMENSION_MARGIN,
SHOW_BORROWER_DIMENSIONS,
@ -12,7 +12,7 @@ import {
import { FindContainerById, MakeRecursionDFSIterator, Pairwise } from '../../../utils/itertools';
import { TransformX, TransformY } from '../../../utils/svg';
import { Dimension } from './Dimension';
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
import { type ISymbolModel } from '../../../Interfaces/ISymbolModel';
interface IDimensionLayerProps {
containers: Map<string, IContainerModel>

View file

@ -1,6 +1,6 @@
import './Selector.scss';
import * as React from 'react';
import { IContainerModel } from '../../../../Interfaces/IContainerModel';
import { type IContainerModel } from '../../../../Interfaces/IContainerModel';
import { SHOW_SELECTOR_TEXT } from '../../../../utils/default';
import { GetAbsolutePosition } from '../../../../utils/itertools';
import { RemoveMargin } from '../../../../utils/svg';

View file

@ -1,6 +1,6 @@
import { Interweave } from 'interweave';
import * as React from 'react';
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
import { type ISymbolModel } from '../../../Interfaces/ISymbolModel';
import { DIMENSION_MARGIN, SYMBOL_MARGIN } from '../../../utils/default';
interface ISymbolProps {

View file

@ -1,5 +1,5 @@
import * as React from 'react';
import { ISymbolModel } from '../../../Interfaces/ISymbolModel';
import { type ISymbolModel } from '../../../Interfaces/ISymbolModel';
import { Symbol } from './Symbol';
interface ISymbolLayerProps {

View file

@ -1,12 +1,12 @@
import * as React from 'react';
import { ReactSVGPanZoom, Tool, TOOL_PAN, Value } from 'react-svg-pan-zoom';
import { ReactSVGPanZoom, type Tool, TOOL_PAN, type Value } from 'react-svg-pan-zoom';
import { Container } from './Elements/Container';
import { IContainerModel } from '../../Interfaces/IContainerModel';
import { type IContainerModel } from '../../Interfaces/IContainerModel';
import { Selector } from './Elements/Selector/Selector';
import { DepthDimensionLayer } from './Elements/DepthDimensionLayer';
import { MAX_FRAMERATE, SHOW_DIMENSIONS_PER_DEPTH } from '../../utils/default';
import { SymbolLayer } from './Elements/SymbolLayer';
import { ISymbolModel } from '../../Interfaces/ISymbolModel';
import { type ISymbolModel } from '../../Interfaces/ISymbolModel';
import { DimensionLayer } from './Elements/DimensionLayer';
interface ISVGProps {