ant-design / ant-design/ant-design-cli

antd lint reports parse-error for valid JSX accepted by ESLint and webpack

Open
#230 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
257
Forks
15
Avg merge
1h 46m
Merged PRs (30d)
5

Description

### Description

antd lint skips a JavaScript React component with 'Unexpected JSX expression', while the repository ESLint check and webpack build both parse and compile the same file successfully. The project uses React 17 and antd 4.23.0.

### Steps to Reproduce

1. Run: antd lint src/pages/SystemManage/SystemConfig/CaseReviewConfig/NewResultDescriptionScoreConfig.js --format json 2. Observe skippedFiles parse-error 3. Run project ESLint and npm run build:test; both succeed

### Expected Behavior

antd lint parses the JSX file and returns applicable lint findings

### Actual Behavior

The file is skipped with reason=parse-error and message=Unexpected JSX expression

### Environment

| Info | Value |
|------|-------|
| @ant-design/cli | 6.5.2 |
| Node | v24.6.0 |
| System | linux 6.12.96-1-MANJARO |

---
Generated by [@ant-design/cli](https://github.com/ant-design/ant-design-cli)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running antd lint on src/pages/SystemManage/SystemConfig/CaseReviewConfig/NewResultDescriptionScoreConfig.js and compare its parsing with the repository ESLint check and npm run build:test. Trace the parser configuration used by antd lint; done means the JSX file is parsed and applicable lint findings are returned instead of a skipped parse-error.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, react, typescript, webpack
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.