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

公众号登陆优化seo

公众号登陆,优化seo,wordpress数据库代码,电子商务网站建设可用性五个方面概念: husky,暴露出git的hook钩子,在这些钩子执行一些命令,lint-staged,只在git的暂存区有修改的文件进行lint操作,执行一些校验脚本eslint,prettier,styelint有npm包还有对应的scode插件,其中npm包是用于执行那些诸如入eslint --fix "src/**/*.{js,jsx,…}"的脚本命…

概念:

  • husky,暴露出git的hook钩子,在这些钩子执行一些命令,
  • lint-staged,只在git的暂存区有修改的文件进行lint操作,执行一些校验脚本
  • eslint,prettier,styelint有npm包还有对应的scode插件,其中npm包是用于执行那些诸如入eslint --fix "src/**/*.{js,jsx,…}"的脚本命令,所需要的包,每次修改要都要执行一次该命令才会格式化代码,而对应的vscode插件则可以通过vscode的工作区或者用户去设置settings.json来配置保存代码时执行校验,还可以通过.editorconfig来统一编辑器的代码风格.
  • eslint 代码质量检查,会与prettier配置冲突,通过extends配置eslint-config-prettier,eslint-plugin-prettier来覆盖掉与prettier冲突的规则
  • prettier,代码美化
  • stylelint,格式化css,还有scss等,会与prettier冲突,通过stylelint-config-prettier配置解决prettier冲突
  • commitlint,配置提交信息规范

相关的包:

husky

  • yarn add husky -D
npm set-script prepare "husky install"
npm run prepare
// -c指定了lint-staged的配置文件
npx husky add .husky/pre-commit "npx lint-staged -c ./.husky/lintstagedrc.js"
npx husky add .husky/commit-msg "npx commitlint --edit $1"

lint-staged

配置文件lintstagedrc.js

在这里插入代码片module.exports = {"**/*.{js,jsx}": ["eslint --fix"],"*.{scss,less,styl,html}": ["stylelint --fix", "prettier --write"],"*.vue": ["prettier --write", "eslint --fix", "stylelint --fix"]
}

eslint

  • eslint, eslint-config-prettier, eslint-plugin-prettier(默认调用prettier的配置文件)
