diff --git a/.eslintrc b/.eslintrc index ecbcce37..039781b9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,24 +7,16 @@ ], "rules": { "vue/multi-word-component-names": "off", - "vue/attribute-hyphenation": "off", - "vue/v-on-event-hyphenation": "off", + "vue/attribute-hyphenation": ["error", "never"], + "vue/v-on-event-hyphenation": ["error", "never"], + "vue/no-v-html": "off", "vue/block-lang": ["error", { "script": { "lang": "ts" } }], "vue/block-order": ["error", { "order": ["script[setup]", "template", "style[scoped]"] }], - "vue/block-tag-newline": [ - "error", - { "singleline": "always", "multiline": "always", "maxEmptyLines": 1 } - ], "vue/component-api-style": ["error", ["script-setup"]], - "vue/component-name-in-template-casing": [ - "error", - "PascalCase", - { "registeredComponentsOnly": true } - ], - "vue/component-options-name-casing": ["error", "PascalCase"], - "vue/custom-event-name-casing": ["error", "camelCase"], - "vue/define-emits-declaration": ["error", "type-based"], + "vue/component-name-in-template-casing": "error", + "vue/custom-event-name-casing": "error", + "vue/define-emits-declaration": "error", "vue/define-macros-order": [ "error", { @@ -32,7 +24,21 @@ "defineExposeLast": true } ], - "vue/define-props-declaration": ["error", "type-based"], - "vue/html-button-has-type": ["error", { "button": true, "submit": true, "reset": true }] + "vue/define-props-declaration": "error", + "vue/html-button-has-type": "error", + "vue/no-multiple-objects-in-class": "warn", + "vue/no-restricted-call-after-await": "error", + "vue/no-template-target-blank": "error", + "vue/no-unused-refs": "warn", + "vue/no-use-v-else-with-v-for": "error", + "vue/no-v-text": "error", + "vue/padding-line-between-blocks": "warn", + "vue/prefer-define-options": "error", + "vue/prefer-separate-static-class": "error", + "vue/prefer-true-attribute-shorthand": "warn", + "vue/require-macro-variable-name": "error", + "vue/require-typed-ref": "warn", + "vue/v-for-delimiter-style": "error", + "vue/valid-define-options": "error" } } diff --git a/app/src/routes/(backstage)/(library)/data-display/tree/Basic.vue b/app/src/routes/(backstage)/(library)/data-display/tree/Basic.vue index c38c9eff..9aa8d845 100644 --- a/app/src/routes/(backstage)/(library)/data-display/tree/Basic.vue +++ b/app/src/routes/(backstage)/(library)/data-display/tree/Basic.vue @@ -4,7 +4,7 @@ import { XTree } from '@x/ui'; import nodesData from './nodesData'; -const nodes = ref(); +const nodes = ref(); onMounted(() => { nodes.value = structuredClone(nodesData); @@ -12,10 +12,10 @@ onMounted(() => { type XTreeProps = InstanceType; -const selected = ref(); +const selected = ref(''); const nodeSelect: XTreeProps['onSelect'] = (node) => { - selected.value = node.value; + selected.value = node.value as string; }; diff --git a/app/src/routes/(backstage)/(library)/data-display/tree/Controlled.vue b/app/src/routes/(backstage)/(library)/data-display/tree/Controlled.vue index 117acc0e..775888ce 100644 --- a/app/src/routes/(backstage)/(library)/data-display/tree/Controlled.vue +++ b/app/src/routes/(backstage)/(library)/data-display/tree/Controlled.vue @@ -6,8 +6,8 @@ import { XTree, XButton } from '@x/ui'; import nodesData from './nodesData'; const tree = ref>(); -const selected = ref(); -const nodes = ref(); +const selected = ref(''); +const nodes = ref(); onMounted(() => { nodes.value = structuredClone(nodesData); diff --git a/app/src/routes/(backstage)/(library)/data-display/tree/Lazy.vue b/app/src/routes/(backstage)/(library)/data-display/tree/Lazy.vue index 2b9ab05d..8275670e 100644 --- a/app/src/routes/(backstage)/(library)/data-display/tree/Lazy.vue +++ b/app/src/routes/(backstage)/(library)/data-display/tree/Lazy.vue @@ -1,8 +1,9 @@