Node: docs: How to get eslint to work on VS code?

Created on 10 Apr 2020  路  8Comments  路  Source: nodejs/node

I previously received some help with this. Unfortunately I didn't document it and after re-installing my computer it no longer works.

Would anyone mind describing how to get it to work? I'll add a section in the docs for future reference.

question

Most helpful comment

Would it make sense to include a .vscode folder into repro with these settings?

https://github.com/nodejs/node-code-ide-configs

All 8 comments

I use Webstorm, and I think they are same (in some places), like eslint package and conf file

hope this could help you out.

image

I try vscode and work out the success configuration file.

{
    "eslint.format.enable": true,
    "eslint.nodePath": "./tools/node_modules/eslint",
    "eslint.options": {
        "configFile": "./.eslintrc.js"
    },
    "eslint.validate": [
        "javascript"
    ]
}

obviously, you have to download the eslint extension in vscode shop

example

image

I try vscode and work out the success configuration file

Where is this? Also I don't want this to apply globally as I work with other projects as well...

Ah, workspace specific settings. Perfect. Thank you!

Would it make sense to include a .vscode folder into repro with these settings?

I think no, people don't use the same Editor or IDE. and we shouldn't include any of its configuration files in the repo.

But document to introduce it may be ok

Would it make sense to include a .vscode folder into repro with these settings?

https://github.com/nodejs/node-code-ide-configs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fanjunzhi picture fanjunzhi  路  3Comments

danielstaleiny picture danielstaleiny  路  3Comments

ksushilmaurya picture ksushilmaurya  路  3Comments

dfahlander picture dfahlander  路  3Comments

sandeepks1 picture sandeepks1  路  3Comments