Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jan 28, 2025

Conversation

Bullfrog1234
Copy link
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
Copy link

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

Copy link

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
Contributor Author

@FrozenPandaz Can you please review this Pull Request

Cheers

@Bullfrog1234
Copy link
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
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
5 checks passed
Copy link

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