-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Issue Description
From issue #5030
What's the problem (repeating README in the "Reproduction Repository")
Test
yarn install && yarn lint
Problem
- In the first commit on this branch, the
yarn lint
command works correctly. - In the second commit, the
yarn lint
command fails.
Reproduction
-
Run
yarn init
to create a whatever new repo. -
Install packages with
yarn
following Getting Started - Linting your TypeScript Codebaseyarn add --dev eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
-
Add this
eslintConfig
topackage.json
, then runyarn lint
. The command works."eslintConfig": { "env": { "node": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint" ], "root": true },
-
Add these two lines to
eslintConfig.extends
, then the command fails."plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:@typescript-eslint/strict"
Env
I'm using MacBook Pro (2021, 16'), which has M1 chips.
VSCode
Version: 1.67.1
Commit: da15b6fd3ef856477bf6f4fb29ba1b7af717770d
Date: 2022-05-06T12:37:14.619Z
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin arm64 21.3.0
TLDR
@JoshuaKGoldberg, thanks for correcting. I misunderstood that the problem was that the doc didn't tell users where to find the plugins.
@bradzacher, sorry to tell you that I feel a little bit unwelcomed because I couldn't react with emoji. This project is great, I hope that we have more contributors who fill the issues.
Reproduction Repository Link
https://github.com/PabloLION/test-repo/tree/node/eslint-typescript/plugins
Repro Steps
REPEATING Issue Description
-
Run
yarn init
to create a whatever new repo. -
Install packages with
yarn
following Getting Started - Linting your TypeScript Codebaseyarn add --dev eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
-
Add this
eslintConfig
topackage.json
, then runyarn lint
. The command works."eslintConfig": { "env": { "node": true }, "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended" ], "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint" ], "root": true },
-
Add these two lines to
eslintConfig.extends
, then the command fails."plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:@typescript-eslint/strict"
-
I also tested with
.eslintrc.js
and.eslintrc.cjs
. Both failed with same error.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.25.0 |
@typescript-eslint/parser |
5.25.0 |
@typescript-eslint/scope-manager |
NONE |
@typescript-eslint/typescript-estree |
NONE |
@typescript-eslint/type-utils |
NONE |
@typescript-eslint/utils |
NONE |
TypeScript |
4.6.4 |
ESLint |
8.16.0 |
node |
18.2.0 |