-
Notifications
You must be signed in to change notification settings - Fork 28
chore: update eslint #298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
chore: update eslint #298
Conversation
2c27277 to
7fb7fa9
Compare
- Updated `eslint` to `v9.36.0` - Replace `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` with `typescript-eslint` - Migrated to new flat config format using `eslint.config.mjs` - Updated related dependencies to compatible versions
- Replace outdate rule names - Replace `any` types - Pre-pend `_` to unused variables
7fb7fa9 to
713564d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades ESLint from version 8 to version 9, adopting the new flat configuration format and updating the codebase to comply with revised linting rules.
Key changes:
- Migration from
.eslintrctoeslint.config.mjsusing the flat config format - Updated ESLint-related dependencies and replaced deprecated plugins
- Code adjustments for compliance with new rules, primarily prefixing unused variables with underscores and improving type definitions
Reviewed Changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated ESLint and related plugin versions; modified lint script to use new configuration |
| eslint.config.mjs | New flat configuration file defining linting rules for the project |
| .eslintrc | Removed legacy ESLint configuration file |
| .eslintignore | Removed legacy ignore file (now handled in flat config) |
| packages/zcli-core/src/lib/secureStore.ts | Updated eslint-disable comments to use new rule names; prefixed unused error variables |
| packages/zcli-core/src/lib/secretType.ts | Removed unused eslint-disable comment; alphabetized enum values |
| packages/zcli-core/src/lib/request.ts | Prefixed unused parameter with underscore |
| packages/zcli-core/src/lib/env.ts | Improved type definition from any[] to string[] |
| packages/zcli-apps/src/types.ts | Replaced any with proper types for better type safety |
| packages/zcli-apps/src/utils/createApp.ts | Replaced any with specific type definitions |
| packages/zcli-apps/src/utils/uploadApp.ts | Added explicit Promise return type |
| packages/zcli-apps/src/commands/apps/create.ts | Replaced any destructuring with typed object |
| packages/zcli-apps/src/commands/apps/update.ts | Replaced any destructuring with typed object |
| packages/zcli-apps/src/commands/apps/clean.ts | Prefixed unused error variable with underscore |
| packages/zcli-apps/src/lib/buildAppJSON.ts | Improved type definitions; added type assertions for location properties |
| packages/zcli-apps/src/lib/buildAppJSON.test.ts | Removed eslint-disable comments for empty functions |
| packages/zcli-apps/src/lib/package.test.ts | Changed error handling to use unknown type with proper type assertions |
| packages/zcli-apps/tests/functional/server.test.ts | Updated eslint-disable comment to use new rule name |
| packages/zcli-themes/src/lib/getManifest.ts | Prefixed unused error variable with underscore |
| packages/zcli-themes/src/lib/getAssets.test.ts | Replaced as any with proper type casting |
| packages/zcli-themes/src/lib/getVariables.test.ts | Replaced as any with proper type casting |
| packages/zcli-themes/src/lib/zass.ts | Prefixed unused error variable with underscore |
| packages/zcli-themes/tests/functional/update.test.ts | Prefixed unused context parameter with underscore |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| import standard from 'eslint-config-standard' | ||
| import tseslint from 'typescript-eslint' | ||
|
|
||
| export default defineConfig([ |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'defineConfig' wrapper is unnecessary in ESLint v9 flat config. The configuration should be exported as a plain array. Replace 'defineConfig([...])' with just the array: 'export default [...]'.
| globalIgnores([ | ||
| 'node_modules', | ||
| 'packages/**/node_modules' | ||
| ]) |
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'globalIgnores' helper is not a standard ESLint v9 export. Use the 'ignores' property directly in a configuration object instead: { ignores: ['node_modules', 'packages/**/node_modules'] }.
| url: locations[product][locationName] as string | ||
| } | ||
| } | ||
|
|
Copilot
AI
Oct 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] This blank line appears to be unintentionally added. Consider removing it to maintain consistent spacing with the surrounding code.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
Do NOT write here! This section will be filled in by GitHub Action
automatically. If you don't want this, either remove the markers or write
outside the fences.
Detail
Checklist