From 58174e44d8f20c1539ef5e0b6dd7de21f4205a10 Mon Sep 17 00:00:00 2001 From: "Qian (Jim) Fu" Date: Mon, 2 Dec 2024 09:40:56 -0800 Subject: [PATCH] check in missing files --- client/.eslintrc | 5 +++++ client/eslint.config.mjs | 17 +++++++++++++++++ client/index.html | 20 ++++++++++++++++++++ client/src/vite-env.d.ts | 1 + client/vite.config.mts | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 client/.eslintrc create mode 100644 client/eslint.config.mjs create mode 100644 client/index.html create mode 100644 client/src/vite-env.d.ts create mode 100644 client/vite.config.mts diff --git a/client/.eslintrc b/client/.eslintrc new file mode 100644 index 0000000..1183378 --- /dev/null +++ b/client/.eslintrc @@ -0,0 +1,5 @@ +{ + "extends": [ + "react-app" + ] +} diff --git a/client/eslint.config.mjs b/client/eslint.config.mjs new file mode 100644 index 0000000..ba47e4d --- /dev/null +++ b/client/eslint.config.mjs @@ -0,0 +1,17 @@ +import { fixupConfigRules } from "@eslint/compat"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [{ + ignores: [], +}, ...fixupConfigRules(compat.extends("react-app"))]; \ No newline at end of file diff --git a/client/index.html b/client/index.html new file mode 100644 index 0000000..449d9b8 --- /dev/null +++ b/client/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + Medicare claims data sample app + + + +
+ + + diff --git a/client/src/vite-env.d.ts b/client/src/vite-env.d.ts new file mode 100644 index 0000000..151aa68 --- /dev/null +++ b/client/src/vite-env.d.ts @@ -0,0 +1 @@ +/// \ No newline at end of file diff --git a/client/vite.config.mts b/client/vite.config.mts new file mode 100644 index 0000000..e2ddcf5 --- /dev/null +++ b/client/vite.config.mts @@ -0,0 +1,38 @@ +/// +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react-swc'; +import eslint from 'vite-plugin-eslint'; + +// https://vitejs.dev/config/ +export default defineConfig({ + base: '/', + server: { + host: '0.0.0.0', + port: 3000, + proxy: { + '/api': { + target: 'http://server:3001', + changeOrigin: true, + }, + }, + }, + preview: { + host: '0.0.0.0', + // assume we don't start server in dev and preview mode at the same time + port: 3000, + proxy: { + '/api': { + target: 'http://server:3001', + changeOrigin: true, + }, + }, + }, + test: { + globals: true, + environment: "jsdom", + setupFiles: ["./src/setupTests.ts"], + }, + plugins: [ + react(), eslint() + ] +})