use-ackee
use-ackee copied to clipboard
Upgrade linting and formatting configuration with new npm scripts
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
- Upgraded
@electerious/eslint-configfrom4.1.0to5.1.0 - Added
@electerious/[email protected]for code formatting - Added
[email protected]as a dev dependency
Configuration
- Created
eslint.config.jsto 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
assertmodule - 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 (
String→string,Object→object) - Consistent spacing and indentation
- Modern JavaScript patterns (
globalThis.windowinstead ofwindow)
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.