chore: update dependencies and update ESLint configuration#25
chore: update dependencies and update ESLint configuration#25rmarkins-godaddy wants to merge 3 commits into
Conversation
- 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.
There was a problem hiding this comment.
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
.eslintrcand introduced a flateslint.config.js - Replaced
chai/sinonin tests withnode:testmocks andassert - 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
There was a problem hiding this comment.
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:testandnode:assert - Remove legacy
.eslintrcand addeslint.config.jsusingdefineConfig - 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
| @@ -0,0 +1,12 @@ | |||
| const { defineConfig } = require('eslint/config'); | |||
|
|
|||
| const GDConfig = import('eslint-config-godaddy').then((mod) => mod.default || mod); | |||
There was a problem hiding this comment.
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.
| const GDConfig = import('eslint-config-godaddy').then((mod) => mod.default || mod); | |
| const GDConfig = require('eslint-config-godaddy').default || require('eslint-config-godaddy'); |
|
|
||
| afterEach(() => { | ||
| sinon.restore(); | ||
| mock.reset(); |
There was a problem hiding this comment.
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.
| mock.reset(); | |
| mock.resetAll(); | |
| mock.restoreAll(); |
…CODEOWNERS to include @rmarkins-godaddy
Checklist
npm testandnpm run lintpass