Skip to content

Commit

Permalink
Add github CI checks for linting (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
norswap authored Feb 22, 2024
2 parents a980cd7 + f63f419 commit cc800d5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check project

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- run: make setup
- run: make check

2 changes: 1 addition & 1 deletion packages/webapp/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ComponentWrapper = ({
const errorConfig = useErrorConfig()

// todo @eviterin: i've understood it so that decks are stored on chain. thus, below part is not going to be needed.
const testCards = [];
const _testCards = [];
const [decks, setDecks] = useState<Deck[]>([]);
//

Expand Down
4 changes: 2 additions & 2 deletions packages/webapp/src/pages/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Editor: FablePage = ({ decks, setDecks, isHydrated }) => {
} else {
setOriginalDeckIndex(null) // Reset if not editing an existing deck
}
}, [router.query.index, decks])
}, [decks])

const isCardInDeck = (cardToCheck: Card) => {
return deck.some(cardInDeck => cardInDeck.id === cardToCheck.id)
Expand Down Expand Up @@ -121,7 +121,7 @@ const Editor: FablePage = ({ decks, setDecks, isHydrated }) => {

setIsDeckValid(true)

let updatedDecks = [...decks]
const updatedDecks = [...decks]

// Check if editing an existing deck and the name has changed
if (originalDeckIndex !== null && decks[originalDeckIndex].name !== deckName) {
Expand Down

0 comments on commit cc800d5

Please sign in to comment.