create-react-library
create-react-library copied to clipboard
eslint - Error No files matching the pattern "." were found.
Hi,
I am new to create-react-library and just created testlib project via npx create-react-library testlib
- Package Name testlib
- Package Description Made with create-react-library
- Author's GitHub Handle
- GitHub Repo Path /testlib
- License MIT
- Package Manager npm
- Template typescript
The creating of testlib completed successfully and i was able to build it using command npm run build
When i try to run test command npm run test, getting the following error message.
[email protected] test /Users/xx/Documents/Repos/testlib run-s test:unit test:lint test:build
[email protected] test:unit /Users/xx/Documents/Repos/testlib cross-env CI=1 react-scripts test --env=jsdom
The following changes are being made to your tsconfig.json file:
- compilerOptions.target to be suggested value: es5 (this can be changed)
- compilerOptions.allowJs to be suggested value: true (this can be changed)
- compilerOptions.skipLibCheck to be suggested value: true (this can be changed)
- compilerOptions.strict to be suggested value: true (this can be changed)
- compilerOptions.forceConsistentCasingInFileNames to be suggested value: true (this can be changed)
- compilerOptions.resolveJsonModule must be true (to match webpack loader)
- compilerOptions.isolatedModules must be true (implementation limitation)
- compilerOptions.noEmit must be true
PASS src/index.test.tsx ExampleComponent ✓ is truthy (2ms)
Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 0 total Time: 2.146s Ran all test suites.
[email protected] test:lint /Users/xx/Documents/Repos/testlib eslint .
Oops! Something went wrong! :(
ESLint: 6.8.0.
No files matching the pattern "." were found. Please check for typing mistakes in the pattern.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] test:lint: eslint .
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] test:lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xx/.npm/_logs/2020-07-29T15_37_46_513Z-debug.log
ERROR: "test:lint" exited with 2.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: run-s test:unit test:lint test:build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/xx/.npm/_logs/2020-07-29T15_37_46_589Z-debug.log
Encountering this issue too....
Ah okay you need to pass the file extension since its typescript project '/**/.{js,ts,tsx}' unfortunate this library is no longer maintained this stuff could easily fixed..