create-react-library icon indicating copy to clipboard operation
create-react-library copied to clipboard

eslint - Error No files matching the pattern "." were found.

Open brvaland opened this issue 5 years ago • 2 comments
trafficstars

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

brvaland avatar Jul 29 '20 16:07 brvaland

Encountering this issue too....

noobling avatar Oct 26 '20 12:10 noobling

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..

noobling avatar Oct 26 '20 13:10 noobling