chore: update eslint configuration and dependencies#448
Open
Mahmoud-s-Khedr wants to merge 2 commits intocameri:mainfrom
Open
chore: update eslint configuration and dependencies#448Mahmoud-s-Khedr wants to merge 2 commits intocameri:mainfrom
Mahmoud-s-Khedr wants to merge 2 commits intocameri:mainfrom
Conversation
- Simplified linting commands in package.json - Updated eslint and related packages to latest versions - Changed @typescript-eslint packages to a more recent version
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Upgrades the project’s lint tooling from ESLint v8 legacy config to ESLint v9 flat config, updating dependencies and npm scripts to keep linting working with ESLint v9’s configuration model.
Changes:
- Bumped ESLint and TypeScript-ESLint dependencies and added
@eslint/js+@eslint/eslintrc. - Replaced
.eslintrc.js/.eslintignorewith a neweslint.config.jsflat config (including ignore rules). - Updated
lintandlint:reportscripts to the ESLint v9 invocation style.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updates lint scripts and bumps ESLint / TS-ESLint dependencies. |
| package-lock.json | Locks upgraded lint dependency graph for ESLint v9 + TS-ESLint v8. |
| eslint.config.js | Introduces flat config using FlatCompat, and migrates rules/ignores. |
| .eslintrc.js | Removes legacy ESLint config. |
| .eslintignore | Removes legacy ignore file in favor of flat-config ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
package.json
Outdated
Comment on lines
+31
to
+32
| "lint": "eslint ./src ./test", | ||
| "lint:report": "eslint -o .lint-reports/eslint.json -f json ./src ./test", |
Comment on lines
+9
to
+20
| module.exports = [ | ||
| { | ||
| ignores: ['node_modules', 'dist', '.test-reports', '.coverage', '.nostr', 'tslint.json'], | ||
| }, | ||
| ...compat.config({ | ||
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| sourceType: 'module', | ||
| }, | ||
| plugins: ['@typescript-eslint'], | ||
| extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
| env: { |
Comment on lines
+24
to
+52
| '@typescript-eslint/no-explicit-any': 'off', | ||
| '@typescript-eslint/no-unused-vars': ['error', { | ||
| argsIgnorePattern: '^_', | ||
| caughtErrors: 'none', | ||
| }], | ||
| '@typescript-eslint/no-unused-expressions': 'off', | ||
| semi: ['error', 'never'], | ||
| quotes: ['error', 'single', { avoidEscape: true }], | ||
| 'sort-imports': ['error', { | ||
| ignoreCase: true, | ||
| allowSeparatedGroups: true, | ||
| }], | ||
| curly: [2, 'multi-line'], | ||
| 'max-len': [ | ||
| 'error', | ||
| { | ||
| code: 120, | ||
| ignoreStrings: true, | ||
| ignoreTemplateLiterals: true, | ||
| ignoreRegExpLiterals: true, | ||
| }, | ||
| ], | ||
| 'comma-dangle': ['error', { | ||
| arrays: 'always-multiline', | ||
| objects: 'always-multiline', | ||
| imports: 'always-multiline', | ||
| exports: 'always-multiline', | ||
| functions: 'ignore', | ||
| }], |
Owner
There was a problem hiding this comment.
@Mahmoud-s-Khedr Can we ensure there's a 1:1 between previous and new?
Owner
|
Please fix merge conflicts 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR upgrades the project linting stack from ESLint v8 (legacy config) to ESLint v9 (flat config) while preserving current lint behavior.
Changes included:
eslintto^9.39.4@typescript-eslint/eslint-pluginto^8.58.1@typescript-eslint/parserto^8.58.1@eslint/jsand@eslint/eslintrc.eslintrc.js.eslintignoreeslint.config.js(flat config) with migrated ignore rules and TypeScript setuplint:eslint ./src ./testlint:report:eslint -o .lint-reports/eslint.json -f json ./src ./testpackage-lock.jsonto reflect dependency changesRelated Issue
#443
Motivation and Context
ESLint v9 no longer supports
.eslintrc.*as the default config path and expects flat config (eslint.config.js).Without this migration, linting fails under ESLint v9 and blocks local hooks/CI lint steps.
This change modernizes the lint setup and keeps behavior aligned with the existing codebase.
How Has This Been Tested?
Executed locally on Node version from
.nvmrc(v24.14.1):npm installnpm run lintnpm run lint:reportnpm run build:checkAll commands completed successfully after migration.
Types of changes
Checklist: