Skip to content

Conversation

Copy link

Copilot AI commented Aug 9, 2025

This PR simplifies the oxlint configuration by extending the shared @eggjs/oxlint-config instead of maintaining a comprehensive manual configuration, updates the project to follow Node.js library best practices by not tracking package-lock.json, and upgrades to the latest oxlint v1 for improved performance and features.

Changes Made

Oxlint Configuration:

  • Added dependency: @eggjs/oxlint-config as a dev dependency
  • Upgraded oxlint: Updated from ^0.16.10 to ^1.11.1 for latest v1 features and improvements
  • Simplified configuration: Reduced .oxlintrc.json from ~140 lines to 12 lines by extending the shared config
  • Preserved project-specific settings:
    • env.node: true and env.mocha: true for Node.js and test environment globals
    • Custom ignorePatterns for project-specific files (index.d.ts, test/fixtures/**, __snapshots__)
    • Override no-empty-function: "allow" to maintain current project behavior

Package Lock Management:

  • Updated .gitignore: Added package-lock.json to .gitignore
  • Removed from tracking: package-lock.json is no longer committed to the repository, following Node.js library best practices

Benefits

  • Latest oxlint: Now using oxlint v1.11.1 with improved performance and latest features
  • Maintainability: Configuration is now centrally managed in @eggjs/oxlint-config
  • Consistency: Aligns with other eggjs projects using the same shared configuration
  • Automatic updates: Future rule updates in the shared config will be automatically inherited
  • Reduced maintenance: No need to manually sync rule changes across projects
  • Better workflow: Library consumers can get the latest compatible dependency versions without lock file constraints

Validation

  • ✅ All existing tests pass
  • ✅ Linting works correctly with oxlint v1.11.1
  • ✅ Build and type checking continue to work without issues
  • ✅ Project-specific overrides are properly applied
  • package-lock.json is properly ignored by git

The configuration now extends from @eggjs/oxlint-config while preserving the minimal project-specific customizations needed for this repository.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@socket-security
Copy link

socket-security bot commented Aug 9, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​eggjs/​oxlint-config@​1.0.0701007992100
Updatedoxlint@​0.16.12 ⏵ 1.11.192 +110084 +196 +1100

View full report

Copilot AI changed the title [WIP] use @eggjs/oxlint-config extends .oxlintrc.json feat: use @eggjs/oxlint-config extends .oxlintrc.json Aug 9, 2025
Copilot AI requested a review from fengmk2 August 9, 2025 12:31
Copilot finished work on behalf of fengmk2 August 9, 2025 12:31
@@ -0,0 +1,5350 @@
{
"name": "graceful-process",
Copy link
Member

Choose a reason for hiding this comment

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

@copilot add package-lock.json to gitignore and not commit it.

Copy link
Author

Choose a reason for hiding this comment

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

Added package-lock.json to .gitignore and removed it from git tracking. The file still exists locally for development but is no longer committed to the repository, following Node.js library best practices. [aa891f0]

@fengmk2 fengmk2 changed the title feat: use @eggjs/oxlint-config extends .oxlintrc.json chore: use @eggjs/oxlint-config extends .oxlintrc.json Aug 11, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/graceful-process@12

commit: 1cb0f9f

@pkg-pr-new
Copy link

pkg-pr-new bot commented Aug 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/graceful-process@12

commit: f3820af

Copilot AI changed the title chore: use @eggjs/oxlint-config extends .oxlintrc.json feat: use @eggjs/oxlint-config extends .oxlintrc.json and ignore package-lock.json Aug 11, 2025
Copilot AI requested a review from fengmk2 August 11, 2025 05:49
Copilot finished work on behalf of fengmk2 August 11, 2025 05:49
Copilot AI changed the title feat: use @eggjs/oxlint-config extends .oxlintrc.json and ignore package-lock.json feat: use @eggjs/oxlint-config extends .oxlintrc.json, ignore package-lock.json, and upgrade to oxlint v1 Aug 11, 2025
Copilot finished work on behalf of fengmk2 August 11, 2025 05:55
@fengmk2 fengmk2 changed the title feat: use @eggjs/oxlint-config extends .oxlintrc.json, ignore package-lock.json, and upgrade to oxlint v1 chore: use @eggjs/oxlint-config extends .oxlintrc.json Aug 11, 2025
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.

2 participants