Skip to content

fix(linter): add files entry to react flat configs to avoid applying TS rules to JSON files#29457

Merged
Coly010 merged 2 commits intonrwl:masterfrom
Bullfrog1234:issue/28245
Jan 28, 2025
Merged

fix(linter): add files entry to react flat configs to avoid applying TS rules to JSON files#29457
Coly010 merged 2 commits intonrwl:masterfrom
Bullfrog1234:issue/28245

Conversation

@Bullfrog1234
Copy link
Copy Markdown
Contributor

This PR fixes an issue with React libs, where TS rules are being applied to JSON files.

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #28245

@Bullfrog1234 Bullfrog1234 requested a review from a team as a code owner December 22, 2024 03:58
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 28, 2025 1:17pm

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Dec 22, 2024

View your CI Pipeline Execution ↗ for commit 0db0949.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 39m 47s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 5s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx format:check --base=5127c... ✅ Succeeded 27s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 26s View ↗
nx documentation --no-dte ✅ Succeeded 43s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-28 14:01:47 UTC

@Bullfrog1234
Copy link
Copy Markdown
Contributor Author

@FrozenPandaz Can you please review this Pull Request

Cheers

@Bullfrog1234
Copy link
Copy Markdown
Contributor Author

@Coly010 just curious to why use ignores instead of strict alignment to correct file extensions.

I was following the same as what was done to the angular lint rules.

@Coly010
Copy link
Copy Markdown
Contributor

Coly010 commented Jan 27, 2025

Unless I'm mistaken and I may be, the root eslint config should already be applying the rules to the .ts variety of globs.
In this case we specifically want to avoid JSON files being parsed, so the intention here to use ignores seems more correct

@Coly010 Coly010 merged commit cbbe14b into nrwl:master Jan 28, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v19.8.3 - Expected an assignment or function call and instead saw an expression

3 participants