Use @eggjs/oxlint-config extends and upgrade to oxlint v1 with type-aware linting#51
Use @eggjs/oxlint-config extends and upgrade to oxlint v1 with type-aware linting#51
Conversation
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
| "@arethetypeswrong/cli": "^0.17.4", | ||
| "@eggjs/bin": "7", | ||
| "@eggjs/mock": "^6.0.5", | ||
| "@eggjs/oxlint-config": "^1.0.0", |
There was a problem hiding this comment.
@copilot update oxlint to v1 and enable type-aware feature on cli
There was a problem hiding this comment.
Updated oxlint to v1.14.0 and enabled type-aware features. Added oxlint-tsgolint dependency and configured --type-aware and --tsconfig flags in CLI scripts. The enhanced type-aware linting now detects additional TypeScript issues using the project's tsconfig.json. (f81f26b)
commit: |
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #51 +/- ##
=======================================
Coverage 82.64% 82.64%
=======================================
Files 4 4
Lines 242 242
Branches 17 17
=======================================
Hits 200 200
Misses 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Upgraded oxlint from ^0.16.2 to ^1.14.0 - Added oxlint-tsgolint dependency for type-aware linting - Enabled --type-aware and --tsconfig flags in lint scripts - Updated lint-staged configuration for consistent type-aware linting - Type-aware linting now detects additional TypeScript issues Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Refactored the oxlint configuration to extend from the shared
@eggjs/oxlint-configpackage and upgraded to oxlint v1 with enhanced type-aware linting capabilities.Configuration Simplification
@eggjs/oxlint-configas a dev dependency.oxlintrc.jsonfrom 142 lines to 13 lines (90% reduction)./node_modules/@eggjs/oxlint-config/.oxlintrc.jsonmocha: trueto environment (in addition to inheritednode: true)no-consoleto "warn" instead of defaultimport/no-unassigned-importfor type augmentation importsOxlint v1 Upgrade with Type-Aware Features
^0.16.2to^1.14.0oxlint-tsgolintfor enhanced TypeScript linting--type-awareand--tsconfig=./tsconfig.jsonflags to CLIlintscript andlint-stagedto use type-aware featuresBefore
{ "$schema": "./node_modules/oxlint/configuration_schema.json", "env": { "node": true, "mocha": true }, "categories": { /* 7 categories */ }, "plugins": [ /* 7 plugins */ ], "rules": { /* 100+ rules */ }, "ignorePatterns": [ /* patterns */ ] }After
{ "$schema": "./node_modules/oxlint/configuration_schema.json", "extends": ["./node_modules/@eggjs/oxlint-config/.oxlintrc.json"], "env": { "node": true, "mocha": true }, "rules": { "no-console": "warn", "import/no-unassigned-import": "allow" }, "ignorePatterns": ["index.d.ts", "test/fixtures/**", "__snapshots__"] }Benefits
The enhanced type-aware linting now detects additional code quality issues that were previously not caught, improving overall code quality and TypeScript type safety.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.