Skip to content

Commit

Permalink
removed cra and installed vite
Browse files Browse the repository at this point in the history
eslint almost working need rules
  • Loading branch information
lowtorola committed Nov 25, 2024
1 parent 081bcd1 commit bda99b5
Show file tree
Hide file tree
Showing 21 changed files with 5,986 additions and 18,980 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up NodeJS environment
uses: actions/setup-node@v3
with:
node-version: '18.11.0'
node-version: '20.12.2'
# Consider this as an add on to optimize the execution of actions
- name: Cache node modules
id: cache-npm
Expand All @@ -50,9 +50,10 @@ jobs:
run: npm run lint
working-directory: ./frontend2
# Run test cases and this could ensure minimum coverage as well if set
- name: Execute test cases
run: npm run test
working-directory: ./frontend2
# This section should be un-commented when our frontend implements unit testing
# - name: Execute test cases
# run: npm run test
# working-directory: ./frontend2
lint:
name: Linter (pre-commit)
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions frontend2/.env.development
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
REACT_APP_THIS_URL=http://localhost:3000
REACT_APP_BACKEND_URL=http://localhost:8000
REACT_APP_REPLAY_URL=https://play.battlecode.org
VITE_THIS_URL=http://localhost:3000
VITE_BACKEND_URL=http://localhost:8000
VITE_REPLAY_URL=https://play.battlecode.org
6 changes: 3 additions & 3 deletions frontend2/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
REACT_APP_THIS_URL=https://play.battlecode.org
REACT_APP_BACKEND_URL=https://api.battlecode.org
REACT_APP_REPLAY_URL=https://play.battlecode.org
VITE_THIS_URL=https://play.battlecode.org
VITE_BACKEND_URL=https://api.battlecode.org
VITE_REPLAY_URL=https://play.battlecode.org
GENERATE_SOURCEMAP=false
71 changes: 0 additions & 71 deletions frontend2/.eslintrc.js

This file was deleted.

16 changes: 16 additions & 0 deletions frontend2/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
);
35 changes: 35 additions & 0 deletions frontend2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en" class="h-full bg-gray-100">

<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Web site created using create-vite" />
<link rel="apple-touch-icon" href="/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<title>Battlecode</title>
</head>

<body class="h-full">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
5 changes: 0 additions & 5 deletions frontend2/jest.config.js

This file was deleted.

Loading

0 comments on commit bda99b5

Please sign in to comment.