Ohara: Fix eslint errors/warnings cannot be displayed right in the Vscode issue

Created on 27 Aug 2019  路  7Comments  路  Source: oharastream/ohara

After upgrading to eslint 6. The eslint errors and warnings are now not able to be displayed in the vscode (but is still able to be displayed in the CLI and Browser consoles). __A temp solution here is to open vscode from the ./client dir instead of ./ohara-manager.__ as suggested in https://github.com/microsoft/vscode-eslint/issues/696#issuecomment-508580721

It's actually a bug from the vscode plugin. See the issue thread here:
https://github.com/microsoft/vscode-eslint/issues/696

Most helpful comment

@wu87988622 @DavidMi-1

There is an issue that causes prettier(Our code formater) to fail in our project if you're using vscode

Make sure you turn this off for now as a temp workaround

"prettier.eslintIntegration": false

All 7 comments

/cc @wu87988622 @DavidMi-1

Hmm, looked thru the comment thread again this afternoon and found out it's recommended to add a vscode config to address the issue in the readme...

https://github.com/microsoft/vscode-eslint/blob/master/README.md

We should give it a try then

@wu87988622 @DavidMi-1

There is an issue that causes prettier(Our code formater) to fail in our project if you're using vscode

Make sure you turn this off for now as a temp workaround

"prettier.eslintIntegration": false

@wu87988622 @DavidMi-1

Please add this option in your vscode's settings.json and see if it works okay(Open the project from ohara/manager)?

  "eslint.workingDirectories": [
    "./client",
  ],

After adding this to my settings, now everything is working just fine

Another setting that you can enable is eslint's auto fix feature

"eslint.autoFixOnSave": true,

This helps when there are eslint warnings/errors, it can auto fix the issue (if it can, not all the rules can be fixed automatically)

Please report back after applying these settings. I might need to update the docs to includes these rules.

Please report back after applying these settings. I might need to update the docs to includes these rules.

I setting eslint, everything is fine

Since this issue has nothing to do with our source code, the docs will be added in #2603

Was this page helpful?
0 / 5 - 0 ratings