Skip to content

Commit 1fa4824

Browse files
committed
auto-linting
1 parent a183016 commit 1fa4824

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

src/cmem/ContentBlobToggler/StringPreviewContentBlobToggler.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import React from "react";
22

3-
import {
4-
ContentBlobToggler,
5-
ContentBlobTogglerProps,
6-
Markdown,
7-
utils,
8-
InlineText,
9-
} from "./../../../index";
3+
import { ContentBlobToggler, ContentBlobTogglerProps, InlineText, Markdown, utils } from "./../../../index";
104

115
export interface StringPreviewContentBlobTogglerProps
126
extends Omit<ContentBlobTogglerProps, "previewContent" | "enableToggler"> {
@@ -62,7 +56,9 @@ export function StringPreviewContentBlobToggler({
6256
firstNonEmptyLineOnly,
6357
}: StringPreviewContentBlobTogglerProps) {
6458
// need to test `firstNonEmptyLineOnly` until property is removed
65-
const useOnlyTest: StringPreviewContentBlobTogglerProps["useOnly"] = firstNonEmptyLineOnly ? "firstNonEmptyLine" : useOnly;
59+
const useOnlyTest: StringPreviewContentBlobTogglerProps["useOnly"] = firstNonEmptyLineOnly
60+
? "firstNonEmptyLine"
61+
: useOnly;
6662

6763
let previewString = content;
6864
switch (useOnlyTest) {
@@ -120,7 +116,7 @@ const regexFirstMarkdownSection = new RegExp("\r\n\r\n|\n\n"); // eslint-disable
120116
* Takes the first non-empty line from a preview string.
121117
*/
122118
function firstNonEmptyLine(preview: string) {
123-
return useOnlyPart(preview, regexFirstNonEmptyLine)
119+
return useOnlyPart(preview, regexFirstNonEmptyLine);
124120
}
125121

126122
/**
@@ -133,7 +129,6 @@ function useOnlyPart(preview: string, regexTest: RegExp): string {
133129
return result !== null ? result.input.slice(0, result.index) : previewString;
134130
}
135131

136-
137132
export const stringPreviewContentBlobTogglerUtils = {
138133
firstNonEmptyLine,
139134
};

src/components/Typography/InlineText.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22

3-
import { TestableComponent } from "../interfaces";
43
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
4+
import { TestableComponent } from "../interfaces";
55

66
export interface InlineTextProps extends React.HTMLAttributes<HTMLElement>, TestableComponent {
77
/**
@@ -13,20 +13,9 @@ export interface InlineTextProps extends React.HTMLAttributes<HTMLElement>, Test
1313
/**
1414
* Forces all children to be displayed as inline content.
1515
*/
16-
export const InlineText = ({
17-
className = "",
18-
children,
19-
...otherProps
20-
}: InlineTextProps) => {
21-
16+
export const InlineText = ({ className = "", children, ...otherProps }: InlineTextProps) => {
2217
return (
23-
<div
24-
{...otherProps}
25-
className={
26-
`${eccgui}-typography__inlinetext` +
27-
(className ? " " + className : "")
28-
}
29-
>
18+
<div {...otherProps} className={`${eccgui}-typography__inlinetext` + (className ? " " + className : "")}>
3019
{children}
3120
</div>
3221
);

0 commit comments

Comments
 (0)