question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn lint task broken

See original GitHub issue
yarn lint
yarn run v1.22.4
$ eslint src/**/*.{js,jsx,ts,tsx}
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.

Oops! Something went wrong! :(

ESLint: 6.8.0.

No files matching the pattern "src/**/*.jsx" were found.
Please check for typing mistakes in the pattern.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rschristiancommented, May 7, 2020

According to eslint documentation It must be something like

"lint": "eslint --ext js,jsx,ts,tsx src/"

This record work fine for me

yarn lint
yarn run v1.22.4
$ eslint --ext js,jsx,ts,tsx src/
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
/src/components/app.tsx
  16:7   warning  'currentUrl' is assigned a value but never used  @typescript-eslint/no-unused-vars
  17:23  warning  Missing return type on function                  @typescript-eslint/explicit-function-return-type

/src/routes/notfound/index.tsx
  9:25  error  `'` can be escaped with `'`, `‘`, `'`, `’`  react/no-unescaped-entities

/src/routes/profile/index.tsx
  19:12  warning  Missing return type on function  @typescript-eslint/explicit-function-return-type
  25:21  warning  Missing return type on function  @typescript-eslint/explicit-function-return-type

✖ 5 problems (1 error, 4 warnings)

No, what we have is valid.

I’ve been able to reproduce your issue, and have fixed the lint command by changing it to the following:

"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",

If that works for you too, I’ll make a quick PR to get this sorted.

1reaction
Akiyamkacommented, May 7, 2020

According to eslint documentation It must be something like

"lint": "eslint --ext js,jsx,ts,tsx src/"

This record work fine for me

yarn lint
yarn run v1.22.4
$ eslint --ext js,jsx,ts,tsx src/
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
/src/components/app.tsx
  16:7   warning  'currentUrl' is assigned a value but never used  @typescript-eslint/no-unused-vars
  17:23  warning  Missing return type on function                  @typescript-eslint/explicit-function-return-type

/src/routes/notfound/index.tsx
  9:25  error  `'` can be escaped with `'`, `‘`, `'`, `’`  react/no-unescaped-entities

/src/routes/profile/index.tsx
  19:12  warning  Missing return type on function  @typescript-eslint/explicit-function-return-type
  25:21  warning  Missing return type on function  @typescript-eslint/explicit-function-return-type

✖ 5 problems (1 error, 4 warnings)
Read more comments on GitHub >

github_iconTop Results From Across the Web

lint-staged | Yarn - Package Manager
lint -staged GitHub Actions npm version Codecov. Run linters against staged git files and don't let :poop: slip into your code base!
Read more >
Bountysource
yarn lint task broken.
Read more >
lint-staged not running on precommit - Stack Overflow
husky-init is a one-time command to quickly initialize a project with husky. npx husky-init && npm install # npm npx husky-init && yarn...
Read more >
Common React TypeScript ESLint / Lint Errors & Warning ...
This one can happen easily making a mistake and using the wrong event type. It won't create a compile-time error, but lint will...
Read more >
Android Lint Checks - Android Studio Project Site
not be shipped until the issue is addressed, and lint will look for these. ... method will now override the Android method, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found