-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(eslint-plugin) separate legacy and modern dts files #8972
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
Conversation
Aligned the build system with other packages by replacing the custom tsup config with standard modern/legacy build outputs. Moved output files from 'dist' to 'build' directory structure. Removed the patch-missing-export-equals.js script in favor of directly exporting the plugin. Added tsconfig.prod.json for production builds.
View your CI Pipeline Execution ↗ for commit d2edcce.
☁️ Nx Cloud last updated this comment at |
@@ -100,8 +100,7 @@ | |||
"@tanstack/vue-query": "workspace:*", | |||
"@tanstack/vue-query-devtools": "workspace:*", | |||
"@types/react": "^19.0.1", | |||
"@types/react-dom": "^19.0.2", | |||
"eslint": "$eslint" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to remove that line so I could use a specific version of eslint
inside examples
. If you have a better idea, please let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 18 changed files in this pull request and generated no comments.
Files not reviewed (9)
- examples/react/eslint-legacy/.eslintrc: Language not supported
- examples/react/eslint-legacy/.gitignore: Language not supported
- examples/react/eslint-legacy/index.html: Language not supported
- examples/react/eslint-legacy/package.json: Language not supported
- examples/react/eslint-legacy/tsconfig.json: Language not supported
- package.json: Language not supported
- packages/eslint-plugin-query/package.json: Language not supported
- packages/eslint-plugin-query/tsconfig.prod.json: Language not supported
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
examples/react/eslint-legacy/src/index.tsx:51
- Consider verifying that 'error' is an instance of Error before accessing 'error.message', to prevent potential runtime exceptions if the error structure differs.
<span>Error: {error.message}</span>
@TkDodo It seems like there's something off with NX cache |
the issue appears locally on this PR as well (try running |
Sizes for commit d2edcce:
|
there’s a legit error now:
|
…/query into fix-eslint-plugin-modern-typing
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8972 +/- ##
=======================================
Coverage 44.30% 44.30%
=======================================
Files 202 202
Lines 8058 8058
Branches 1784 1785 +1
=======================================
Hits 3570 3570
Misses 4060 4060
Partials 428 428 🚀 New features to boost your workflow:
|
"name": "@tanstack/query-example-eslint-legacy", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want this example to be lintend in CI, you need to add a test:eslint
script and we’ll have to remove the --exclude
here:
Line 16 in 7e4e2e6
"test:eslint": "nx affected --target=test:eslint --exclude=examples/**", |
Not sure why examples were excluded, most of them don’t have that task specified anyways 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, but it seems like something is off with packages that I didn't touch 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah sadly, some tests are flaky. I’ll ship it
…t command Add `test:eslint` script to react example package.json files to enable linting checks. Update the main `test:eslint` command to remove the exclusion of examples, ensuring linting is applied across the entire project.
Hi,
to
I realize that the suggested way to import the package is
which if someone is using the TypeScript import helper, it will probably not be an issue at all, but I wanted to raise anyway that the result of the plain commonjs |
Thanks, I'll look into it |
fixes #8968 (comment)