两个项目工作区的 VSCode Eslint 配置 [英] VSCode Eslint configuration for a two projects workspace

查看:48
本文介绍了两个项目工作区的 VSCode Eslint 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含两个项目的文件夹,一个 Nodejs 后端和一个 Vuejs 前端.我想同时打开两个项目,并且能够使用 eslint 来检查和格式化两个项目中的代码.

I have a folder with two projects, a Nodejs backend and a Vuejs frontend. I want to open both projects at the same time, and being able to use eslint to check and format code in both.

我遇到的问题是,无论何时获得适用于 vue 项目的配置,后端的 js 文件都不会得到验证.

The problem I'm having is that whenever a get the configuration sort of working for the vue project, the js files in the backend are not validated.

我的主要问题是是否有可能做到这一点.我已经学习了无数关于让 eslint+prettier+airbnb 以及所有相关插件工作的教程.否则,是否最好打开两个 VSCode 实例,一个用于后端,另一个用于前端,每个实例都有自己的配置.

My main question is if it is possible at all to do this or not. I've already followed countless tutorials on getting eslint+prettier+airbnb plus all of the relevant plugins working. Else, if is it better to open two instances of VSCode, one for the backend and another for the frontend, each with its own configuration.

谢谢!!!

推荐答案

是的,您可以使用它.您需要更新工作区设置.

Yes, you can get this working. You'll need to update your workspace settings.

https://medium.com/devityoself/monorepo-eslint-vscode-6f5982c8404d

这篇关于两个项目工作区的 VSCode Eslint 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