Skip to content

Commit

Permalink
ci(ui): add lint ci (#63)
Browse files Browse the repository at this point in the history
* ci(ui): add lint ci

* ci(ui): add lint ci

* chore: update cache dep path

* chore: adj path

* chore: working dir

* chore: working dir

* chore: gen api
  • Loading branch information
shhdgit authored Mar 27, 2024
1 parent 1d00a68 commit 01ff9e5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI UI

on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
cache-dependency-path: "**/yarn.lock"

- name: Run lint
working-directory: ./ui
run: |
yarn --frozen-lockfile
yarn gen:api
yarn lint
1 change: 1 addition & 0 deletions ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/api/**/*
1 change: 0 additions & 1 deletion ui/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = {
},
plugins: ['react-refresh', 'import'],
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
Expand Down
1 change: 1 addition & 0 deletions ui/src/modules/app_builder/Block/Secret.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const Secret: React.FC<SlotTypeComponentProps> = ({ slot, formPath, disab
const { register } = useFormContext()
useEffect(() => {
register(`${formPath}.name`, { value: 'Secret' })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return (
<Controller
Expand Down
2 changes: 2 additions & 0 deletions ui/src/modules/app_builder/Canvas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const BuilderCanvas: React.FC<BuilderCanvasProps> = ({
return
}
initApp.current({ config, blockMap, metadata, interaction, errorInteraction, needFitview: false })
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [interaction, errorInteraction])

// manipulate nodes
Expand Down Expand Up @@ -148,6 +149,7 @@ export const BuilderCanvas: React.FC<BuilderCanvasProps> = ({
})
onConnect(params)
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[getNodeType, setEdges]
)

Expand Down

0 comments on commit 01ff9e5

Please sign in to comment.