59 lines
947 B
JavaScript
59 lines
947 B
JavaScript
module.exports = {
|
|
// 基础配置
|
|
printWidth: 100,
|
|
tabWidth: 2,
|
|
useTabs: false,
|
|
semi: false,
|
|
singleQuote: true,
|
|
quoteProps: 'as-needed',
|
|
trailingComma: 'none',
|
|
bracketSpacing: true,
|
|
bracketSameLine: false,
|
|
arrowParens: 'avoid',
|
|
|
|
// 换行符
|
|
endOfLine: 'lf',
|
|
|
|
// Vue 文件配置
|
|
vueIndentScriptAndStyle: false,
|
|
|
|
// HTML 配置
|
|
htmlWhitespaceSensitivity: 'css',
|
|
|
|
// 覆盖配置
|
|
overrides: [
|
|
{
|
|
files: '*.vue',
|
|
options: {
|
|
parser: 'vue'
|
|
}
|
|
},
|
|
{
|
|
files: '*.json',
|
|
options: {
|
|
parser: 'json',
|
|
trailingComma: 'none'
|
|
}
|
|
},
|
|
{
|
|
files: '*.md',
|
|
options: {
|
|
parser: 'markdown',
|
|
printWidth: 80,
|
|
proseWrap: 'preserve'
|
|
}
|
|
},
|
|
{
|
|
files: '*.scss',
|
|
options: {
|
|
parser: 'scss'
|
|
}
|
|
},
|
|
{
|
|
files: '*.css',
|
|
options: {
|
|
parser: 'css'
|
|
}
|
|
}
|
|
]
|
|
} |