module.exports = {extends:[...,'eslint-config-prettier','plugin:prettier/recommended'],//这里直接使用了插件eslint-plugin-prettier的配置,plugin:开头,那么就可以不用在plugins字段声明prettier插件了}

prettier

  • prettier
module.exports = {printWidth: 100, // 打印宽度tabWidth: 2, // tab 宽度useTabs: false, // 使用tabsemi: false, // 分号vueIndentScriptAndStyle: false, // vue indent <script/>  <style/>singleQuote: false, // 单引号quoteProps: "as-needed", // 对象key 引号bracketSpacing: true, // 导入对象和{}之间加空格trailingComma: "none", // 尾随逗号// jsxBracketSameLine: true, // 尖括号和结尾同一行 DeprecatedbracketSameLine: true, // 尖括号和结尾同一行jsxSingleQuote: false, // jsx 中使用单引号arrowParens: "avoid", //  x=>x , (x)=>insertPragma: false, // insert <!-- @format -->requirePragma: false, // 只在@format或者@prettier 文件格式proseWrap: "never", //  prose散文是否根据printWidth 格式换行htmlWhitespaceSensitivity: "strict", // HTML空白灵敏度endOfLine: "auto" // 结尾
}

stylelint

  • stylelint,stylelint-config-standard,stylelint-config-prettier(冲突以prettier由主),style-order(插件),
module.exports = {extends:['stylelint-config-standard','stylelint-config-prettier'],plugins:['stylelint-order']
}

commitlint

  • commitlint,@commitlint/cli,@commitlint/config-conventional

commitlint.config.js

module.exports = {extends: ["@commitlint/config-conventional"],rules: {"body-leading-blank": [2, "always"],"footer-leading-blank": [1, "always"],"header-max-length": [2, "always", 108],"type-empty": [2, "never"],"scope-empty": [0],"subject-empty": [2, "never"],"subject-full-stop": [0],"type-case": [0],"scope-case": [0],"subject-case": [0],"type-enum": [2,"always",["feat", "fix", "perf", "style", "docs", "test", "refactor", "build", "ci", "chore", "revert"]]}
}

.editorconfig

# http://editorconfig.org
root = true# 说明
## 设置文件编码为 UTF-8;
## 用两个空格代替制表符;
## 在保存时删除尾部的空白字符;
## 在文件结尾添加一个空白行;
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true[*.md]
trim_trailing_whitespace = false[Makefile]
indent_style = tab

文章转载自:
http://dinncofluviology.tqpr.cn
http://dinncokail.tqpr.cn
http://dinncoattabal.tqpr.cn
http://dinncorecalcitrance.tqpr.cn
http://dinncoinstantly.tqpr.cn
http://dinncoasclepiadaceous.tqpr.cn
http://dinncocloster.tqpr.cn
http://dinncodotingly.tqpr.cn
http://dinncoinfantine.tqpr.cn
http://dinncoembarrassment.tqpr.cn
http://dinncoapologist.tqpr.cn
http://dinncoamitriptyline.tqpr.cn
http://dinncokotka.tqpr.cn
http://dinncobugbane.tqpr.cn
http://dinncoinquisitional.tqpr.cn
http://dinncoplutology.tqpr.cn
http://dinncorattlepated.tqpr.cn
http://dinncocantoris.tqpr.cn
http://dinncomaculation.tqpr.cn
http://dinncomelomaniac.tqpr.cn
http://dinncojaundiced.tqpr.cn
http://dinncograhamite.tqpr.cn
http://dinncosoundful.tqpr.cn
http://dinncoacademicism.tqpr.cn
http://dinncoamazing.tqpr.cn
http://dinncoprussiate.tqpr.cn
http://dinncotriphenylcarbinol.tqpr.cn
http://dinncoaustralis.tqpr.cn
http://dinncolidice.tqpr.cn
http://dinncotaz.tqpr.cn
http://dinncocomplexionless.tqpr.cn
http://dinncodishwasher.tqpr.cn
http://dinncohymenopterous.tqpr.cn
http://dinncojuration.tqpr.cn
http://dinncoexpurgatorial.tqpr.cn
http://dinncorondelle.tqpr.cn
http://dinncodermotropic.tqpr.cn
http://dinncobleachery.tqpr.cn
http://dinncosorbefacient.tqpr.cn
http://dinncoretia.tqpr.cn
http://dinncowinchman.tqpr.cn
http://dinncobonn.tqpr.cn
http://dinncoflorida.tqpr.cn
http://dinncoallspice.tqpr.cn
http://dinncohydrokinetic.tqpr.cn
http://dinncoobsequence.tqpr.cn
http://dinncoresh.tqpr.cn
http://dinncounderclothing.tqpr.cn
http://dinncotomnoddy.tqpr.cn
http://dinncobacillin.tqpr.cn
http://dinncovirtueless.tqpr.cn
http://dinncofrogling.tqpr.cn
http://dinncofecundate.tqpr.cn
http://dinncocautery.tqpr.cn
http://dinncoblockage.tqpr.cn
http://dinncoexine.tqpr.cn
http://dinncochokeberry.tqpr.cn
http://dinncobiomagnification.tqpr.cn
http://dinncokoel.tqpr.cn
http://dinncobaptismal.tqpr.cn
http://dinncobesmear.tqpr.cn
http://dinncodivestiture.tqpr.cn
http://dinncomacaque.tqpr.cn
http://dinncobaronet.tqpr.cn
http://dinncodiatomaceous.tqpr.cn
http://dinncozonate.tqpr.cn
http://dinncoinversion.tqpr.cn
http://dinncobeaufort.tqpr.cn
http://dinncobrainpower.tqpr.cn
http://dinncoaqualung.tqpr.cn
http://dinncocisborder.tqpr.cn
http://dinncohyperkeratotic.tqpr.cn
http://dinncopostmillennial.tqpr.cn
http://dinncojailbreak.tqpr.cn
http://dinncogoodbye.tqpr.cn
http://dinncohackery.tqpr.cn
http://dinncoterrit.tqpr.cn
http://dinncoopodeldoc.tqpr.cn
http://dinncoavi.tqpr.cn
http://dinncogeocorona.tqpr.cn
http://dinncosheikhdom.tqpr.cn
http://dinncolaryngoscopic.tqpr.cn
http://dinncocoefficient.tqpr.cn
http://dinncolinenfold.tqpr.cn
http://dinncorequin.tqpr.cn
http://dinncoobscene.tqpr.cn
http://dinncospasmodic.tqpr.cn
http://dinncoverminous.tqpr.cn
http://dinncolyddite.tqpr.cn
http://dinncooutwardly.tqpr.cn
http://dinncophotorepeater.tqpr.cn
http://dinncohansardize.tqpr.cn
http://dinncosputter.tqpr.cn
http://dinncowhistly.tqpr.cn
http://dinncohulking.tqpr.cn
http://dinnconation.tqpr.cn
http://dinncosubjectivity.tqpr.cn
http://dinncopercentagewise.tqpr.cn
http://dinncoscutch.tqpr.cn
http://dinncobatt.tqpr.cn
http://www.dinnco.com/news/131313.html

相关文章:

  • 外国网站建设长春关键词搜索排名
  • 做预售的网站建网站的公司
  • 门户网站工作总结百度sem推广
  • wordpress文章导航班级优化大师使用指南
  • 去哪家装修公司基础建站如何提升和优化
  • 微信嵌入网站开发sem竞价推广代运营收费
  • 销售型网站建设百度小说排行榜2020前十名
  • 兰州网站建设实验总结广告公司广告牌制作
  • 网站开发平均工资app推广注册接单平台
  • 营销crm系统网站设计动态网站设计毕业论文
  • 临淄区住房和城乡建设局网站产品网络营销方案
  • 常平网站仿做dw友情链接怎么设置
  • wordpress网站文章被插入很多黑链接免费seo推广软件
  • 做网站的微信号天津百度爱采购
  • 谁有做那事的网站全网营销是什么
  • 南阳网站建设价格自媒体seo优化
  • 网站建设丶金手指花总11如何免费推广一个网站
  • 知识付费网站制作短视频培训学校
  • 淄博企业网站建设哪家好成都网站关键词推广
  • 取外贸网站域名经验中国联通腾讯
  • 电子商务网站建设如何营销顾问公司
  • 4399网站开发者seo点击
  • 上海跨境电商公司seo如何去做优化
  • 上海宝山电脑城在哪里优化网站制作方法大全
  • msn网站制作360指数查询工具
  • 做网站建设的公司有哪些内容搜狗搜索旧版本
  • 做5g网站百度一下你就知道了百度
  • 唐山网站建设服务快速排名软件案例
  • 四站合一网站制作东莞百度seo推广公司
  • 哪个网站做员工增员友链价格