diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index c4d941a..0000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,55 +0,0 @@ -engines: - checkstyle: - enabled: true - checks: - com.puppycrawl.tools.checkstyle.checks.sizes.LineLengthCheck: - enabled: false - fixme: - enabled: true - checks: - TODO: - enabled: false - csslint: - enabled: true - checks: - ids: - enabled: false - important: - enabled: false - order-alphabetical: - enabled: false - scss-lint: - enabled: true - checks: - ColorVariable: - enabled: false - Comment: - enabled: false - LeadingZero: - enabled: false - Indentation: - enabled: false - ImportantRule: - enabled: false - SelectorFormat: - enabled: false - StringQuotes: - enabled: false - VendorPrefix: - enabled: false - markdownlint: - enabled: true - checks: - MD013: - enabled: false - MD029: - enabled: false - MD030: - enabled: false - MD034: - enabled: false -exclude_patterns: - - "**/node_modules/" - - "src/scripts/libraries" - - "**/*.min.js" - - "**/*.min.css" diff --git a/.deepsource.toml b/.deepsource.toml deleted file mode 100644 index c44124e..0000000 --- a/.deepsource.toml +++ /dev/null @@ -1,31 +0,0 @@ -version = 1 - -exclude_patterns = [ - "# dependencies", - "**/node_modules/**", - "/.pnp", - ".pnp.js", - "# Build files", - "*.min.js", - "*.min.css", - "sw.js", - "*.js.map", - "# Packages", - "src/scripts/libraries/**", - "# misc", - ".DS_Store", - ".env.local", - ".env.development.local", - ".env.test.local", - ".env.production.local", - ".vscode", - "# workbox", - "workbox-config.js", - "src/serviceWorker/**", - "# Visual Studio Code", - ".vscode/**" -] - -[[analyzers]] -name = "javascript" -enabled = true diff --git a/.github/workflows/code-qa.yaml b/.github/workflows/code-qa-js.yaml similarity index 92% rename from .github/workflows/code-qa.yaml rename to .github/workflows/code-qa-js.yaml index 1a66fac..d3a4d63 100644 --- a/.github/workflows/code-qa.yaml +++ b/.github/workflows/code-qa-js.yaml @@ -1,7 +1,7 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: Code Quality Assurance +name: Code Quality Assurance - JavaScript permissions: contents: read @@ -26,9 +26,9 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - name: Cache Node.js modules diff --git a/.github/workflows/markdown-lint.yaml b/.github/workflows/code-qa-md.yaml similarity index 82% rename from .github/workflows/markdown-lint.yaml rename to .github/workflows/code-qa-md.yaml index 89d9bda..1cafe27 100644 --- a/.github/workflows/markdown-lint.yaml +++ b/.github/workflows/code-qa-md.yaml @@ -1,4 +1,4 @@ -name: Markdown Lint +name: Code Quality Assurance - Markdown permissions: contents: read @@ -9,14 +9,14 @@ on: - "**/*.md" - ".markdownlint.json" - ".markdownlintignore" - - ".github/workflows/markdown-lint.yaml" + - ".github/workflows/code-qa-md.yaml" pull_request: branches: [master] paths: - "**/*.md" - ".markdownlint.json" - ".markdownlintignore" - - ".github/workflows/markdown-lint.yaml" + - ".github/workflows/code-qa-md.yaml" jobs: lint-markdown: @@ -24,9 +24,9 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.node-version }} - name: Cache Node.js modules diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index a7a0cc1..9199647 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -45,11 +45,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v5 + uses: actions/checkout@v6 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -66,7 +66,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 # â„šī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -79,6 +79,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{matrix.language}}" diff --git a/README.md b/README.md index 24d19b8..1d4f1f3 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ Small Dev Talk is an independent news source that covers all things from the indie world of entertainment, from games to movies to books to technology and more. Our focus of Small Dev Talk is simply to give the chance of having upcoming developers show off their projects in forms of interviews which include images and video and present it to our audience. -[![Maintainability](https://api.codeclimate.com/v1/badges/ed11eb461733c807d580/maintainability)](https://codeclimate.com/github/AlexJSully/Small-Dev-Talk/maintainability) -[![CodeFactor](https://www.codefactor.io/repository/github/AlexJSully/small-dev-talk/badge)](https://www.codefactor.io/repository/github/AlexJSully/small-dev-talk) -[![DeepSource](https://deepsource.io/gh/AlexJSully/Small-Dev-Talk.svg/?label=active+issues&show_trend=true&token=XwOjH3ktxwG4kKUkE0GZK0_p)](https://deepsource.io/gh/AlexJSully/Small-Dev-Talk/?ref=repository-badge) [![Follow on Twitter](https://img.shields.io/twitter/follow/smalldevtalk?style=social)](https://twitter.com/smalldevtalk) [![GitHub repo size](https://img.shields.io/github/repo-size/AlexJSully/Small-Dev-Talk)](https://github.com/AlexJSully/Small-Dev-Talk) [![GitHub](https://img.shields.io/github/license/AlexJSully/Small-Dev-Talk)](https://github.com/AlexJSully/Small-Dev-Talk) @@ -22,7 +19,7 @@ To visit specific articles, just change the directory to end with '?' + article | Chrome | Firefox | Edge | Safari | Opera | Mobile | | ------ | ------- | ---- | ------ | ----- | ------ | -| ✔ | ✔ | ✔ | ? | ✔ | ✔ | +| ✔ | ✔ | ✔ | ? | ✔ | ✔ | ## Known issues @@ -43,7 +40,6 @@ If you want to support my work, you can through the following methods: - [BTC](3Lp4pwF5nXqwFA62BYx4DSvDswyYpskBog) - 3Lp4pwF5nXqwFA62BYx4DSvDswyYpskBog - [ETH](0xc6EB17BD7cbe5976Bfc4f845669cD66Ff340a1A2) - 0xc6EB17BD7cbe5976Bfc4f845669cD66Ff340a1A2 -- [PayPal](https://paypal.me/alexjsully) - paypal.me/alexjsully ## Contributing diff --git a/cypress/e2e/landing.cy.js b/cypress/e2e/landing.cy.js index 8743e67..fa7f6c9 100644 --- a/cypress/e2e/landing.cy.js +++ b/cypress/e2e/landing.cy.js @@ -30,7 +30,18 @@ describe("Landing Page", () => { it("should show error when article is missing", () => { // Simulate navigating to a missing article - cy.visit("http://localhost:3000/index.html?NonExistentArticle"); + cy.visit("http://localhost:3000/index.html?NonExistentArticle", { + onBeforeLoad(win) { + // Simulate service worker registration throwing a disallowed redirect error + Object.defineProperty(win.navigator, "serviceWorker", { + value: { + register: () => Promise.reject(new Error("disallowed redirect")), + }, + writable: true, + }); + }, + }); + cy.get("#articleBody").should("contain", "Error retrieving article"); cy.get("#articleBody").should("be.visible"); }); diff --git a/index.html b/index.html index 9e26957..239b6d4 100644 --- a/index.html +++ b/index.html @@ -115,14 +115,6 @@ -