Skip to content

Commit

Permalink
feat: convert the entire project to Vite and Typescript
Browse files Browse the repository at this point in the history
Created a new project with Vite and copied all code and configuration over. Updated Dockerfile to
work with the vite dev server npm script. Made minimal amount of changes necessary to get the
project working. Will open new issues to address problems.

closes #26
  • Loading branch information
JacobTheEldest committed May 12, 2023
1 parent fc4192a commit b3feb24
Show file tree
Hide file tree
Showing 29 changed files with 7,801 additions and 22,227 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': 'warn',
},
};
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"editor.tabSize": 2,

"editor.formatOnSave": true,
"[javascript]": {
"[javascript, typescript, typescriptreact, json, jsonc, css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},

"eslint.experimental.useFlatConfig": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
"eslint.validate": ["javascript", "typescript"]
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ COPY . .

EXPOSE 3000

CMD [ "npm", "start" ]
CMD [ "npm", "run", "dev" ]
26 changes: 0 additions & 26 deletions eslint.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Minesweeper</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit b3feb24

Please sign in to comment.