Skip to content

Commit

Permalink
Fix linting issues #35
Browse files Browse the repository at this point in the history
  • Loading branch information
alansemenov committed Oct 1, 2024
1 parent 0eac1ff commit a1a261c
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/RichText/ErrorBoundary/ErrorBoundaryClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
return {hasError: true};
}

componentDidCatch(error, errorInfo) {
componentDidCatch(error, _errorInfo) {
// Log the error to an error reporting service console
this.setState({error});
}
Expand Down
3 changes: 0 additions & 3 deletions src/RichText/ErrorComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import type {ReactNode} from 'react';


import React from 'react';


export function ErrorComponent({
children,
}: {
Expand Down
1 change: 0 additions & 1 deletion src/RichText/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {LinkComponentParams} from '../types';


// import React from 'react';
// import {parse} from 'uri-js';


Expand Down
3 changes: 0 additions & 3 deletions src/RichText/Macro.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// import React from 'react';


import type {MacroComponentParams} from '../types';

export function Macro({
Expand Down
4 changes: 3 additions & 1 deletion src/RichText/cssToReactStyle.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';

export function cssToReactStyle(cssString?: string): React.CSSProperties {

if (!cssString) {
return {};
}

const styleObject: React.CSSProperties = {};
const styleObject: Record<string, unknown> = {};
const rules = cssString.split(';');

rules.forEach((rule) => {
Expand Down
1 change: 0 additions & 1 deletion src/RichText/replaceImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type {Element} from 'domhandler';
import type {ImageComponent, ImageData, ImageComponentParams} from '../types';


import React from 'react';
import {IMG_ATTR} from '../constants';
import {cssToReactStyle} from './cssToReactStyle';
import {ErrorComponent} from './ErrorComponent';
Expand Down
1 change: 0 additions & 1 deletion src/RichText/replaceLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type {DOMNode} from 'html-react-parser';
import {domToReact} from 'html-react-parser';
import type {LinkComponent, ImageComponent, MacroComponent, Replacer, RichTextData, LinkComponentParams} from '../types';
import type {createReplacer as CreateReplacer} from './createReplacer';
import React from 'react';
import {LINK_ATTR} from '../constants';
import {ErrorComponent} from './ErrorComponent';
import {ErrorBoundaryWrapper} from './ErrorBoundary/ErrorBoundaryWrapper';
Expand Down
1 change: 0 additions & 1 deletion src/RichText/replaceMacro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type {Element} from 'domhandler';
import type {MacroComponent, MacroComponentParams, RichTextData, ImageComponent, LinkComponent, Replacer} from '../types';


import React from 'react';
import {MACRO_ATTR} from '../constants';
import {ErrorComponent} from './ErrorComponent';
import {domToReact, type DOMNode} from 'html-react-parser';
Expand Down

0 comments on commit a1a261c

Please sign in to comment.