[ci] fix: add ESLint v9 flat config to resolve missing config error#159
[ci] fix: add ESLint v9 flat config to resolve missing config error#159manishpatel00 wants to merge 6 commits intomeshery-extensions:masterfrom
Conversation
|
🚀 Preview deployment: https://meshery-extensions.github.io/shape-builder/pr-preview/pr-159/
|
35a67d4 to
b91b194
Compare
Fixes meshery-extensions#70 - Add site/eslint.config.mjs with ESLint v9 flat config format - Upgrade eslint from v7 to v9 and add @eslint/js dependency - Update workflow to use npm run checklint instead of npx eslint to prevent version mismatch between package.json and npx resolution Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
…ility The babel-preset-gatsby requires NODE_ENV=test to bypass Gatsby CLI config loading during ESLint checks. This allows the flat config to properly parse files without triggering the preset's special initialization logic. Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
- Remove unused __dirname import from eslint.config.mjs - Add missing globals (exports, setTimeout, setInterval, etc.) to config - Migrate .eslintignore patterns to eslint.config.mjs ignores array - Remove unused 'showSignUpButton' prop from Navigation component - Remove unused 'height' and 'width' props from Toggle component This resolves all ESLint check failures in the CI pipeline. Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
b91b194 to
6525466
Compare
There was a problem hiding this comment.
Pull request overview
This PR addresses CI failures caused by npx eslint . resolving to ESLint v9 (which requires flat config) by adding an ESLint v9 flat config in site/, upgrading ESLint, and updating the GitHub Actions workflow to use the repo’s npm run checklint script.
Changes:
- Added
site/eslint.config.mjs(ESLint v9 flat config) migrating rules/ignores from the legacy setup. - Upgraded
siteESLint dependencies and adjusted scripts to runeslint .consistently. - Updated the ESLint GitHub Actions workflow to set up Node and run
npm run checklintfromsite/.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
site/src/components/Toggle.js |
Removes unused props from Toggle component signature. |
site/src/components/Navigation/index.js |
Removes unused prop from Navigation component signature. |
site/package.json |
Upgrades ESLint to v9 and adjusts lint scripts/dependencies. |
site/eslint.config.mjs |
Introduces ESLint v9 flat config (rules + ignores + parser/plugins). |
.github/workflows/eslint-gh.yml |
Switches CI linting to npm run checklint with Node setup and caching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@manishpatel00 Please address the copilot suggestions. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: MANISH KUMAR <146671113+manishpatel00@users.noreply.github.com>
…babel/eslint-parser dependency
|
@M-DEV-1 All Copilot suggestions have been addressed! Changes made:
Commit: 65c9b9b - "fix(eslint): resolve Copilot review issues - add global ignores and @babel/eslint-parser dependency" The ESLint configuration now follows ESLint v9 best practices and should resolve all CI issues. |
|
@manishpatel00 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂 |
| - uses: actions/checkout@v6 | ||
| - name: Run eslint | ||
| run: cd site && npm install && NODE_ENV=test npx eslint . | ||
| - uses: actions/checkout@v4 |
| cache: 'npm' | ||
| cache-dependency-path: site/package-lock.json | ||
| - name: Install dependencies | ||
| run: cd site && npm install |
There was a problem hiding this comment.
please use make targets
Notes for Reviewers
Summary
CI was failing because
npx eslint .resolves to ESLint v9 whichrequires flat config (
eslint.config.mjs), but the repo only had.eslintrc.js(v7 format). This PR adds the flat config and upgradesESLint to v9.
Changes
site/eslint.config.mjs— ESLint v9 flat config with allrules migrated from existing
.eslintrc.jssite/package.json— ESLint upgraded to v9, added@eslint/jsdependency.github/workflows/eslint-gh.yml— replacednpx eslint .withnpm run checklintto prevent version mismatchSigned commits