Skip to content

chore: update dependencies and update ESLint configuration#25

Open
rmarkins-godaddy wants to merge 3 commits into
mainfrom
rm/updates
Open

chore: update dependencies and update ESLint configuration#25
rmarkins-godaddy wants to merge 3 commits into
mainfrom
rm/updates

Conversation

@rmarkins-godaddy
Copy link
Copy Markdown

  • Removed the ESLint configuration file (.eslintrc).
  • Updated package-lock.json to reflect dependency upgrades, including @godaddy/terminus to version 4.12.1 and eslint to version 9.24.0.
  • Modified package.json scripts for coverage and linting to use updated tools.
  • Updated test file to use Node.js built-in testing utilities instead of external libraries like chai and sinon.
Checklist

- Removed the ESLint configuration file (.eslintrc).
- Updated package-lock.json to reflect dependency upgrades, including @godaddy/terminus to version 4.12.1 and eslint to version 9.24.0.
- Modified package.json scripts for coverage and linting to use updated tools.
- Updated test file to use Node.js built-in testing utilities instead of external libraries like chai and sinon.
@rmarkins-godaddy rmarkins-godaddy requested review from a team and Copilot May 20, 2025 19:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates development tooling and test setup by removing the old ESLint file, upgrading dependencies, switching to Node’s built-in test runner, and adding CI/dependabot configs.

  • Removed .eslintrc and introduced a flat eslint.config.js
  • Replaced chai/sinon in tests with node:test mocks and assert
  • Added GitHub Actions CI matrix and Dependabot weekly updates

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 4 comments.

File Description
lib/index.test.js Updated tests to use node:test mocks & assert instead of Chai/Sinon
eslint.config.js Introduced flat ESLint config with dynamic import of Godaddy preset
.github/workflows/ci.yaml Set up CI workflow with Node.js version matrix, lint/build/test steps
.github/dependabot.yml Configured Dependabot for weekly npm updates
Files not reviewed (4)
  • .eslintrc: Language not supported
  • .github/CODEOWNERS: Language not supported
  • .nvmrc: Language not supported
  • package.json: Language not supported

Comment thread lib/index.test.js
Comment thread lib/index.test.js Outdated
Comment thread eslint.config.js Outdated
Comment thread eslint.config.js
@rmarkins-godaddy rmarkins-godaddy requested a review from Copilot May 20, 2025 22:58
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates dependencies, migrates tests to Node’s built-in test runner, and modernizes ESLint configuration.

  • Replace Chai/Sinon in tests with node:test and node:assert
  • Remove legacy .eslintrc and add eslint.config.js using defineConfig
  • Add GitHub Actions CI and Dependabot for automated checks and updates

Reviewed Changes

Copilot reviewed 5 out of 9 changed files in this pull request and generated 2 comments.

File Description
lib/index.test.js Swap out Sinon/Chai for node:test mocks and assert
eslint.config.js New ESLint config via defineConfig + dynamic import
.github/workflows/ci.yaml CI workflow matrix for Node 20/22/24
.github/dependabot.yml Weekly Dependabot npm updates
Files not reviewed (4)
  • .eslintrc: Language not supported
  • .github/CODEOWNERS: Language not supported
  • .nvmrc: Language not supported
  • package.json: Language not supported

Comment thread eslint.config.js
@@ -0,0 +1,12 @@
const { defineConfig } = require('eslint/config');

const GDConfig = import('eslint-config-godaddy').then((mod) => mod.default || mod);
Copy link

Copilot AI May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using dynamic import returns a Promise, so ESLint will receive a Promise instead of the actual config object. Consider using a synchronous require('eslint-config-godaddy') or convert this file to ESM with top-level await to ensure the config is resolved before extending.

Suggested change
const GDConfig = import('eslint-config-godaddy').then((mod) => mod.default || mod);
const GDConfig = require('eslint-config-godaddy').default || require('eslint-config-godaddy');

Copilot uses AI. Check for mistakes.
Comment thread lib/index.test.js

afterEach(() => {
sinon.restore();
mock.reset();
Copy link

Copilot AI May 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling mock.reset() may not restore overridden methods or clear all mock state. Use mock.resetAll() and mock.restoreAll() (or the appropriate sandbox instance methods) to fully clean up mocks between tests.

Suggested change
mock.reset();
mock.resetAll();
mock.restoreAll();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants