Commit 4211f144 authored by Chunchi Che's avatar Chunchi Che

add lint check

parent 69b0f005
Pipeline #17368 passed with stages
in 2 minutes and 14 seconds
{
"parser": "@typescript-eslint/parser",
"extends": ["plugin:prettier/recommended"],
"plugins": ["@typescript-eslint"],
"rules": {
"eqeqeq": 0
"eqeqeq": 0,
"no-var": "error",
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
]
}
}
stages:
- lint
- build
- test
- deploy
variables:
GIT_DEPTH: "1"
before_script:
- npm ci
npm_lint:
stage: lint
tags:
- linux
script: npm run lint
npm_build:
stage: build
tags:
- linux
script:
- npm ci
- npm run build
script: npm run build
# npm_test:
# stage: test
......
This diff is collapsed.
......@@ -21,13 +21,13 @@
"react-scripts": "^5.0.1",
"socket.io-client": "^4.5.1",
"three": "^0.145.0",
"typescript": "^4.7.4",
"web-vitals": "^2.1.4"
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint --ext .ts --ext .tsx src",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
......@@ -52,7 +52,14 @@
"devDependencies": {
"@types/google-protobuf": "^3.15.6",
"@types/three": "^0.144.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"@vitejs/plugin-react": "^2.1.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1",
"typescript": "^4.8.4",
"vite": "^3.1.0"
}
}
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { RootState } from "../store";
export type Player = {
export interface Player {
name?: string;
state?: string;
isHost?: boolean;
};
}
export interface playerState {
player0: Player;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment