Skip to content

Commit

Permalink
fix: missing galaxy typescript rules
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed May 17, 2024
1 parent e7fca43 commit d7f59a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configs/galaxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ export default defineConfig(options => {
'galaxy/non-control-statement-curly': 'warn',
},
},
...(options.typescript ? [
{
rules: {
// 禁止使用 `as any`
'galaxy/no-as-any': 'error',
},
},
] : []),
...(options.vue ? [
{
rules: {
Expand Down Expand Up @@ -58,6 +66,8 @@ export default defineConfig(options => {
}],
// 禁止使用歧义的 props 默认值
'galaxy/no-ambiguous-vue-default-props': 'error',
// 自动合并重复的 store 映射
'galaxy/no-duplicate-vue-store-mappings': 'warn',
// 自动移除模板引号内侧的空格
'galaxy/vue-attribute-spacing': 'warn',
},
Expand Down

0 comments on commit d7f59a8

Please sign in to comment.