Skip to content

Commit

Permalink
feat: vue ref usage
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Sep 20, 2022
1 parent 73ee276 commit 63d50c5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"eslint-plugin-react": ">=7.29.0",
"eslint-plugin-react-hooks": ">=3.0.0",
"eslint-plugin-unicorn": ">=43.0.0",
"eslint-plugin-vue": ">=9.0.0",
"eslint-plugin-vue": ">=9.5.0",
"eslint-plugin-vue-scoped-css": ">=2.0.0"
},
"peerDependenciesMeta": {
Expand Down
6 changes: 6 additions & 0 deletions vue/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ module.exports = {
'vue/component-name-in-template-casing': ['warn', 'PascalCase', { registeredComponentsOnly: true }],
// 事件名必须使用 kebab-case,但允许以 : 分隔
'vue/custom-event-name-casing': ['error', 'kebab-case', { ignores: ['/^[a-z]+(?:-[a-z]+)*:[a-z]+(?:-[a-z]+)*$/u'] }],
// 在 <script lang="ts" setup> 下必须使用类型声明 defineEmits
'vue/define-emits-declaration': 'error',
// 在 <script lang="ts" setup> 下必须使用类型声明 defineProps
'vue/define-props-declaration': 'error',
// 自动为 HTML 注释内侧插入空格
'vue/html-comment-content-spacing': 'warn',
// 组件的 name 必须与文件名匹配
Expand All @@ -100,6 +104,8 @@ module.exports = {
'vue/no-duplicate-attr-inheritance': 'error',
// 禁止单文件组件内的空标签
'vue/no-empty-component-block': 'error',
// 禁止无标记的 ref 副作用
'vue/no-ref-object-destructure': 'error',
// 禁止绑定 v- 开头的属性
'vue/no-restricted-v-bind': 'error',
// 禁止传递不变的内联样式
Expand Down

0 comments on commit 63d50c5

Please sign in to comment.