coder-common-thin-frontend/eslint.config.js
Leo 696c8b1417 config(eslint): 更新Vue组件代码块顺序规范
- 修改vue/block-order规则为template→script→style顺序
- 与项目新规范保持一致,提升代码可读性
- 确保ESLint规则与团队开发规范同步
2025-07-07 00:16:29 +08:00

29 lines
778 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// eslint.config.js
import antfu from '@antfu/eslint-config'
// https://github.com/antfu/eslint-config
export default antfu(
{
ignores: [
'doc/**/*.md', // 忽略文档目录下的Markdown文件
],
typescript: {
overrides: {
'perfectionist/sort-exports': 'off',
'perfectionist/sort-imports': 'off',
'ts/no-unused-expressions': ['error', { allowShortCircuit: true }],
},
},
vue: {
overrides: {
'vue/no-unused-refs': 'off', // 暂时关闭等待vue-lint的分支合并
'vue/no-reserved-component-names': 'off',
'vue/component-definition-name-casing': 'off',
'vue/block-order': ['error', {
order: ['template', 'script', 'style'],
}],
},
},
},
)