Skip to content

Fix ESLint flat config format in yennefer-observatory#3

Draft
Copilot wants to merge 3 commits into
observatory-upgrade-4518676076484333634from
copilot/sub-pr-1
Draft

Fix ESLint flat config format in yennefer-observatory#3
Copilot wants to merge 3 commits into
observatory-upgrade-4518676076484333634from
copilot/sub-pr-1

Conversation

Copilot AI commented Jan 22, 2026

Copy link
Copy Markdown

The ESLint configuration was using the legacy extends property, which is invalid in flat config format (ESLint v9+).

Changes:

  • Removed extends property from configuration object
  • Placed plugin configurations (js.configs.recommended, reactHooks.configs.flat.recommended, reactRefresh.configs.vite) directly in the top-level config array

Before:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{js,jsx}'],
    extends: [
      js.configs.recommended,
      reactHooks.configs.flat.recommended,
      reactRefresh.configs.vite,
    ],
    // ...
  },
])

After:

export default defineConfig([
  globalIgnores(['dist']),
  js.configs.recommended,
  reactHooks.configs.flat.recommended,
  reactRefresh.configs.vite,
  {
    files: ['**/*.{js,jsx}'],
    // ...
  },
])

This enables proper config composition and plugin rule activation in ESLint's flat config system.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits January 22, 2026 17:01
Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
Co-authored-by: igor-holt <125706350+igor-holt@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP Address feedback on Observatory Architecture upgrade PR Fix ESLint flat config format in yennefer-observatory Jan 22, 2026
@igor-holt Igor Holt (igor-holt) linked an issue Jan 25, 2026 that may be closed by this pull request

@igor-holt Igor Holt (igor-holt) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fix

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Update yennefer-observatory to use ESLint v9+ flat config composition by removing legacy extends usage and composing plugin configs at the top level.

Changes:

  • Removed extends from the per-files config object
  • Added js, react-hooks, and react-refresh recommended configs directly to the top-level config array
Files not reviewed (1)
  • yennefer-observatory/package-lock.json: Language not supported

Comment on lines +9 to 13
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
{
files: ['**/*.{js,jsx}'],

Copilot AI Feb 27, 2026

Copy link

Choose a reason for hiding this comment

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

This changes the scope of the recommended configs: previously they were applied only to **/*.{js,jsx} via the object that contained files, but now these configs apply globally (to every file ESLint considers). To keep the prior behavior, wrap/clone each recommended config entry with the same files glob (e.g., by spreading the config object and adding files) or move them into the same scoped config block so they only affect JS/JSX.

Suggested change
js.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
{
files: ['**/*.{js,jsx}'],
{
files: ['**/*.{js,jsx}'],
...js.configs.recommended,
},
{
files: ['**/*.{js,jsx}'],
...reactHooks.configs.flat.recommended,
},
{
files: ['**/*.{js,jsx}'],
...reactRefresh.configs.vite,
},
{
files: ['**/*.{js,jsx}'],

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan to launch

3 participants