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

社区网站开发学了网站建设的心得体会

社区网站开发,学了网站建设的心得体会,微信公众平台如何与wordpress对接实现自动回复功能,苏州信息网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.dnsts.com.cn/news/204241.html

相关文章:

  • 有没有交流做服装的网站网站怎样做优化调整
  • 燕郊做网站的公司网站建设案例咨询
  • 网页游戏排行榜前十推荐杭州优化seo
  • 如何加快百度收录网站个人主页模板图片导航栏
  • 瀑布流网站后台app推广团队
  • 建设网站需要提前准备的条件免费创建个人博客网站
  • 怎样做网站平台赚钱广告投放申请入口
  • 经营阅读网站需要怎么做广告制作公司属于什么行业类别
  • 海沧区建设局网站市政处网站设计毕业设计论文
  • 林州网站建设最新引流推广方法
  • 凡科建站电脑版网址个人网站页面模板
  • 网站建的创新点wordpress主题不支持php7
  • 网站的建设需要考虑什么问题船舶设计公司排名
  • 网站被收录要怎么做网站3级目录可以做导航分类么
  • 有哪些网站可以做视频春季高考网站建设
  • 天津做网站的企业百度企业号
  • 网站入口你会回来感谢我的wordpress搜索页分页
  • win7如何安装iis来浏览asp网站wordpress wp采集规则
  • 中国做网站的公司有哪些中国建筑装饰网排行
  • iis服务器怎么部署php网站同城类网站建设多少钱
  • 外贸网站推广哪个平台好wordpress 获取当前自定义分类
  • 选服务好的网站建设设计和建设一个网站要多少钱
  • seo站长常用工具最好的网络营销软件
  • 网站关键词字数北京自助建站系统
  • 网站出现转站怎么办货运网站建设公司
  • 织梦做的网站 首页有空白制造业erp系统软件有哪些
  • 化学商城网站建设wordpress镶入thinkphp
  • 印度人做网站百度大全
  • 网站建设收费标准渠道thinkcmf跟wordpress
  • 怎样创建网站信息平台wordpress 裁剪图片上传