use-ackee icon indicating copy to clipboard operation
use-ackee copied to clipboard

Upgrade linting and formatting configuration with new npm scripts

Open Copilot opened this issue 5 months ago • 0 comments

This PR modernizes the project's linting and formatting setup by upgrading to the latest versions of @electerious/eslint-config and adding @electerious/prettier-config for consistent code formatting.

Changes Made

Dependencies

Configuration

  • Created eslint.config.js to support the new ESLint v9 flat configuration format
  • Added prettier configuration to package.json
  • Removed legacy ESLint configuration from package.json

NPM Scripts

Updated the npm scripts to match modern development workflows:

  • "eslint": "eslint \"**/*.js\"" - Run ESLint on all JavaScript files
  • "format": "npm run eslint -- --fix && npm run prettier -- --write" - Auto-fix linting issues and format code
  • "lint": "npm run eslint && npm run prettier -- --check" - Check both linting and formatting
  • "prettier": "prettier --ignore-path .gitignore \"**/*.{js,json,md,yml}\"" - Format multiple file types
  • "test": "npm run lint && node --test" - Run linting and tests using Node.js built-in test runner

Testing

  • Migrated from Mocha/Chai to Node.js built-in test runner
  • Updated test assertions to use Node.js assert module
  • Maintained existing test functionality while modernizing the testing approach

Code Formatting

All code has been automatically formatted using the new Prettier configuration, ensuring consistent code style throughout the project including:

  • Updated JSDoc type annotations (Stringstring, Objectobject)
  • Consistent spacing and indentation
  • Modern JavaScript patterns (globalThis.window instead of window)

The changes maintain backward compatibility while providing a more modern development experience with better tooling integration.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot avatar Aug 29 '25 13:08 Copilot