Skip to content

Commit

Permalink
missed u prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
cdriesler committed Apr 11, 2023
1 parent e547e10 commit deb23e9
Show file tree
Hide file tree
Showing 142 changed files with 1,346 additions and 1,231 deletions.
59 changes: 24 additions & 35 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
module.exports = {
env: {
node: true
node: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
"plugin:jsx-a11y/recommended",
'prettier'
],
ignorePatterns: [
'*.js',
'*.json',
'*.spec.ts',
'build',
'dist',
'node_modules'
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['*.js', '*.json', '*.spec.ts', 'build', 'dist', 'node_modules'],
overrides: [
{
files: [
"*.ts",
"*.tsx"
],
files: ['*.ts', '*.tsx'],
rules: {
"no-unused-vars": "off",
"@typescript-eslint/explicit-module-boundary-types": [
0
],
"@typescript-eslint/no-unused-vars": [
"warn",
'no-unused-vars': 'off',
'@typescript-eslint/explicit-module-boundary-types': [0],
'@typescript-eslint/no-unused-vars': [
'warn',
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
}
}
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand All @@ -45,11 +33,12 @@ module.exports = {
'./tsconfig.eslint.json',
'./apps/nodepen-client/tsconfig.json',
'./packages/core/tsconfig.json',
'./packages/nodes/tsconfig.json'
]
'./packages/nodes/tsconfig.json',
],
},
plugins: [
'@typescript-eslint'
],
root: true
}
plugins: ['@typescript-eslint', 'prettier'],
root: true,
rules: {
"prettier/prettier": "error"
}
}
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type { Document, DocumentNode } from './types'
export type { DataTree, DataTreePath, DataTreeStructure, DataTreeValue, DataTreeValueType } from './types/data'
export type { SolutionData } from './types/solution'
export type { NodeTemplate, PortTemplate } from './types/templates'
export type { NodeTemplate, PortTemplate } from './types/templates'
8 changes: 4 additions & 4 deletions packages/core/src/templates/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const library = {
'grasshopper': {
grasshopper: {
'1': null,
'2': null
}
}
'2': null,
},
}
4 changes: 2 additions & 2 deletions packages/core/src/types/data/DataTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import type { DataTreePath } from './DataTreePath'
import type { DataTreeValue } from './DataTreeValue'

export type DataTree = {
[key: DataTreePath]: DataTreeValue[]
}
[key: DataTreePath]: DataTreeValue[]
}
2 changes: 1 addition & 1 deletion packages/core/src/types/data/DataTreePath.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type DataTreePath = `{${number}}` | `{${DataTreePathIndex}${number}}`

type DataTreePathIndex = `${number};`
type DataTreePathIndex = `${number};`
2 changes: 1 addition & 1 deletion packages/core/src/types/data/DataTreeStructure.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type DataTreeStructure = 'empty' | 'single' | 'list' | 'tree'
export type DataTreeStructure = 'empty' | 'single' | 'list' | 'tree'
40 changes: 20 additions & 20 deletions packages/core/src/types/data/DataTreeValue.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import type * as GH from './geometry'

export type DataTreeValue =
| {
type: 'boolean'
value: boolean
}
| {
type: 'integer' | 'number'
value: number
}
| {
type: 'string'
value: string
}
| {
type: 'circle'
value: {
| {
type: 'boolean'
value: boolean
}
| {
type: 'integer' | 'number'
value: number
}
| {
type: 'string'
value: string
}
| {
type: 'circle'
value: {
center: GH.Point
circumference: number
diameter: number
plane: GH.Plane
radius: number
}
}
| {
type: 'curve' | 'box' | 'surface'
value: string
}
}
| {
type: 'curve' | 'box' | 'surface'
value: string
}
2 changes: 1 addition & 1 deletion packages/core/src/types/data/DataTreeValueType.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import type { DataTreeValue } from './DataTreeValue'

export type DataTreeValueType = DataTreeValue['type']
export type DataTreeValueType = DataTreeValue['type']
14 changes: 7 additions & 7 deletions packages/core/src/types/data/geometry/Plane.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { Point3d } from './Point3d'

export type Plane = {
origin: Point3d
axis: {
x: Point3d
y: Point3d
z: Point3d
}
}
origin: Point3d
axis: {
x: Point3d
y: Point3d
z: Point3d
}
}
8 changes: 4 additions & 4 deletions packages/core/src/types/data/geometry/Point3d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type Point3d = {
x: number
y: number
z: number
}
x: number
y: number
z: number
}
2 changes: 1 addition & 1 deletion packages/core/src/types/data/geometry/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type { Plane } from './Plane'
export type { Point3d as Point } from './Point3d'
export type { Point3d as Point } from './Point3d'
2 changes: 1 addition & 1 deletion packages/core/src/types/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export type { DataTree } from './DataTree'
export type { DataTreePath } from './DataTreePath'
export type { DataTreeStructure } from './DataTreeStructure'
export type { DataTreeValue } from './DataTreeValue'
export type { DataTreeValueType } from './DataTreeValueType'
export type { DataTreeValueType } from './DataTreeValueType'
2 changes: 1 addition & 1 deletion packages/core/src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type { Document } from './Document'
export type { DocumentNode } from './DocumentNode'
export type { DocumentNode } from './DocumentNode'
22 changes: 11 additions & 11 deletions packages/core/src/types/solution/SolutionData.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { DataTree } from '../data'

