-
-
Notifications
You must be signed in to change notification settings - Fork 27k
fix: exclude .spec and .test files from type checking #11886
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
Hi @jwalton9! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
This currently breaks. Waiting for PR: facebook/create-react-app#11886 Update Spotify wrapper.
Is there possibly an ETA on when this will be merged? This is a pretty sticky issue for us in trying to upgrade from 4 to 5. |
As a temporary work around, if you are using Craco, you can use this configuration file to inject the exclude without the typo in it: // Taken from the original webpack config
const ForkTsCheckerWebpackPlugin =
process.env.TSC_COMPILE_ON_ERROR === 'true'
? require('react-dev-utils/ForkTsCheckerWarningWebpackPlugin')
: require('react-dev-utils/ForkTsCheckerWebpackPlugin');
module.exports = {
webpack: {
configure: (webpackConfig, {env, paths}) => {
webpackConfig.plugins.map((plugin) => {
if (plugin instanceof ForkTsCheckerWebpackPlugin) {
plugin.options.issue.exclude.push({file: '**/src/**/?(*.){spec,test}.*'});
}
return plugin;
})
return webpackConfig;
},
},
}; |
This currently breaks. Waiting for PR: facebook/create-react-app#11886 Update Spotify wrapper.
This currently breaks. Waiting for PR: facebook/create-react-app#11886 Update Spotify wrapper.
Seems like an easy review, any actions? Please :-) |
Please can this be merged. I've never seen a 1 character change PR that is so impactful sit idle for so long. |
Yes please, it is blocking us from upgrading. |
PLEASE can someone merge this? This is making our lives hell! :( |
Please merge as this is also blocking us from upgrading |
Please merge this PR as it is blocking us as well, many thanks |
please merge! |
Please merge this issue, as this is blocking to us as well... |
@jwalton9 how come this isn't reviewed at all? Did you manage to find anything else regarding this issue? I do understand that |
Was there any announcement, post, github issue where they explain what's going on with CRA? No release since April 2022 and PRs aren't getting approved. I see people wanting to contribute to the project, but they get no support from the code owners. Here we have a very simple PR that would solve an annoying issue and it def shouldn't take one year to get it MERGED. Not approved, MERGED, |
@Mboulianne I think you read #11768 |
I don't think this is ever going to be reviewed, so I'm going to close it. FWIW we've migrated to vite for our client rendered applications |
This PR fixes
react-scripts@5
including test files when type checking duringnpm start
andnpm build
. This was changed in the upgrade towebpack@5
https://github.com/facebook/create-react-app/pull/11201/files#diff-8e25c4f6f592c1fcfc38f0d43d62cbd68399f44f494c1b60f0cf9ccd7344d697R732 however the syntax does not exclude.spec
and.test
files.There is a reproduction repo at https://github.com/jwalton9/cra-test-type-error which introduces a type error to
src/App.test.tsx
. Runningnpm start
causes these issues to be reported.The changes were validated by using
npm link
and runningnpm start
Fixes #11979