feat: 添加更多文本文件扩展名以增强文件类型识别

This commit is contained in:
xiongxiao
2026-03-14 00:53:20 +08:00
committed by cnb
parent b60f365a6b
commit 7689dd512d

View File

@@ -5,6 +5,10 @@ import path from 'node:path';
const TEXT_FILE_EXTENSIONS = [
// 前端/脚本
'.js', '.mjs', '.cjs', '.ts', '.mts', '.cts', '.jsx', '.tsx', '.vue', '.svelte', '.astro',
// 文本网页
'.html', '.htm', '.xhtml', '.xml', '.svg', '.styl',
// 配置文件
'.json', '.yaml', '.yml', '.toml', '.ini', '.env', '.properties', '.conf', '.config',
// node 相关
'.npmrc', '.yarnrc', '.babelrc', '.eslintrc', '.prettierrc', '.stylelintrc',
// 样式