export type SolutionData = {
id: string
manifest: {
runtimeMessages: {
[portInstanceId: string]: string
}
streamObjectIds: string[]
id: string
manifest: {
runtimeMessages: {
[portInstanceId: string]: string
}
values: {
[nodeInstanceId: string]: {
[portInstanceId: string]: DataTree
}
streamObjectIds: string[]
}
values: {
[nodeInstanceId: string]: {
[portInstanceId: string]: DataTree
}
}
}
}
2 changes: 1 addition & 1 deletion packages/core/src/types/solution/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export type { SolutionData } from './SolutionData'
export type { SolutionData } from './SolutionData'
2 changes: 1 addition & 1 deletion packages/core/src/types/templates/NodeTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export type NodeTemplate = {
isObsolete: boolean
inputs: PortTemplate[]
outputs: PortTemplate[]
}
}
2 changes: 1 addition & 1 deletion packages/core/src/types/templates/PortTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export type PortTemplate = {
isOptional: boolean
}

export type PortDirection = 'input' | 'output'
export type PortDirection = 'input' | 'output'
2 changes: 1 addition & 1 deletion packages/core/src/types/templates/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export type { NodeTemplate } from './NodeTemplate'
export type { PortTemplate } from './PortTemplate'
export type { PortTemplate } from './PortTemplate'
2 changes: 1 addition & 1 deletion packages/nodes/src/components/annotations/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import AnnotationsContainer from './AnnotationsContainer'

export { AnnotationsContainer }
export { AnnotationsContainer }
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ export const WirePortal = ({ children }: WirePortalProps): React.ReactElement |
}

return createPortal(children, wiresContainerRef.current)
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { WirePortal } from './WirePortal'
export { WirePortal } from './WirePortal'
2 changes: 1 addition & 1 deletion packages/nodes/src/components/annotations/wire/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import Wire from './Wire'

export { Wire }
export { Wire }
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ControlsContainerLayout = ({ children }: LayoutProps): React.ReactElement
<div className="np-w-full np-h-full np-overflow-hidden np-absolute np-flex np-flex-row np-justify-start np-items-center np-pointer-events-none np-z-50">
<div className="np-h-full np-w-72 np-p-4 np-flex np-flex-col">
<div id="np-control-panels" className="np-w-full np-flex-grow np-flex np-flex-col">
<div ref={shadowResizeProxyRef} className='np-w-full np-flex np-flex-col'>
<div ref={shadowResizeProxyRef} className="np-w-full np-flex np-flex-col">
{children}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ type ControlPanelProps = {
}

export const ControlPanel = ({ children, disablePadding }: ControlPanelProps): React.ReactElement => {
const shadowTargetRef = usePseudoShadow("controls")
const shadowTargetRef = usePseudoShadow('controls')

return (
<div
ref={shadowTargetRef}
className={`${disablePadding ? '' : 'np-p-4'} np-w-full np-mb-3 np-bg-green np-rounded-md np-shadow-main np-pointer-events-auto`}
className={`${
disablePadding ? '' : 'np-p-4'
} np-w-full np-mb-3 np-bg-green np-rounded-md np-shadow-main np-pointer-events-auto`}
>
{children}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
import React from 'react'

type ControlPanelHeaderProps = {
icon: React.ReactNode
label: string
sublabel?: string
onClickMenu: () => void
icon: React.ReactNode
label: string
sublabel?: string
onClickMenu: () => void
}

export const ControlPanelHeader = ({ icon, label, sublabel }: ControlPanelHeaderProps) => {
return (
<div className={`np-w-full ${sublabel ? 'np-mb-3' : 'np-mb-4'} last:np-mb-0 np-flex np-flex-col np-justify-start`}>
<div className='np-w-full np-h-6 np-flex np-justify-start np-items-center'>
<div className='np-w-8 np-mr-1 np-flex np-items-center np-justify-center'>
{icon}
</div>
<h3 className='np-font-sans np-text-md np-text-darkgreen np-select-none -np-translate-y-px'>{label}</h3>
</div>
{sublabel ? (
<div className='np-w-full np-pl-9 np-flex np-justify-start np-items-center'>
<p className='np-font-sans np-text-sm np-text-darkgreen np-font-light np-select-none'>{sublabel}</p>
</div>
) : null}
return (
<div className={`np-w-full ${sublabel ? 'np-mb-3' : 'np-mb-4'} last:np-mb-0 np-flex np-flex-col np-justify-start`}>
<div className="np-w-full np-h-6 np-flex np-justify-start np-items-center">
<div className="np-w-8 np-mr-1 np-flex np-items-center np-justify-center">{icon}</div>
<h3 className="np-font-sans np-text-md np-text-darkgreen np-select-none -np-translate-y-px">{label}</h3>
</div>
{sublabel ? (
<div className="np-w-full np-pl-9 np-flex np-justify-start np-items-center">
<p className="np-font-sans np-text-sm np-text-darkgreen np-font-light np-select-none">{sublabel}</p>
</div>
)
}
) : null}
</div>
)
}
2 changes: 1 addition & 1 deletion packages/nodes/src/components/controls/common/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { ControlPanel } from './ControlPanel'
export { ControlPanelHeader } from './ControlPanelHeader'
export { NavigationButton } from './NavigationButton'
export { NavigationIcon } from './NavigationIcon'
export { NavigationIcon } from './NavigationIcon'
2 changes: 1 addition & 1 deletion packages/nodes/src/components/controls/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import ControlsContainer from './ControlsContainer'

export { ControlsContainer }
export { ControlsContainer }
2 changes: 1 addition & 1 deletion packages/nodes/src/components/controls/navigation/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { DownloadButton } from './DownloadButton'
export { LikeButton } from './LikeButton'
export { HelpButton } from './HelpButton'
export { ShareButton } from './ShareButton'
export { ShareButton } from './ShareButton'
Loading

0 comments on commit deb23e9

Please sign in to comment.