From 6f4b70e2828547d957ea7bd3a5a1df915cbada70 Mon Sep 17 00:00:00 2001 From: Ron <66834451+SyniRon@users.noreply.github.com> Date: Sun, 3 Sep 2023 22:37:37 -0400 Subject: [PATCH] Formatting and minor work (#37) * prettier * remove .env from git * add linter * add eslint and build check * fix css for logo centering * remember to install * linter fix * maybe fix for eslint * remove unused extends * remove eslint * Fix prettier yaml * pin prettier version * fix formatting --- .github/workflows/build_check.yml | 43 ++ .github/workflows/lint_format.yml | 28 + .github/workflows/prod_url_check.yml | 16 +- client/.env | 1 - client/.gitignore | 1 + client/package-lock.json | 2 +- client/package.json | 2 +- client/public/index.html | 30 +- client/public/manifest.json | 2 +- client/src/App.css | 215 +++--- client/src/App.js | 462 +++++++++---- client/src/App.test.js | 6 +- client/src/credentials/example_token.js | 5 +- client/src/index.css | 9 +- client/src/index.js | 12 +- client/src/index.module.css | 8 +- client/src/modules/Generic/ArrayBuilder.js | 8 +- client/src/modules/Generic/BilletBank.js | 727 +++++++++++++++++++-- client/src/modules/Generic/MilpacParse.js | 387 +++++------ client/src/reportWebVitals.js | 4 +- client/src/setupTests.js | 2 +- package.json | 2 +- server/controllers/cRequest.js | 14 +- server/controllers/cacheManager.js | 81 +-- server/controllers/rRequest.js | 16 +- server/credentials/example_token.js | 7 +- server/routes/index.js | 12 +- server/server.js | 35 +- 28 files changed, 1503 insertions(+), 634 deletions(-) create mode 100644 .github/workflows/build_check.yml create mode 100644 .github/workflows/lint_format.yml delete mode 100644 client/.env diff --git a/.github/workflows/build_check.yml b/.github/workflows/build_check.yml new file mode 100644 index 0000000..6d94484 --- /dev/null +++ b/.github/workflows/build_check.yml @@ -0,0 +1,43 @@ +# This is a basic workflow to help you get started with Actions + +name: BUILD_CHECK + +# Controls when the workflow will run +on: + pull_request: + branches: + - main + paths: + - ".github/workflows/client_adr_push.yml" + - "client/**" + - "config/client/**" + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # deployment + client_deployment: + # The type of runner that the job will run on + runs-on: ubuntu-latest + env: + REACT_APP_CLIENT_TOKEN: ${{ secrets.CLIENT_TOKEN }} + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout the Repo + uses: actions/checkout@v3 + + - name: Setup node.js + uses: actions/setup-node@v3 + + - name: Install Dependancies + run: npm i + working-directory: client + + - name: Update Browserlist + run: npx browserslist@latest --update-db + working-directory: client + + - name: Build Client to Prod + run: npm run build + working-directory: client diff --git a/.github/workflows/lint_format.yml b/.github/workflows/lint_format.yml new file mode 100644 index 0000000..91c498d --- /dev/null +++ b/.github/workflows/lint_format.yml @@ -0,0 +1,28 @@ +# This is a basic workflow to help you get started with Actions + +name: LINT_FORMAT_CHECK + +# Controls when the workflow will run +on: + pull_request: + branches: + - main + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # deployment + lint_format_check: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout the Repo + uses: actions/checkout@v3 + + - name: Prettiier + uses: creyD/prettier_action@v4.3 + with: + prettier_options: "--check {**/*,*}.{js,jsx,json,html,css,yml,yaml}" + prettier_version: "2.8.8" diff --git a/.github/workflows/prod_url_check.yml b/.github/workflows/prod_url_check.yml index 811cac0..6057da7 100644 --- a/.github/workflows/prod_url_check.yml +++ b/.github/workflows/prod_url_check.yml @@ -1,15 +1,15 @@ name: PROD_URL_CHECK on: - pull_request: - branches: [ main ] - paths: - - 'client/src/App.js' + pull_request: + branches: [main] + paths: + - "client/src/App.js" jobs: - check-url: - runs-on: ubuntu-latest - steps: + check-url: + runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 - name: Check API URL @@ -19,4 +19,4 @@ jobs: exit 1 else echo "Production API URL is present and not commented out." - fi \ No newline at end of file + fi diff --git a/client/.env b/client/.env deleted file mode 100644 index 1551f96..0000000 --- a/client/.env +++ /dev/null @@ -1 +0,0 @@ -WDS_SOCKET_PORT=0 \ No newline at end of file diff --git a/client/.gitignore b/client/.gitignore index 0d92c3f..7f70aa0 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -19,6 +19,7 @@ credentials/token.js .env.development.local .env.test.local .env.production.local +client/.env npm-debug.log* yarn-debug.log* diff --git a/client/package-lock.json b/client/package-lock.json index da89d9a..6299861 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -27147,4 +27147,4 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } -} \ No newline at end of file +} diff --git a/client/package.json b/client/package.json index 147a1ed..c0e7092 100644 --- a/client/package.json +++ b/client/package.json @@ -37,4 +37,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} diff --git a/client/public/index.html b/client/public/index.html index 3d455ef..8f5b2ca 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -1,19 +1,17 @@ +
+ + + + + + +