Skip to content

ESLint configuration not applied to files outside root src/ directory #1448

@AbhishekChorotiya

Description

@AbhishekChorotiya

Note

This issue was created programmatically via GitHub CLI.

Problem

ESLint configuration was not applied to files outside the root `src/` directory, causing those files to be linted without a proper parser. Additionally, JSX parsing was not enabled for JavaScript files.

Root Cause

  1. File Pattern Issue: The original `files` pattern `src/**/*.{js,jsx,ts,tsx}` only matched files in the root-level `src/` directory. Files in other directories (e.g., `Hyperswitch-React-Demo-App/src/`) were not covered.

  2. Missing JSX Parser: JSX parsing was not explicitly enabled. ESLint's default Espree parser does not understand JSX syntax unless `ecmaFeatures.jsx: true` is configured.

Proposed Solution

  • Broaden file pattern to `**/*.{js,jsx,ts,tsx}` to cover all JS/TS files in the project
  • Enable JSX parsing via `ecmaFeatures: { jsx: true }`

Acceptance Criteria

  • ESLint runs correctly on all directories
  • JSX syntax is properly parsed in JavaScript files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions