-
Notifications
You must be signed in to change notification settings - Fork 464
chore: update JavaScript linters to modern versions #2015
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
Conversation
86ce35d to
a0c09a9
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 pull request updates JavaScript linting infrastructure by upgrading ESLint from v8 to v9 and consolidating dependency management. The changes replace the deprecated eslint-config-standard with neostandard, move linter installations from inline Makefile npm commands to package.json devDependencies, and simplify the installation process.
Key changes:
- ESLint upgraded from ^8.57.1 to ^9.39.0 (major version upgrade)
- Replaced
eslint-config-standardwithneostandard^0.12.2 - Consolidated web linting tools (
htmlhint,retire) in package.json
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package.json | Updated ESLint to v9, added neostandard, htmlhint, and retire to devDependencies; removed eslint-config-standard; downgraded @stylistic/eslint-plugin to 4.0.0 |
| Makefile | Simplified install-web-linters target to use npm install instead of inline installation commands |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c4d8c10 to
b603289
Compare
81344f4 to
eb01219
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
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
Makefile:2454
- The npx commands in the lint-web target (lines 2448, 2450, 2452, 2454) are missing the '--yes' flag, which is inconsistent with the other Makefile targets (jshint, jscpd, markuplint, format-web) that use 'npx --yes'. Without the '--yes' flag, npx will prompt for user confirmation if packages need to be installed, which could cause the target to hang in automated environments. Add '--yes' to these npx invocations for consistency.
@find mcpgateway/templates -name "*.html" -exec npx htmlhint {} + 2>/dev/null || true
@echo "🔍 Linting CSS files..."
@find mcpgateway/static -name "*.css" -exec npx stylelint {} + 2>/dev/null || true
@echo "🔍 Linting JS files..."
@find mcpgateway/static -name "*.js" -exec npx eslint {} + 2>/dev/null || true
@echo "🔒 Scanning for known JS/CSS library vulnerabilities with retire.js..."
@cd mcpgateway/static && npx retire . 2>/dev/null || true
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4fc2071 to
110d0bb
Compare
Signed-off-by: Jonathan Springer <[email protected]> Signed-off-by: Mihai Criveti <[email protected]>
110d0bb to
467a2dd
Compare
crivetimihai
left a comment
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.
Fixes applied to the PR:
- Added eslint to .PHONY declaration - was missing for the new target
- Fixed eslint target - changed from npm install --save-dev (which modified package files) to @npm install --no-save
- Added @ prefix to commands for silent output consistency
- Removed redundant npm install from lint-web target (eslint already handles it)
- Restored install-web-linters target - provides explicit install command using package.json dependencies
Rebased onto current main (5 new commits integrated, no conflicts).
Supports updates to admin console as A2A and other components are modernized.
Summary
eslint-config-standardwithneostandardfor modern JavaScript lintingpackage.jsonfor better dependency managementhtmlhintandretireto tracked devDependenciesTest plan
make install-web-lintersto verify dependencies install correctly