Skip to content

Upgrade ESLint Configuration to Flat Config for TypeScript, JSX, and JavaScript #958

@sheikhlimon

Description

@sheikhlimon

Description

I originally added ESLint and Prettier to the repository, including the .eslintrc.cjs configuration. Now, I am upgrading the setup to a flat config eslint.config.mjs to ensure it works properly for TypeScript, TSX, JS, and JSX files, and to improve linting consistency across the codebase.

Current Behavior

  • ESLint shows parsing errors (React is not defined, Unexpected token interface, etc.)
  • Console statements produce warnings (no-console) in many files
  • TypeScript/JSX files are not fully linted correctly

Steps to Reproduce

  1. Clone the repository
  2. Run npm install
  3. Run npm run lint

Expected Behavior

  • ESLint parses TypeScript and JSX files correctly
  • Console statements are allowed where needed (no-console disabled)
  • Only relevant TypeScript/React linting issues are reported
  • The linting setup works consistently across JS, JSX, TS, and TSX files

Suggested Fix / Solution

  • Upgrade the ESLint configuration to eslint.config.mjs with a flat config
  • Allow console statements by turning off no-console
  • Keep @typescript-eslint warnings for unused variables and any usage
  • Ensure React is defined globally in TSX files

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions