Questions tagged [typescript-eslint]
TypeScript-ESLint is an open-source project which provides tooling to allow TypeScript code to be checked by ESLint. This tag is for questions specific to linting TypeScript code with ESLint; such as lint rule issues, parser issues, problems setting up, or writing your own lint rules.
typescript-eslint
719
questions
-1
votes
1
answer
8
views
ESLint found too many warnings (maximum: -1)
I do not see any errors or actual warnings but my nx affected:lint is failing with:
ESLint found too many warnings (maximum: -1)
This happened when trying to upgrade NX from version 17 to version 19
0
votes
0
answers
24
views
Error: prettier.resolveConfig is not a function (ESLint/Prettier Rule)
I'm encountering an error during linting in my React project:
Error: prettier.resolveConfig is not a function
Occurred while linting `path`
Rule: "prettier/prettier"
Those dependencies are ...
0
votes
0
answers
20
views
Yarn 4.3.1 says a package (typescript-eslint) doesn't provide another (typescript) to its dependencies
After installing some packages with yarn 4.3.1 it says:
Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
After running yarn explain peer-...
0
votes
1
answer
27
views
Is there a linter for a missing typescript Type member?
I am trying to find a way to trigger a console lint error (or even a build error) when a Type member is called, but does not exist. Currently, I would have to know and open the offending file to see ...
0
votes
1
answer
29
views
typescript eslint stops working when I add a rule
I've installed typescript-eslint and it works great when I have the following config:
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
export default ...
0
votes
1
answer
58
views
ESLint is not reading the rules specified in the eslintrc.json in my Angular v17 Project
ESLint is not reading the rules written in the eslintrc.json file. It is displaying all the problems as errors even though I have set values of some rules as warn. Moreover, it is displaying errors ...
0
votes
2
answers
48
views
Media elements such as <audio> and <video> must have a <track> for captions eslint error
When I try to add
<video controls>
<source src="content.mp4" type="video/mp4" />
<source src="content.webm" type="video/webm" />
Your ...
-3
votes
1
answer
55
views
Adding ignores to the typescript-eslint recommended configuration?
I'm trying to add an ignores object to the typescript-eslint configuration
I figured this would do the trick:
import eslint from "@eslint/js";
import tseslint from "typescript-eslint&...
-3
votes
2
answers
63
views
Why 'eslint' + 'typescript-eslint' used for TypeScript linting when 'tsc' appears to work better? [duplicate]
Goal: To create a strict TypeScript linter script
eslint checks for poor JavaScript code patterns.
The docs suggests initialising eslint with npm init @eslint/config@latest
This also installs ...
1
vote
2
answers
71
views
Eslint 9 add a rule to existing configuration
I have a ES9 config that looks like this (eslint.config.js):
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@...
-1
votes
1
answer
47
views
Catching errors with the lint:eslint script in the lit typescript starter project?
I'm testing the lint:eslint script in the lit element typescript starter project.
I added a property with undefined any like this below the name property:
/**
* The name to say "Hello" ...
-3
votes
1
answer
38
views
@typescript-eslint/strict-boolean-expressions: Union type should be considered with allowOptions
An example.
play.
declare const str: string
if (str) { } good
declare const num: number
if(num) {} // good
declare const u: string | number
if(u) {} // Unexpected value in conditional. A boolean ...
0
votes
1
answer
551
views
Error while installing @typescript-eslint/eslint-plugin
I am getting below error while installing the package @typescript-eslint/eslint-plugin
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ...
0
votes
0
answers
54
views
Do i need the `languageOptions.globals` field in eslint flat config when using typescript-eslint?
Is it necessary to have languageOptions.globals in my eslint flat config when using the type-script-eslint plugin? Doesn't typescript eliminate the need for this field? Or should i keep this in my ...
0
votes
0
answers
37
views
VS Code IntelliSense Loading Indefinitely Across All Projects on macOS Sonoma for TypeScript/NextJs
I'm experiencing an issue with Visual Studio Code where IntelliSense is stuck on "Loading" indefinitely across all my TypeScript/NextJs projects. Whenever I Clicked ^ + space, I only see &...