docs: complete project code annotations
This commit is contained in:
@@ -6,6 +6,7 @@ import vueCss from 'eslint-plugin-vue-scoped-css';
|
||||
import globals from 'globals';
|
||||
import typescript from 'typescript-eslint';
|
||||
|
||||
/** 组合 Antfu 基础规则与本项目 Vue、样式和导入排序约束。 */
|
||||
export default antfu(
|
||||
{
|
||||
typescript: true,
|
||||
@@ -19,6 +20,7 @@ export default antfu(
|
||||
...vueCss.configs['flat/recommended'],
|
||||
prettier,
|
||||
{
|
||||
// 为浏览器、Node 和 Vue 单文件组件脚本补充全局变量及解析器。
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
@@ -48,6 +50,7 @@ export default antfu(
|
||||
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
|
||||
},
|
||||
|
||||
// 项目规则覆盖:允许现有模板写法,并统一采用 simple-import-sort。
|
||||
rules: {
|
||||
/* Closed due to template running
|
||||
* (Recommended to open!)
|
||||
@@ -97,6 +100,7 @@ export default antfu(
|
||||
},
|
||||
},
|
||||
{
|
||||
// Vue 模板专属的组件命名、块顺序和 scoped 样式约束。
|
||||
files: ['**/*.vue'],
|
||||
|
||||
rules: {
|
||||
@@ -131,6 +135,7 @@ export default antfu(
|
||||
'vue/padding-line-between-blocks': ['error', 'never'],
|
||||
},
|
||||
},
|
||||
// 排除依赖、生成产物和不参与常规 lint 的辅助目录。
|
||||
globalIgnores([
|
||||
'**/snapshot*',
|
||||
'**/dist',
|
||||
|
||||
Reference in New Issue
Block a user