eslint eslint踩坑日記

2022-01-15 20:53:03 字數 780 閱讀 5084

用腳手架建立乙個vue cli3專案,採用eslint+prettie 進行**格式化。

啟用eslint 後會有   failed to load config "standard" to extend from.報錯

解決辦法 

yarn add eslint-plugin-promise

yarn add eslint-plugin-node

yarn add eslint-plugin-import

yarn add eslint-plugin-standard

yarn add eslint-config-standard

錯誤** expected indentation of 2 spaces but found 1 tab

解決辦法     rules中新增   indent: ['error', 'tab'],   eslint預設是用2個空格縮排,這句話改為使用tab縮排 ,配合.editorconfig檔案中的

indent_style = tab

indent_size = 4 **4空格縮排效果

eslint 配置  解決 4個空格,空格與tab衝突等問題

新增.editorconfig  .eslintignore .eslintrc.js 這三個檔案

需改 settings.json

給乙個調好eslint的的鏈結

提取碼7uff

SpringBoot Mybatis踩坑日記

問題描述 手動寫了一段sql如下,控制台報錯,找不到原因 mybatisquerybrandbypage resulttype brand select id,name,image,letter from tb brand key null and key name like concat or l...

systemtap embedded C 踩坑筆記

官方文件 systemtap的embedded c中,不能 include 也不能用printf和print。那怎麼列印呢?用stap printf。用法與printf一樣。還可以訪問cript中的全域性變數。官方文件中的示例 global var global var2 100 function ...

Aggregation MongoDB踩坑記錄

對某些篩選條件進行分頁查詢,開始每一頁的有效data都不足pagesize,最後發現,aggregation 的pipeline是有先後順序的。錯誤 agg aggregation.newaggregation aggregation.skip curpage 1 pagesize aggregat...