中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁 > news >正文

網(wǎng)絡(luò)知識培訓(xùn)寧波seo營銷平臺

網(wǎng)絡(luò)知識培訓(xùn),寧波seo營銷平臺,網(wǎng)頁制作設(shè)計方案,網(wǎng)站開發(fā)過程有幾個階段概念: husky,暴露出git的hook鉤子,在這些鉤子執(zhí)行一些命令,lint-staged,只在git的暫存區(qū)有修改的文件進(jìn)行l(wèi)int操作,執(zhí)行一些校驗?zāi)_本eslint,prettier,styelint有npm包還有對應(yīng)的scode插件,其中npm包是用于執(zhí)行那些諸如入eslint --fix "src/**/*.{js,jsx,…}"的腳本命…

概念:

  • husky,暴露出git的hook鉤子,在這些鉤子執(zhí)行一些命令,
  • lint-staged,只在git的暫存區(qū)有修改的文件進(jìn)行l(wèi)int操作,執(zhí)行一些校驗?zāi)_本
  • eslint,prettier,styelint有npm包還有對應(yīng)的scode插件,其中npm包是用于執(zhí)行那些諸如入eslint --fix "src/**/*.{js,jsx,…}"的腳本命令,所需要的包,每次修改要都要執(zhí)行一次該命令才會格式化代碼,而對應(yīng)的vscode插件則可以通過vscode的工作區(qū)或者用戶去設(shè)置settings.json來配置保存代碼時執(zhí)行校驗,還可以通過.editorconfig來統(tǒng)一編輯器的代碼風(fēng)格.
  • eslint 代碼質(zhì)量檢查,會與prettier配置沖突,通過extends配置eslint-config-prettier,eslint-plugin-prettier來覆蓋掉與prettier沖突的規(guī)則
  • prettier,代碼美化
  • stylelint,格式化css,還有scss等,會與prettier沖突,通過stylelint-config-prettier配置解決prettier沖突
  • commitlint,配置提交信息規(guī)范

相關(guān)的包:

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(默認(rèn)調(diào)用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, // 導(dǎo)入對象和{}之間加空格trailingComma: "none", // 尾隨逗號// jsxBracketSameLine: true, // 尖括號和結(jié)尾同一行 DeprecatedbracketSameLine: true, // 尖括號和結(jié)尾同一行jsxSingleQuote: false, // jsx 中使用單引號arrowParens: "avoid", //  x=>x , (x)=>insertPragma: false, // insert <!-- @format -->requirePragma: false, // 只在@format或者@prettier 文件格式proseWrap: "never", //  prose散文是否根據(jù)printWidth 格式換行htmlWhitespaceSensitivity: "strict", // HTML空白靈敏度endOfLine: "auto" // 結(jié)尾
}

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# 說明
## 設(shè)置文件編碼為 UTF-8;
## 用兩個空格代替制表符;
## 在保存時刪除尾部的空白字符;
## 在文件結(jié)尾添加一個空白行;
[*]
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://www.risenshineclean.com/news/21811.html

相關(guān)文章:

  • 建設(shè)工程教育網(wǎng)站論壇河南網(wǎng)站推廣電話
  • 單頁網(wǎng)站制作 在線 支付app注冊推廣團(tuán)隊
  • h5 和手機(jī)網(wǎng)站加快百度收錄的方法
  • 響應(yīng)式網(wǎng)站費(fèi)用中國制造網(wǎng)外貿(mào)平臺
  • 住房和城鄉(xiāng)建設(shè)部政務(wù)服務(wù)門戶網(wǎng)站網(wǎng)頁分析工具
  • 電子商務(wù)網(wǎng)站技術(shù)方案廣州知名網(wǎng)絡(luò)推廣公司
  • 公網(wǎng)怎么做網(wǎng)站石家莊疫情
  • 網(wǎng)站主題旁邊的圖標(biāo)怎么做的88個seo網(wǎng)站優(yōu)化基礎(chǔ)知識點
  • 網(wǎng)站建設(shè)走什么科目安順seo
  • 網(wǎng)站建設(shè)維護(hù)升級網(wǎng)頁制作費(fèi)用大概多少
  • 畢設(shè)代做網(wǎng)站深圳網(wǎng)絡(luò)營銷推廣方案
  • 做網(wǎng)站能賺多少丈哥seo博客
  • 自己做個網(wǎng)站需要幾個軟件推廣接單平臺
  • 自己做網(wǎng)站代理產(chǎn)品網(wǎng)絡(luò)營銷的概念和含義
  • 哪個網(wǎng)站做海外代購磁力貓torrentkitty官網(wǎng)
  • 住房和城鄉(xiāng)建設(shè)部網(wǎng)站造價網(wǎng)絡(luò)優(yōu)化行業(yè)的發(fā)展前景
  • 17做網(wǎng)站廣州沙河品牌營銷策劃方案怎么做才好
  • 2015微信網(wǎng)站百度官網(wǎng)推廣
  • 外發(fā)加工網(wǎng)站哪個靠譜整站優(yōu)化快速排名
  • 如何做好網(wǎng)站管理工作pc端百度
  • 如何自己免費(fèi)建網(wǎng)站哪些平臺可以做推廣
  • 鄭州網(wǎng)站制作推廣公司抖音推廣合作方式
  • 做影視網(wǎng)站有什么風(fēng)險如何讓百度收錄
  • 江蘇宏澄建設(shè)有限公司網(wǎng)站百度秒收錄技術(shù)最新
  • 百度關(guān)鍵詞優(yōu)化多少錢seo優(yōu)化技術(shù)教程
  • 樹在線網(wǎng)頁制作網(wǎng)站今日足球最新預(yù)測比分
  • 數(shù)據(jù)資源網(wǎng)站如何做企業(yè)策劃咨詢公司
  • 想讓一個網(wǎng)站上線需要怎么做營銷手機(jī)系統(tǒng)安裝
  • 可以做外鏈的圖片網(wǎng)站成都網(wǎng)絡(luò)營銷推廣公司
  • 如何做視頻網(wǎng)站流程圖關(guān)于營銷的最新的新聞