From d3780ed2e2350e3df3ccdf7e4184bff6a9dd1436 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:47:26 +0300 Subject: [PATCH 01/16] Create main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b2dfe43 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,2 @@ +- name: Lint Action + uses: wearerequired/lint-action@v2.3.0 From 7257657fe0186661476c67d6f6240b23ce752535 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 13:56:00 +0300 Subject: [PATCH 02/16] Create lint.yml --- .github/workflows/lint.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..f90f1ad --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,42 @@ +name: Lint + +on: + # Trigger the workflow on push or pull request, + # but only for the main branch + push: + branches: + - main + # Replace pull_request with pull_request_target if you + # plan to use this action with forks, see the Limitations section + pull_request: + branches: + - main + +# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token +permissions: + checks: write + contents: write + +jobs: + run-linters: + name: Run linters + runs-on: ubuntu-latest + + steps: + - name: Check out Git repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: 12 + + # ESLint and Prettier must be in `package.json` + - name: Install Node.js dependencies + run: npm ci + + - name: Run linters + uses: wearerequired/lint-action@v2 + with: + eslint: true + prettier: true From 02ff3e51e644337ec53a8d64332075861ac537a6 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:12:28 +0300 Subject: [PATCH 03/16] Update lint.yml --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f90f1ad..ee27128 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,7 +33,7 @@ jobs: # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies - run: npm ci + run: cd www && npm ci - name: Run linters uses: wearerequired/lint-action@v2 From 6b231c2a10bf31e67aa7a6a3d98bfc2d45addd7a Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:19:11 +0300 Subject: [PATCH 04/16] [MISC] removed dep --- www/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/www/package.json b/www/package.json index c0548e0..bee2a75 100644 --- a/www/package.json +++ b/www/package.json @@ -3,7 +3,6 @@ "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", From 413a49cd124a31374d9abc01e9df938259c5ce0b Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:19:57 +0300 Subject: [PATCH 05/16] [MISC] removed more deps --- www/package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/package.json b/www/package.json index bee2a75..33051bf 100644 --- a/www/package.json +++ b/www/package.json @@ -3,8 +3,6 @@ "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.8.2", From 942f0a0ecea4d002afa444c020dfea7f8077ad51 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:21:36 +0300 Subject: [PATCH 06/16] trying flag --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ee27128..c4a29af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,7 +33,7 @@ jobs: # ESLint and Prettier must be in `package.json` - name: Install Node.js dependencies - run: cd www && npm ci + run: cd www && npm ci --legacy-peer-deps - name: Run linters uses: wearerequired/lint-action@v2 From 26a366e090cc728e297f05ac449115d8785d166b Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:25:10 +0300 Subject: [PATCH 07/16] different linter --- .github/workflows/lint.yml | 118 ++++++++++++++++++++++++------------- .github/workflows/main.yml | 4 +- 2 files changed, 78 insertions(+), 44 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c4a29af..7fcfc03 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,42 +1,76 @@ -name: Lint - -on: - # Trigger the workflow on push or pull request, - # but only for the main branch - push: - branches: - - main - # Replace pull_request with pull_request_target if you - # plan to use this action with forks, see the Limitations section - pull_request: - branches: - - main - -# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token -permissions: - checks: write - contents: write - -jobs: - run-linters: - name: Run linters - runs-on: ubuntu-latest - - steps: - - name: Check out Git repository - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: 12 - - # ESLint and Prettier must be in `package.json` - - name: Install Node.js dependencies - run: cd www && npm ci --legacy-peer-deps - - - name: Run linters - uses: wearerequired/lint-action@v2 - with: - eslint: true - prettier: true +--- +############################# +############################# +## JavaScript Linter rules ## +############################# +############################# + +############ +# Env Vars # +############ +env: + browser: true + es6: true + jest: true + +############### +# Global Vars # +############### +globals: + Atomics: readonly + SharedArrayBuffer: readonly + +ignorePatterns: + - "!.*" + - "**/node_modules/.*" + +############### +# Parser vars # +############### +parser: '@typescript-eslint/parser' +parserOptions: + ecmaVersion: 2018 + sourceType: module + +########### +# Plugins # +########### +plugins: + - '@typescript-eslint' + +######### +# Rules # +######### +rules: { } + +############################## +# Overrides for JSON parsing # +############################## +overrides: + + # JSON files + - files: + - "*.json" + extends: + - plugin:jsonc/recommended-with-json + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON + + # JSONC files + - files: + - "*.jsonc" + extends: + - plugin:jsonc/recommended-with-jsonc + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSONC + + # JSON5 files + - files: + - "*.json5" + extends: + - plugin:jsonc/recommended-with-json5 + parser: jsonc-eslint-parser + parserOptions: + jsonSyntax: JSON5 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2dfe43..8ea56b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,2 +1,2 @@ -- name: Lint Action - uses: wearerequired/lint-action@v2.3.0 +- name: Super-Linter + uses: github/super-linter@v4.10.1 From f7054280ce391e8d1e023e7ccc28f8a8d6330920 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:27:15 +0300 Subject: [PATCH 08/16] filename --- .github/workflows/{lint.yml => .eslintrc.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{lint.yml => .eslintrc.yml} (100%) diff --git a/.github/workflows/lint.yml b/.github/workflows/.eslintrc.yml similarity index 100% rename from .github/workflows/lint.yml rename to .github/workflows/.eslintrc.yml From 686d622d662c4c42c1a1d1dc54b881cc2f169661 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:47:45 +0300 Subject: [PATCH 09/16] lint --- .github/workflows/linter.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..ccf82ba --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,51 @@ +--- +################################# +################################# +## Super Linter GitHub Actions ## +################################# +################################# +name: Lint Code Base + +############################# +# Start the job on all push # +############################# +on: + push: + branches-ignore: [master, main] + # Remove the line above to run when pushing to master + pull_request: + branches: [master, main] + +############### +# Set the Job # +############### +jobs: + build: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + ################## + # Load all steps # + ################## + steps: + ########################## + # Checkout the code base # + ########################## + - name: Checkout Code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper + # list of changed files within `super-linter` + fetch-depth: 0 + + ################################ + # Run Linter against code base # + ################################ + - name: Lint Code Base + uses: github/super-linter@v4 + env: + VALIDATE_ALL_CODEBASE: false + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 2c07b1871d0be274ed45c8dbe3f1bc3e1b4b537b Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:55:05 +0300 Subject: [PATCH 10/16] lint --- .github/workflows/linter.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ccf82ba..ab24571 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -10,9 +10,6 @@ name: Lint Code Base # Start the job on all push # ############################# on: - push: - branches-ignore: [master, main] - # Remove the line above to run when pushing to master pull_request: branches: [master, main] From 6f7f546472b25b103d748bd0cd14e8dca4d059e3 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 16:55:24 +0300 Subject: [PATCH 11/16] lint test --- www/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/src/App.js b/www/src/App.js index 1facc11..af92691 100644 --- a/www/src/App.js +++ b/www/src/App.js @@ -19,7 +19,7 @@ function App() {
- } /> + } /> } /> } /> } /> From 922c214eaec908d6f11249ee1d6357ed50f5e40f Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:10:32 +0300 Subject: [PATCH 12/16] lint test 2 --- www/src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/src/App.js b/www/src/App.js index af92691..dcf7d64 100644 --- a/www/src/App.js +++ b/www/src/App.js @@ -22,7 +22,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> } /> } /> From 25d0a179b1a132942c135e7bf2b1d583c39c97de Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:15:17 +0300 Subject: [PATCH 13/16] prettier --- .github/workflows/.eslintrc.yml | 76 --------------------------------- .github/workflows/linter.yml | 48 --------------------- .github/workflows/main.yml | 4 +- .github/workflows/prettier.yml | 25 +++++++++++ 4 files changed, 27 insertions(+), 126 deletions(-) delete mode 100644 .github/workflows/.eslintrc.yml delete mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/.eslintrc.yml b/.github/workflows/.eslintrc.yml deleted file mode 100644 index 7fcfc03..0000000 --- a/.github/workflows/.eslintrc.yml +++ /dev/null @@ -1,76 +0,0 @@ ---- -############################# -############################# -## JavaScript Linter rules ## -############################# -############################# - -############ -# Env Vars # -############ -env: - browser: true - es6: true - jest: true - -############### -# Global Vars # -############### -globals: - Atomics: readonly - SharedArrayBuffer: readonly - -ignorePatterns: - - "!.*" - - "**/node_modules/.*" - -############### -# Parser vars # -############### -parser: '@typescript-eslint/parser' -parserOptions: - ecmaVersion: 2018 - sourceType: module - -########### -# Plugins # -########### -plugins: - - '@typescript-eslint' - -######### -# Rules # -######### -rules: { } - -############################## -# Overrides for JSON parsing # -############################## -overrides: - - # JSON files - - files: - - "*.json" - extends: - - plugin:jsonc/recommended-with-json - parser: jsonc-eslint-parser - parserOptions: - jsonSyntax: JSON - - # JSONC files - - files: - - "*.jsonc" - extends: - - plugin:jsonc/recommended-with-jsonc - parser: jsonc-eslint-parser - parserOptions: - jsonSyntax: JSONC - - # JSON5 files - - files: - - "*.json5" - extends: - - plugin:jsonc/recommended-with-json5 - parser: jsonc-eslint-parser - parserOptions: - jsonSyntax: JSON5 \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index ab24571..0000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -################################# -################################# -## Super Linter GitHub Actions ## -################################# -################################# -name: Lint Code Base - -############################# -# Start the job on all push # -############################# -on: - pull_request: - branches: [master, main] - -############### -# Set the Job # -############### -jobs: - build: - # Name the Job - name: Lint Code Base - # Set the agent to run on - runs-on: ubuntu-latest - - ################## - # Load all steps # - ################## - steps: - ########################## - # Checkout the code base # - ########################## - - name: Checkout Code - uses: actions/checkout@v3 - with: - # Full git history is needed to get a proper - # list of changed files within `super-linter` - fetch-depth: 0 - - ################################ - # Run Linter against code base # - ################################ - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: master - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ea56b2..281c59c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,2 +1,2 @@ -- name: Super-Linter - uses: github/super-linter@v4.10.1 +- name: Prettier Action + uses: creyD/prettier_action@v4.3 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 0000000..8d5b5f5 --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,25 @@ +name: Continuous Integration + +on: + pull_request: + branches: [main] + +jobs: + prettier: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # Make sure the actual branch is checked out when running on pull requests + ref: ${{ github.head_ref }} + # This is important to fetch the changes to the previous commit + fetch-depth: 0 + + - name: Prettify code + uses: creyD/prettier_action@v4.2 + with: + # This part is also where you can pass other options, for example: + prettier_options: --write **/*.{js,md} + only_changed: True \ No newline at end of file From 5c4aff799f84f3ce4010d52ce53911e7f325c92c Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:15:45 +0300 Subject: [PATCH 14/16] jsx --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 8d5b5f5..512d753 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -21,5 +21,5 @@ jobs: uses: creyD/prettier_action@v4.2 with: # This part is also where you can pass other options, for example: - prettier_options: --write **/*.{js,md} + prettier_options: --write **/*.{js,jsx, md} only_changed: True \ No newline at end of file From 173028e26882f32463fa8afbc51b3f0aaeacae58 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:18:41 +0300 Subject: [PATCH 15/16] www --- .github/workflows/prettier.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 512d753..604b155 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -21,5 +21,6 @@ jobs: uses: creyD/prettier_action@v4.2 with: # This part is also where you can pass other options, for example: + working_directory: www prettier_options: --write **/*.{js,jsx, md} only_changed: True \ No newline at end of file From 0d579a049409bf3ca961f7e459504e5458c26df0 Mon Sep 17 00:00:00 2001 From: Kagan Ilbak <69756954+kagani@users.noreply.github.com> Date: Tue, 28 Mar 2023 17:19:59 +0300 Subject: [PATCH 16/16] t --- .github/workflows/prettier.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 604b155..512d753 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -21,6 +21,5 @@ jobs: uses: creyD/prettier_action@v4.2 with: # This part is also where you can pass other options, for example: - working_directory: www prettier_options: --write **/*.{js,jsx, md} only_changed: True \ No newline at end of file