Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikbossart committed Sep 15, 2023
1 parent cfd4f8e commit 3f6502c
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 21 deletions.
10 changes: 7 additions & 3 deletions example/src/plugins/job-ui-single/pages/CreateJobEntity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
splitAddress,
useDMSS,
} from '@development-framework/dm-core'
import {Button, Typography} from '@equinor/eds-core-react'
import { Button, Typography } from '@equinor/eds-core-react'
import { AxiosError, AxiosResponse } from 'axios'
import React, { useState } from 'react'
import { JobForm } from './JobForm'
Expand Down Expand Up @@ -112,14 +112,18 @@ export const CreateJobEntity = (props: TCreateJobEntityProps) => {

if (createdJobEntity) {
return (
<Typography>Job entity already created at location {jobEntityDestination} </Typography>
<Typography>
Job entity already created at location {jobEntityDestination}{' '}
</Typography>
)
}

return (
<div>
<Stack spacing={1}>
<Typography variant="h3">Create new object of type: {EBlueprint.JOB}</Typography>
<Typography variant="h3">
Create new object of type: {EBlueprint.JOB}
</Typography>
{defaultJobEntity ? (
<>
<Typography>
Expand Down
2 changes: 1 addition & 1 deletion example/src/plugins/job-ui-single/pages/JobControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
useJob,
} from '@development-framework/dm-core'
import React, { useState } from 'react'
import {Button, Chip, Icon, Typography} from '@equinor/eds-core-react'
import { Button, Chip, Icon, Typography } from '@equinor/eds-core-react'
import { stop, play } from '@equinor/eds-icons'

export const JobControl = (props: { jobEntityId: string }) => {
Expand Down
2 changes: 1 addition & 1 deletion example/src/plugins/job-ui-single/pages/JobForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
TValidEntity,
useBlueprint,
} from '@development-framework/dm-core'
import {Button, TextField, Typography} from '@equinor/eds-core-react'
import { Button, TextField, Typography } from '@equinor/eds-core-react'

import React, { ChangeEvent, useState } from 'react'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import React from 'react'
import styled from 'styled-components'
import {Typography} from "@equinor/eds-core-react";
import { Typography } from '@equinor/eds-core-react'

/*
* This component is from https://javascript.plainenglish.io/architecting-and-making-a-modal-with-react-75bf652ccc70
Expand Down Expand Up @@ -66,7 +66,7 @@ const ModalInner = ({
return (
<>
<ModalHeader>
<Typography variant='h2'>{data.dialog.title}</Typography>
<Typography variant="h2">{data.dialog.title}</Typography>
</ModalHeader>
<ModalContent {...data.props} />
</>
Expand Down
8 changes: 5 additions & 3 deletions packages/dm-core-plugins/src/header/HeaderPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
useDocument,
useUiPlugins,
} from '@development-framework/dm-core'
import {Icon, TopBar, Typography} from '@equinor/eds-core-react'
import { Icon, TopBar, Typography } from '@equinor/eds-core-react'
import React, { useEffect, useState } from 'react'
import styled from 'styled-components'

Expand Down Expand Up @@ -101,7 +101,7 @@ export default (props: IUIPlugin): JSX.Element => {

return (
<div>
<TopBar style={{marginBottom: '8px'}}>
<TopBar style={{ marginBottom: '8px' }}>
<TopBar.Header>
<ClickableIcon
onClick={() => {
Expand All @@ -110,7 +110,9 @@ export default (props: IUIPlugin): JSX.Element => {
>
<Icon data={grid_on} size={32} />
</ClickableIcon>
<Typography variant="h4" style={{ paddingLeft: 10 }}>{entity.label}</Typography>
<Typography variant="h4" style={{ paddingLeft: 10 }}>
{entity.label}
</Typography>
{appSelectorOpen && (
<RecipeSelector
selectableUiRecipeNames={
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dialog, useDMSS } from '@development-framework/dm-core'
import {Button, Radio, Typography} from '@equinor/eds-core-react'
import { Button, Radio, Typography } from '@equinor/eds-core-react'
import { AxiosResponse } from 'axios'
import React, { useContext, useState } from 'react'
import { AuthContext } from 'react-oauth2-code-pkce'
Expand Down
9 changes: 7 additions & 2 deletions packages/dm-core-plugins/src/job/JobControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
TJob,
useDMSS,
} from '@development-framework/dm-core'
import {Button, Label, Progress, Typography} from '@equinor/eds-core-react'
import { Button, Label, Progress, Typography } from '@equinor/eds-core-react'
import { AxiosError } from 'axios'
import React, { useContext, useEffect, useState } from 'react'
import { toast } from 'react-toastify'
Expand Down Expand Up @@ -290,7 +290,12 @@ export const JobControl = (props: {
marginTop: '25px',
}}
>
<Typography variant="h4" style={{ alignSelf: 'self-end', marginRight: '10px' }}>Logs:</Typography>
<Typography
variant="h4"
style={{ alignSelf: 'self-end', marginRight: '10px' }}
>
Logs:
</Typography>
<Button
style={{ height: '20px' }}
variant="outlined"
Expand Down
6 changes: 4 additions & 2 deletions packages/dm-core-plugins/src/job/JobInputEditPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '@development-framework/dm-core'
import * as React from 'react'
import { useEffect, useState } from 'react'
import {Typography} from "@equinor/eds-core-react";
import { Typography } from '@equinor/eds-core-react'

export const JobInputEditPlugin = (props: IUIPlugin) => {
const { idReference } = props
Expand Down Expand Up @@ -39,7 +39,9 @@ export const JobInputEditPlugin = (props: IUIPlugin) => {
padding: '30px',
}}
>
<Typography variant="body_short_bold">Can't edit job parameters after job has been started</Typography>
<Typography variant="body_short_bold">
Can't edit job parameters after job has been started
</Typography>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ export const ViewSelectorPlugin = (
/>
)}
<Content
style={{...(internalConfig.asSidebar ? {paddingLeft: '8px'} : {paddingTop: '8px'}), paddingRight: '8px'}}
style={{
...(internalConfig.asSidebar
? { paddingLeft: '8px' }
: { paddingTop: '8px' }),
paddingRight: '8px',
}}
type={type}
onOpen={addView}
formData={formData}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Button, Input, Typography} from '@equinor/eds-core-react'
import { Button, Input, Typography } from '@equinor/eds-core-react'
import React, { useState } from 'react'
import styled from 'styled-components'
import { AccessControlList, AccessLevel } from '../../services'
Expand Down
2 changes: 1 addition & 1 deletion packages/dm-core/src/components/EntityView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ErrorBoundary, ErrorGroup } from '../utils/ErrorBoundary'
import { useRecipe } from '../hooks'
import { IUIPlugin } from '../types'
import { Loading } from './Loading'
import {Typography} from "@equinor/eds-core-react";
import { Typography } from '@equinor/eds-core-react'

const Wrapper = styled.div`
align-self: start;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React, { useEffect, useState } from 'react'
import { InlineRecipeView } from './InlineRecipeView'
import { getTarget } from './utils'
import { AxiosResponse } from 'axios'
import {Typography} from "@equinor/eds-core-react";
import { Typography } from '@equinor/eds-core-react'

type TViewCreator = Omit<IUIPlugin, 'type'> & {
viewConfig: TViewConfig | TInlineRecipeViewConfig | TReferenceViewConfig
Expand Down
6 changes: 4 additions & 2 deletions packages/dm-core/src/utils/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react'
import styled from 'styled-components'
import {Typography} from "@equinor/eds-core-react";
import { Typography } from '@equinor/eds-core-react'

export const ErrorGroup = styled.div`
display: flex;
Expand Down Expand Up @@ -39,7 +39,9 @@ export class ErrorBoundary extends React.Component<

fallBack: (error: Error) => ReactNode = (error: Error) => (
<ErrorGroup>
<Typography variant="h5" color="red">{this.message}</Typography>
<Typography variant="h5" color="red">
{this.message}
</Typography>
<Message>{error.message}</Message>
</ErrorGroup>
)
Expand Down

0 comments on commit 3f6502c

Please sign in to comment.