Skip to content

eslint-local-rules: harden inline highlight parsing (non-greedy regex, per-group JSON validation) - #8715

Open
nextjohnp7 wants to merge 7 commits into
reactjs:mainfrom
nextjohnp7:main
Open

nextjohnp7 wants to merge 7 commits into
reactjs:mainfrom
nextjohnp7:main

Conversation

@nextjohnp7

Copy link
Copy Markdown

No description provided.

qwen-intl and others added 2 commits October 28, 2026 09:02
- Add node_modules/.bin executable wrappers for acorn, eslint, browserslist, js-yaml, json5, semver, and other CLI tools
- Create .package-lock.json to manage npm dependency resolution and integrity hashes for the local rules plugin
- Include standard Node.js shebangs and entry points for all added binary scripts to ensure correct execution context
Update from task 2c24b9a8-a9c6-47a3-97bb-02a6e28370b6
@github-actions

Copy link
Copy Markdown

Size changes

Details

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

qwen-intl and others added 3 commits October 28, 2026 09:30
… deps

- Replace greedy INLINE_HIGHLIGHT_REGEX with a non-greedy global regex and validate each [[...]] group independently (per-group JSON parsing).
- Declare the runtime dependencies actually required by the local rules (eslint, remark@12, @babel/core, @babel/parser, babel-plugin-react-compiler) so tests run on a clean install.
- Add nested-highlight fixture and test asserting valid nested arrays pass.
- Drop accidentally committed node_modules and restore .gitignore/yarn.lock.
Update from task 2c24b9a8-a9c6-47a3-97bb-02a6e28370b6
qwen-intl and others added 2 commits October 28, 2026 09:41
…tion

- Refactor `eslint-local-rules/rules/inline-highlights.js` to use a strict, non-greedy regex for detecting inline highlight markers.
- Implement robust JSON parsing logic that validates per-group metadata structure before processing highlights.
- Update `.gitignore` to exclude lock files (`package-lock.json`, `yarn.lock`) while retaining `node_modules` exclusion.
Update from task 2c24b9a8-a9c6-47a3-97bb-02a6e28370b6

This branch was successfully deployed

1 active deployment
Preview — fff50dc0 Deployed Oct 28, 2026 by vercel[bot]
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.

2 participants