inflearn logo
강의

講義

知識共有

TypeScript入門 - 基礎から実践まで

eslint 설정에 관하여

932

hwd3527

投稿した質問数 8

1

선생님, 안녕하세요.

저는 eslint에서 잡아준다는 밑줄이 안나오는데요. eslint에서 설정해야 되는게 있나요?

typescript es6 javascript

回答 3

0

hwd3527

package.json에 eslint를 5.14로 다운 그레이드하니까 됩니다. 그런데 왜 그런지는 모르겠습니다.

0

hwd3527

VSCode의 Settings.json

{
    "workbench.colorTheme""Night Owl",
    "workbench.iconTheme""material-icon-theme",
    "atomKeymap.promptV3Features"true,
    "editor.multiCursorModifier""ctrlCmd",
    "editor.formatOnPaste"true,
    "workbench.startupEditor""newUntitledFile",
    "emmet.includeLanguages": {
        "javascript""javascriptreact"
    },
    "eslint.validate": [        
        "vue",       
        "javascript",
        "javascriptreact",
        "typescript",
        "typescriptreact",       
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint"true
    },
    // don't format on save
    "editor.formatOnSave"false
}
    "terminal.integrated.shell.windows""C:\\Program Files\\Git\\bin\\bash.exe"
    
}

ESLint 에러로그

[Info  - 오후 9:20:12] ESLint server is starting
[Info  - 오후 9:20:13] ESLint server running in node v12.14.1
[Info  - 오후 9:20:13] ESLint server is running.
[Info  - 오후 9:20:16] ESLint library loaded from: D:\vue\typescript\quiz\1_todo\node_modules\eslint\lib\api.js
[Error - 오후 9:20:16] 
Failed to load plugin '@typescript-eslint' declared in 'quiz\1_todo\.eslintrc.js': Cannot find module '@typescript-eslint/eslint-plugin'
Require stack:
- D:\vue\typescript\__placeholder__.js
Referenced from: D:\vue\typescript\quiz\1_todo\.eslintrc.js
Happened while validating D:\vue\typescript\quiz\1_todo\src\index.ts
This can happen for a couple of reasons:
1. The plugin name is spelled incorrectly in an ESLint configuration file (e.g. .eslintrc).
2. If ESLint is installed globally, then make sure '@typescript-eslint/eslint-plugin' is installed globally as well.
3. If ESLint is installed locally, then '@typescript-eslint/eslint-plugin' isn't installed correctly.

Consider running eslint --debug D:\vue\typescript\quiz\1_todo\src\index.ts from a terminal to obtain a trace about the configuration files used.

입니다. 감사합니다.

0

captain

안녕하세요 hwd3527님, 혹시 1_todo 프로젝트에서 npm i 명령어 입력하신 후에 위와 같이 나오는 건가요? 명령어 입력을 안하셨으면 한번 입력해 보시구요..! 그리고 VSCode의 ESLint 플러그인도 최신 버전인지 한번 확인해 보시면 좋을 것 같습니다 :) 그래도 안되면 아래 2가지를 댓글로 달아주시면 좋을 것 같아요 :)

1. VSCode의 Settings.json


2. 위 ESLint 오류시 발생하는 에러 로그

TSLint

0

66

1

vscode eslint server 오류

0

75

1

안녕하세요. 기본타입- 튜플, 객체, 진위값 부분의 영상의 화면이 나오질 않습니다.

0

77

1

live server 설치 오류

1

368

2

강의 교안 pdf 는 따로 제공하지않나요?

0

284

2

npm i 설치 이유 문의

1

402

3

index.ts Delete `␍`eslintprettier/prettier 오류(빨간줄) 해결

2

289

3

vue 에서 jquery 사용 문제

1

692

2

TSLint 확장 프로그램은 현재 지원하지 않는다고 합니다.

1

499

2

강의 내용처럼 노란 밑줄이 작동하지 않아서 유사 질문들을 실행해보았는데요

1

542

1

section 3-1 JSdoc 타입이 추론되지 않아서 다음과 같이 수정했는데 이거 맞나요?

1

452

2

함수에 리턴 안됐다고 노란밑줄이 쳐져야하는데 없습니다

2

455

1

파일이 다른데 식별자가 중복되었다고 뜹니다.

1

443

2

빨간줄 에러 질문드립니다

1

488

2

마우스 갖다대면 리턴값 설명 나오는 거 질문드려요

1

356

2

js에서 @ts-check 적어도 체크하지 못하는 문제입니다

2

393

2

index.html에서 타입스크립트 콘솔 찍는 법 질문드립니다

1

565

2

섹션 1-3 추론 질문드립니다

1

354

2

왜 api쪽에는 왜 에러가 안나는지 궁금합니다.

1

323

2

const item1을 선언했을 때 타입을 선언해줘도 괜찮을까요?

1

390

1

전화번호부 타입선언

1

265

2

타입을 전역으로 분리

1

592

2

객체 선언 시 구분자는 쉼표, 세미콜론 모두 사용가능한건가요?

1

459

1

Git 관련 질문이 있습니다

1

669

2