当前位置: 首页 > news >正文

社区网站开发百度网站html验证

社区网站开发,百度网站html验证,建英语网站好,oa软件开发case: 最近使用webpack打包js资源中使用到了VS Code中的eslint插件辅助eslint plugin对代码进行校验#xff0c;在.eslintrc.js文件中以及webpack.config.js配置好后#xff0c; 在控制台运行npx webpack可以读取到eslint plugin的检测结果 一、eslint插件读取项目中.eslint…case: 最近使用webpack打包js资源中使用到了VS Code中的eslint插件辅助eslint plugin对代码进行校验在.eslintrc.js文件中以及webpack.config.js配置好后 在控制台运行npx webpack可以读取到eslint plugin的检测结果 一、eslint插件读取项目中.eslintrc.js配置文件 1、 eslint插件却始终不生效在代码里没有eslint插件该有的红色波浪线 查阅eslint插件官网找到如下描述 eslint.enable: enable/disable ESLint for the workspace folder. Is enabled by default.如图查找配置项找到configFile若有则看配置读取文件是否正确若不正确直接删掉吧 configFile如果不设置ESLint 会在当前工作目录及其父目录中查找默认的配置文件 所以在vscode配置文件中设置eslint.enable: true或者直接在配置setting.json文件中删除此配置因为有提示.enable配置将被弃用 二、 eslint插件读取.eslintignore文件失效(eslintignore文件不生效) 继续查阅文档 eslint.workingDirectories - specifies how the working directories ESLint is using are computed. ESLint resolves configuration files (e.g. eslintrc, .eslintignore) relative to a working directory so it is important to configure this correctly. If executing ESLint in the terminal requires you to change the working directory in the terminal into a sub folder then it is usually necessary to tweak this setting. (see also ESLint class options#cwd). Please also keep in mind that the .eslintrc* file is resolved considering the parent directories whereas the .eslintignore file is only honored in the current working directory. The following values can be used:[{ mode: location }] (since 2.0.0): instructs ESLint to uses the workspace folder location or the file location (if no workspace folder is open) as the working directory. This is the default and is the same strategy as used in older versions of the ESLint extension (1.9.x versions). [{ mode: auto }] (since 2.0.0): instructs ESLint to infer a working directory based on the location of package.json, .eslintignore and .eslintrc* files. This might work in many cases but can lead to unexpected results as well. string[]: an array of working directories to use. Consider the following directory layout: root/client/.eslintrc.jsonclient.jsserver/.eslintignore.eslintrc.jsonserver.js Then using the setting:eslint.workingDirectories: [ ./client, ./server ] will validate files inside the server directory with the server directory as the current eslint working directory. Same for files in the client directory. The ESLint extension will also change the processs working directory to the provided directories. If this is not wanted a literal with the !cwd property can be used (e.g. { directory: ./client, !cwd: true }). This will use the client directory as the ESLint working directory but will not change the processs working directory. [{ pattern: glob pattern }] (since 2.0.0): Allows to specify a pattern to detect the working directory. This is basically a short cut for listing every directory. If you have a mono repository with all your projects being below a packages folder you can use { pattern: ./packages/*/ } to make all these folders working directories.翻译一下 eslint.workingDirectories 此配置其实就是设置eslint工作目录所以我们在setting.json文件中配置工目录 [{ mode: location }] 默认的 [{ mode: auto }] 指示ESLint根据包的位置推断工作目录。.eslintignore和.eslintrc*文件。这可能在许多情况下有效但也可能导致意想不到的结果 [{ pattern: glob pattern }]允许指定检测工作目录的模式。这基本上是列出每个目录的捷径。如果你有一个单一的存储库所有的项目都在一个包文件夹下你可以使用{pattern: ./packages/*/}将所有这些文件夹设置为工作目录。很显然。默认的配置噶了所以剩下下面两个推断与指定了
http://www.hkea.cn/news/14562201/

相关文章:

  • 云南网站优化排名长沙专业网站优化定制
  • 做网站应下哪个软件重点实验室网站建设的意义
  • 哈尔滨cms网站建设服务专业的网页制作公司
  • 专业网站建站企业标小智在线logo免费设计
  • 苏州乡村旅游网站建设策划书.doc自己做网站需要花钱吗
  • 小昆山网站建设小学生广告语20条
  • 潍坊网站制作策划哈尔滨小程序开发制作公司
  • vue做直播网站将wordpress做成淘宝客
  • 求个国外在线网站重庆排名seo公司
  • 网站首页seo怎么做wordpress 自定义头像插件
  • 东方建设官方网站陕西一建2022停考
  • 网页设计网站费用天津网站建设的公司哪家好
  • 湖南网站建站系统哪家好google翻译
  • 微盟是做什么的优化设计七年级上册英语答案
  • 国家标准物质网站建设wifi管理网站
  • 网站项目规划与设计方案百度图片搜索网页版
  • 微信网站建设报价广州注册公司核名
  • 被墙的网站有哪些常熟做公司网站
  • 有域名建网站推广平台有哪些app
  • 织梦网站程序模板下载地址中文域名.网站
  • 怎么查网站关键词排名长沙互联网企业
  • 旅游扁平化设计网站模板商场大型话题活动策划网站
  • 数字域名做网站哪个网站可以做立体字的模板
  • 网站设计公司哪家wordpress图片放大插件
  • 服务器iis做网站网站制作好吗
  • 谷歌做英文网站东莞地产公司网站建设
  • 珠海网站建设策略网站建设xs029
  • 上海网站建设企业名录怎么制作游戏?
  • 150网站建设php网站开发电子书
  • wordpress 整站加密平面设计工作室创业计划书