某些項目可能要求代碼中不允許使用簡體字
安裝stcheck檢查
yarn add stcheck --dev
 
在項目根目錄創建 st.config.json 文件
{
  "patterns": [
    "./**/*.(ts|js|tsx|jsx|vue|html)",
    "!**/node_modules/**",
    "!.git/**"
  ],
  "gitignore": true,
  "ignoreTexts": ["简体中文"],
  "ignoreComments": true
}
 
可在項目package.json 配置scripts,方便執行
{
	...
	"scripts": {
		"st": "stcheck",
	}
}
 
使用
yard run st
 

 它就能把項目中的簡體字找出,並且告訴你他對應到繁體字。



















