Skip to content

[ci] fix: add ESLint v9 flat config to resolve missing config error#159

Open
manishpatel00 wants to merge 6 commits intomeshery-extensions:masterfrom
manishpatel00:fix/eslint-config
Open

[ci] fix: add ESLint v9 flat config to resolve missing config error#159
manishpatel00 wants to merge 6 commits intomeshery-extensions:masterfrom
manishpatel00:fix/eslint-config

Conversation

@manishpatel00
Copy link
Copy Markdown
Contributor

Notes for Reviewers

Summary

CI was failing because npx eslint . resolves to ESLint v9 which
requires flat config (eslint.config.mjs), but the repo only had
.eslintrc.js (v7 format). This PR adds the flat config and upgrades
ESLint to v9.

Changes

  • New: site/eslint.config.mjs — ESLint v9 flat config with all
    rules migrated from existing .eslintrc.js
  • Updated: site/package.json — ESLint upgraded to v9, added
    @eslint/js dependency
  • Updated: .github/workflows/eslint-gh.yml — replaced
    npx eslint . with npm run checklint to prevent version mismatch

Signed commits

  • Yes, I signed my commits.

@github-actions github-actions Bot added area/ci Continuous integration | Build and release component/ui Meshery UI related component/extensions labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 14, 2026

🚀 Preview deployment: https://meshery-extensions.github.io/shape-builder/pr-preview/pr-159/

Note: Preview may take a moment (GitHub Pages deployment in progress). Please wait and refresh. Track deployment here

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 site ESLint dependencies and adjusted scripts to run eslint . consistently.
  • Updated the ESLint GitHub Actions workflow to set up Node and run npm run checklint from site/.

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.

Comment thread .github/workflows/eslint-gh.yml Outdated
Comment thread site/eslint.config.mjs
Comment thread site/package.json
@M-DEV-1
Copy link
Copy Markdown
Member

M-DEV-1 commented Apr 15, 2026

@manishpatel00 Please address the copilot suggestions.

manishpatel00 and others added 3 commits April 19, 2026 01:02
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>
@manishpatel00
Copy link
Copy Markdown
Contributor Author

@M-DEV-1 All Copilot suggestions have been addressed!

Changes made:

  1. Global Ignores Configuration — Restructured the ESLint flat config to use a leading global ignores object (before js.configs.recommended). This ensures that ignored files are properly excluded from all rule processing, not just the file-specific rules.

  2. Missing Direct Dependency — Added @babel/eslint-parser@^7.23.0 as a direct dependency in site/package.json to prevent future hoisting/install issues and ensure stability.

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.

@Bhumikagarggg
Copy link
Copy Markdown
Contributor

@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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated action to v6

cache: 'npm'
cache-dependency-path: site/package-lock.json
- name: Install dependencies
run: cd site && npm install
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use make targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Continuous integration | Build and release component/extensions component/ui Meshery UI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eslints Config file is missing

5 participants