-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Vite now that CRA is getting quite old
- Loading branch information
Showing
60 changed files
with
2,720 additions
and
8,422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { "targets": { "esmodules": true } }], // It's the name of the lib you installed | ||
["@babel/preset-react", { "runtime": "automatic" }], // It's the name of the lib you installed | ||
"@babel/preset-typescript" // It's the name of the lib you installed | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
{ ignores: ['dist'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="manifest" href="/manifest.json" /> | ||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> | ||
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"> | ||
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"> | ||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"> | ||
<meta name="description" content="defy.org: Calendar Hack" /> | ||
<meta name="theme-color" content="#ffffff"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>defy.org: Calendar Hack</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default { | ||
testEnvironment: "jest-environment-jsdom", // Same name of the lib you installed | ||
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"], // The file you created to extend jest config and "implement" the jest-dom environment in the jest globals | ||
moduleNameMapper: { | ||
"\\.(gif|ttf|eot|svg|png)$": "<rootDir>/test/__mocks__/fileMock.js", // The global stub for weird files | ||
"\\.(css|less|sass|scss)$": "identity-obj-proxy", // The mock for style related files | ||
"^@/(.*)$": "<rootDir>/src/$1", // [optional] Are you using aliases? | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import "@testing-library/jest-dom"; | ||
|
||
// nanoid gives a syntax error without this (see: https://github.com/ai/nanoid/issues/363) | ||
jest.mock("nanoid", () => { return { | ||
nanoid : ()=>{} | ||
} }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,72 @@ | ||
{ | ||
"name": "ch-bootstrap", | ||
"name": "calendar-hack", | ||
"version": "0.1.0", | ||
"homepage": "./", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc -b && vite build", | ||
"lint": "eslint .", | ||
"preview": "vite preview", | ||
"test": "jest --watchAll", | ||
"cov": "jest --coverage --collectCoverageFrom='src/**/*.{ts,tsx}'", | ||
"validatePlans": "bash bin/validatePlans", | ||
"pretty": "prettier src --write" | ||
}, | ||
"dependencies": { | ||
"copy-to-clipboard": "3.3.3", | ||
"cross-fetch": "4.0.0", | ||
"date-fns": "4.1.0", | ||
"dnd-core": "^16.0.1", | ||
"history": "5.3.0", | ||
"ics": "3.6.3", | ||
"ics": "3.8.1", | ||
"moo": "0.5.2", | ||
"rdndmb-html5-to-touch": "8.0.2", | ||
"react": "17.0.2", | ||
"rdndmb-html5-to-touch": "^7.1.3", | ||
"react": "^18.3.1", | ||
"react-datepicker": "6.6.0", | ||
"react-dnd": "^15.1.2", | ||
"react-dnd-multi-backend": "8.0.2", | ||
"react-dom": "17.0.2", | ||
"react-dnd": "^16.0.1", | ||
"react-dnd-multi-backend": "^8.1.2", | ||
"react-dom": "^18.3.1", | ||
"react-icons": "5.3.0", | ||
"react-scripts": "5.0.1", | ||
"styled-components": "6.1.8", | ||
"stylis": "4.0.0", | ||
"use-query-params": "2.2.1", | ||
"weekstart": "2.0.0" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"validatePlans": "bash bin/validatePlans" | ||
}, | ||
"eslintConfig": { | ||
"extends": [ | ||
"react-app" | ||
] | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
"resolutions": { | ||
"@types/react": "18.3.1", | ||
"@types/react-dom": "18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11", | ||
"@testing-library/jest-dom": "4.2.4", | ||
"@testing-library/react": "9.3.2", | ||
"@testing-library/user-event": "7.1.2", | ||
"@types/history": "5.0.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/moo": "^0.5.9", | ||
"@babel/core": "^7.26.0", | ||
"@babel/preset-env": "^7.26.0", | ||
"@babel/preset-react": "^7.26.3", | ||
"@babel/preset-typescript": "^7.26.0", | ||
"@eslint/js": "^9.17.0", | ||
"@testing-library/dom": "^10.0.0", | ||
"@testing-library/jest-dom": "^6.6.3", | ||
"@testing-library/react": "^16.1.0", | ||
"@testing-library/user-event": "^14.5.2", | ||
"@types/jest": "^29.5.14", | ||
"@types/moo": "^0.5.2", | ||
"@types/react": "^18.3.18", | ||
"@types/react-datepicker": "^6.2.0", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"prettier": "2.8.8", | ||
"@types/react-dom": "^18.3.5", | ||
"@vitejs/plugin-react": "^4.3.4", | ||
"babel-jest": "^29.7.0", | ||
"eslint": "^9.17.0", | ||
"eslint-plugin-react-hooks": "^5.0.0", | ||
"eslint-plugin-react-refresh": "^0.4.16", | ||
"globals": "^15.14.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"prettier": "3.4.2", | ||
"timezone-mock": "1.3.6", | ||
"typescript": "5.1.6" | ||
}, | ||
"resolutions": { | ||
"react-scripts/typescript": "5.1.6" | ||
"ts-node": "^10.9.2", | ||
"typescript": "~5.6.2", | ||
"typescript-eslint": "^8.18.2", | ||
"vite": "^6.0.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.