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.

Linter configuration errors (typescript template)

See original GitHub issue

What is the current behaviour? Linter failing to run.

Steps to Reproduce Steps to reproduce the behavior:

npx preact-cli create typescript myproject
cd myproject
npm i
npm run lint

I’m getting:

Oops! Something went wrong! 😦

ESLint: 6.8.0.

No files matching the pattern “‘src/**/*.{js,jsx,ts,tsx}’” were found.

But then, running “eslint .” gives another error:

Oops! Something went wrong! 😦

ESLint: 6.8.0.

ESLint couldn’t find the plugin “eslint-plugin-jest”.

Both installing the latest eslint-plugin-jest or version 25.7.0 (which is the one I got inside eslint-config-preact) fail because of dependency conflicts.

Thanks for your help!

Please mention any other relevant information

Environment Info:
  System:
    OS: Windows 10 10.0.19043
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.15 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.5.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 103.0.5060.114
    Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.49)
  npmPackages:
    preact: ^10.3.1 => 10.10.0
    preact-cli: ^3.0.0 => 3.4.0
    preact-render-to-string: ^5.1.4 => 5.2.1
    preact-router: ^3.2.1 => 3.2.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rschristiancommented, Jul 19, 2022

Yay! Thanks so much for tracking those issues down!

1reaction
obasillecommented, Jul 19, 2022

Just tried it and it works like a charm, thank you @rschristian!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Explaining TypeScript Linter Errors - Stack Overflow
Is it possible to configure Visual Studio's tslint? According to the tslint documentation you can turn on/off features, example: github.com/ ...
Read more >
Linting TypeScript | JetBrains Rider Documentation
JetBrains Rider shows warnings and errors reported by ESLint right in the editor, as you type. Learn more from ESLint.
Read more >
How to use ESLint with TypeScript | Khalil Stemmler
ESLint is a JavaScript linter that you can use to lint either TypeScript or JavaScript code. In this post, we'll walk through how...
Read more >
Linting in TypeScript using ESLint and Prettier - LogRocket Blog
Integrate Prettier with ESLint to automate type-checking in your TypeScript code and ensure that the code has no bugs.
Read more >
Common React TypeScript ESLint / Lint Errors & Warning ...
The lint message: error Missing an explicit type attribute for button react/button-has-type. Not specifying attributes in certain components can produce lint ...
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