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.

Support TypeScript linting

See original GitHub issue

Now that kcd-scripts supports building TypeScript (see &, eslint-config-kentcdodds should be able to lint TypeScript (like @KubaJastrz said):

Also, I think that kcd-scripts lint will fail on TypeScript files when using the default configuration. should also be updated.

I wanted to first open this issue so we can discuss how we would handle it.

In my opinion we have 3 options:

  1. Add a kentcdodds/typescript config, like we already have for react, jest, … This is how most other configs are doing it (see plugin:import/typescript, prettier/@typescript-eslint, …) This means we need to check in some way whether react/jest/… is used, because overriding rules from those configs without using them will throw an error.
  2. Add kentcdodds/react-typescript/kentcdodds/jest-typescript/… configs that extend the normal configs and override the necessary rules
  3. Automatically check if typescript is a dependency and add rule overrides in the already existing configs

I’m in favor of 2 or 3, but I’m happy to hear your thoughts @kentcdodds. 🙂

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

kentcdoddscommented, Nov 6, 2020

Let’s revive this 😃 I’m building something with TypeScript right now and would love to have better linting support. I’ll probably work on this sometime later if nobody gets to it before me.

MichaelDeBoeycommented, Apr 12, 2020

Just to be sure I understand correctly: overrides is the same as extends, but for specific globs right? 🤔 You don’t have a ‘clean slate’ when using overrides, right? 🤔

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use ESLint with TypeScript | Khalil Stemmler
ESLint is a JavaScript linter that enables you to enforce a set of style, formatting, and coding standards for your codebase. It looks...
Read more >
Linting in TypeScript using ESLint and Prettier - LogRocket Blog
One of the most popular tools for linting is ESLint, which will analyze your code to find potential bugs and improve your code...
Read more >
ESLint statically analyzes your code to quickly find problems. It allows creating a series of assertions called lint rules around what your code...
Read more >
Linting TypeScript | WebStorm Documentation - JetBrains
The recommended linter for TypeScript code is ESLint which brings a wide range of linting rules that can also be extended with plugins....
Read more >
TSLint - Palantir Open Source
TSLint is an extensible static analysis tool that checks TypeScript code for readability, maintainability, and functionality errors. It is widely supported ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found