• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

eslint 설정에 관하여

20.10.26 17:50 작성 조회수 607

1

선생님, 안녕하세요.

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

답변 3

·

답변을 작성해보세요.

0

hwd3527님의 프로필

hwd3527

질문자

2020.10.27

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

0

hwd3527님의 프로필

hwd3527

질문자

2020.10.26

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

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

1. VSCode의 Settings.json


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