Skip to content

Commit

Permalink
Merge branch 'sivicstudio:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MullerTheScientist authored Oct 5, 2024
2 parents 4bb90ea + c43c6f1 commit c5f05a2
Show file tree
Hide file tree
Showing 45 changed files with 1,009 additions and 514 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _Detailed description of proposed changes_

## Related Issue(s)

_Closes #<!-- issue number-->_
Closes #<!-- issue number-->
## Checklist:

- [ ] Read the [contributing docs](../CONTRIBUTING.md) (if this is your first contribution)
Expand All @@ -16,4 +16,4 @@ _Closes #<!-- issue number-->_
- [ ] Documented the changes in code (API docs will be generated automatically)


<!-- _Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request._-->
<!-- _Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request._-->
22 changes: 15 additions & 7 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: CI
name: Client Commitlint CI

CI=false npm run build

on: [push, pull_request]

Expand All @@ -11,11 +13,18 @@ jobs:
fetch-depth: 0
- name: Install required dependencies
run: |
apt update
apt install -y sudo
sudo apt-get update
sudo apt install -y sudo
sudo apt install -y git curl
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo DEBIAN_FRONTEND=noninteractive apt install -y nodejs
- name: Clear npm cache
run: npm cache clean --force

- name: Update npm
run: npm install -g npm@latest

- name: Print versions
run: |
git --version
Expand All @@ -26,11 +35,10 @@ jobs:
run: |
npm install conventional-changelog-conventionalcommits
npm install commitlint@latest
npm install --save-dev lint-staged
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
if: github.eventxname == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose
47 changes: 35 additions & 12 deletions client/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
// module.exports = {
// env: { browser: true, es2020: true },
// extends: [
// "eslint:recommended",
// "plugin:@typescript-eslint/recommended",
// "plugin:react-hooks/recommended",
// ],
// parser: "@typescript-eslint/parser",
// parserOptions: { ecmaVersion: "latest", sourceType: "module" },
// plugins: ["react-refresh"],
// rules: {
// "react-refresh/only-export-components": "warn",
// "@typescript-eslint/no-inferrable-types": "off",
// "no-mixed-spaces-and-tabs": 0,
// 'prefer-const': 'warn',
// '@typescript-eslint/no-empty-function': 'off',
// "@typescript-eslint/ban-types": "off",
// "@typescript-eslint/no-unused-vars": "warn",
// "@typescript-eslint/no-explicit-any": "warn"
// },
// };

module.exports = {
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": "warn",
},
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: { ecmaVersion: "latest", sourceType: "module" },
plugins: ["react-refresh"],
rules: {
"react-refresh/only-export-components": "warn",
},
ignorePatterns: ["src/dojo/typescript/models.gen.ts"],
};
16 changes: 9 additions & 7 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
"dev": "vite",
"build": "tsc && vite build",
"format": "prettier --ignore-path .gitignore --write \"**/*.+(js|ts|json)\"",

"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",

"preview": "vite preview",
"create-components": "npx /Users/os/Documents/code/dojo/dojo.js/packages/core/bin/generateComponents.cjs ../../dojo-starter/manifests/dev/deployment/manifest.json src/dojo/generated/contractComponents.ts http://localhost:5050 0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8"
},
"dependencies": {
"@apollo/client": "^3.11.8",
"@dojoengine/core": "1.0.0-alpha.5",
"@dojoengine/create-burner": "1.0.0-alpha.5",
"@dojoengine/react": "1.0.0-alpha.5",
"@dojoengine/core": "1.0.0-alpha.14",
"@dojoengine/create-burner": "1.0.0-alpha.14",
"@dojoengine/react": "1.0.0-alpha.14",
"@dojoengine/recs": "2.0.13",
"@dojoengine/state": "1.0.0-alpha.5",
"@dojoengine/torii-client": "1.0.0-alpha.5",
"@dojoengine/utils": "1.0.0-alpha.5",
"@dojoengine/state": "1.0.0-alpha.14",
"@dojoengine/torii-client": "1.0.0-alpha.14",
"@dojoengine/utils": "1.0.0-alpha.14",
"@latticexyz/react": "^2.0.12",
"@latticexyz/utils": "^2.0.12",
"@starknet-react/chains": "^0.1.7",
Expand Down Expand Up @@ -57,4 +59,4 @@
"typescript": "^5.5.4",
"vite": "^4.3.9"
}
}
}
64 changes: 32 additions & 32 deletions client/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/scripts/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DOJO_MANIFEST_PATH=../onchain/scarb.toml sozo build --typescript --bindings-output=./src/dojo
1 change: 1 addition & 0 deletions client/scripts/gen_cc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx @dojoengine/core ../onchain/manifests/dev/deployment/manifest.json ./_dojo http://localhost:5050 0x4e4a8cb96198772361acc30c71d81768bccc6c29501f211b0f0ca7045b194a4
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const App = () => {
setBoard(newBoard);
};

const setGameData = useCallback((game: any) => {
const setGameData = useCallback((game: object) => {
setGameState(game);
}, []);

Expand Down
2 changes: 2 additions & 0 deletions client/src/components/Control.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const Control = ({
}: {
toggleActiveWindow: (window: string) => void;
}) => {

/* eslint-disable @typescript-eslint/no-unused-vars */
const [windows, setWindows] = useState(
WINDOW_CONFIGS.map((config) => ({ ...config, show: false, zIndex: 0 }))
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import Draggable from "react-draggable";
import { FiXSquare } from "react-icons/fi";
import "../../styles/ControlWindowLayout.scss";

Expand Down
Loading

0 comments on commit c5f05a2

Please sign in to comment.