You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/define-macros-order.md
+37-4Lines changed: 37 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
pageClass: rule-details
3
3
sidebarDepth: 0
4
4
title: vue/define-macros-order
5
-
description: enforce order of `defineEmits` and `defineProps` compiler macros
5
+
description: enforce order of compiler macros (`defineProps`, `defineEmits`, etc.)
6
6
since: v8.7.0
7
7
---
8
8
9
9
# vue/define-macros-order
10
10
11
-
> enforce order of `defineEmits` and `defineProps` compiler macros
11
+
> enforce order of compiler macros (`defineProps`, `defineEmits`, etc.)
12
12
13
13
-:wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
14
14
-:bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
15
15
16
16
## :book: Rule Details
17
17
18
-
This rule reports the `defineProps`and`defineEmits`compiler macros when they are not the first statements in `<script setup>` (after any potential import statements or type definitions) or when they are not in the correct order.
18
+
This rule reports compiler macros (like `defineProps`or`defineEmits`but also custom ones) when they are not the first statements in `<script setup>` (after any potential import statements or type definitions) or when they are not in the correct order.
19
19
20
20
## :wrench: Options
21
21
@@ -28,7 +28,7 @@ This rule reports the `defineProps` and `defineEmits` compiler macros when they
28
28
}
29
29
```
30
30
31
-
-`order` (`string[]`) ... The order of defineEmits and defineProps macros. You can also add `"defineOptions"`, `"defineSlots"`, and `"defineModel"`.
31
+
-`order` (`string[]`) ... The order in which the macros should appear. The default is `["defineProps", "defineEmits"]`.
32
32
-`defineExposeLast` (`boolean`) ... Force `defineExpose` at the end.
Copy file name to clipboardExpand all lines: docs/rules/index.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,7 +213,7 @@ For example:
213
213
|[vue/component-options-name-casing](./component-options-name-casing.md)| enforce the casing of component name in `components` options |:wrench::bulb:|:hammer:|
214
214
|[vue/custom-event-name-casing](./custom-event-name-casing.md)| enforce specific casing for custom event name ||:hammer:|
215
215
|[vue/define-emits-declaration](./define-emits-declaration.md)| enforce declaration style of `defineEmits`||:hammer:|
216
-
|[vue/define-macros-order](./define-macros-order.md)| enforce order of `defineEmits` and `defineProps` compiler macros|:wrench::bulb:|:lipstick:|
216
+
|[vue/define-macros-order](./define-macros-order.md)| enforce order of compiler macros (`defineProps`, `defineEmits`, etc.)|:wrench::bulb:|:lipstick:|
217
217
|[vue/define-props-declaration](./define-props-declaration.md)| enforce declaration style of `defineProps`||:hammer:|
218
218
|[vue/enforce-style-attribute](./enforce-style-attribute.md)| enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags ||:hammer:|
219
219
|[vue/html-button-has-type](./html-button-has-type.md)| disallow usage of button without an explicit type attribute ||:hammer:|
@@ -224,13 +224,15 @@ For example:
224
224
|[vue/match-component-import-name](./match-component-import-name.md)| require the registered component name to match the imported component name ||:warning:|
225
225
|[vue/max-lines-per-block](./max-lines-per-block.md)| enforce maximum number of lines in Vue SFC blocks ||:warning:|
226
226
|[vue/max-props](./max-props.md)| enforce maximum number of props in Vue component ||:warning:|
227
+
|[vue/max-template-depth](./max-template-depth.md)| enforce maximum depth of template ||:warning:|
227
228
|[vue/new-line-between-multi-line-property](./new-line-between-multi-line-property.md)| enforce new lines between multi-line properties in Vue components |:wrench:|:lipstick:|
228
229
|[vue/next-tick-style](./next-tick-style.md)| enforce Promise or callback style in `nextTick`|:wrench:|:hammer:|
229
230
|[vue/no-bare-strings-in-template](./no-bare-strings-in-template.md)| disallow the use of bare strings in `<template>`||:hammer:|
|[vue/no-deprecated-delete-set](./no-deprecated-delete-set.md)| disallow using deprecated `$delete` and `$set` (in Vue.js 3.0.0+) ||:warning:|
231
233
|[vue/no-deprecated-model-definition](./no-deprecated-model-definition.md)| disallow deprecated `model` definition (in Vue.js 3.0.0+) |:bulb:|:warning:|
232
234
|[vue/no-duplicate-attr-inheritance](./no-duplicate-attr-inheritance.md)| enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`||:hammer:|
233
-
|[vue/no-empty-component-block](./no-empty-component-block.md)| disallow the `<template>``<script>``<style>` block to be empty ||:hammer:|
235
+
|[vue/no-empty-component-block](./no-empty-component-block.md)| disallow the `<template>``<script>``<style>` block to be empty |:wrench:|:hammer:|
234
236
|[vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md)| disallow to pass multiple objects into array to class ||:hammer:|
235
237
|[vue/no-potential-component-option-typo](./no-potential-component-option-typo.md)| disallow a potential typo in your component property |:bulb:|:hammer:|
236
238
|[vue/no-ref-object-reactivity-loss](./no-ref-object-reactivity-loss.md)| disallow usages of ref objects that can lead to loss of reactivity ||:warning:|
@@ -268,6 +270,7 @@ For example:
268
270
|[vue/prefer-prop-type-boolean-first](./prefer-prop-type-boolean-first.md)| enforce `Boolean` comes first in component prop types |:bulb:|:warning:|
269
271
|[vue/prefer-separate-static-class](./prefer-separate-static-class.md)| require static class names in template to be in a separate `class` attribute |:wrench:|:hammer:|
270
272
|[vue/prefer-true-attribute-shorthand](./prefer-true-attribute-shorthand.md)| require shorthand form attribute when `v-bind` value is `true`|:bulb:|:hammer:|
273
+
|[vue/prefer-use-template-ref](./prefer-use-template-ref.md)| require using `useTemplateRef` instead of `ref`/`shallowRef` for template refs ||:hammer:|
271
274
|[vue/require-default-export](./require-default-export.md)| require components to be the default export ||:warning:|
272
275
|[vue/require-direct-export](./require-direct-export.md)| require the component to be directly exported ||:hammer:|
273
276
|[vue/require-emit-validator](./require-emit-validator.md)| require type definitions in emits |:bulb:|:hammer:|
@@ -278,7 +281,9 @@ For example:
278
281
|[vue/require-prop-comment](./require-prop-comment.md)| require props to have a comment ||:hammer:|
279
282
|[vue/require-typed-object-prop](./require-typed-object-prop.md)| enforce adding type declarations to object props |:bulb:|:hammer:|
280
283
|[vue/require-typed-ref](./require-typed-ref.md)| require `ref` and `shallowRef` functions to be strongly typed ||:hammer:|
284
+
|[vue/restricted-component-names](./restricted-component-names.md)| enforce using only specific component names ||:warning:|
281
285
|[vue/script-indent](./script-indent.md)| enforce consistent indentation in `<script>`|:wrench:|:lipstick:|
286
+
|[vue/slot-name-casing](./slot-name-casing.md)| enforce specific casing for slot names ||:hammer:|
282
287
|[vue/sort-keys](./sort-keys.md)| enforce sort-keys in a manner that is compatible with order-in-components ||:hammer:|
283
288
|[vue/static-class-names-order](./static-class-names-order.md)| enforce static class names order |:wrench:|:hammer:|
@@ -310,7 +315,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
310
315
|[vue/dot-notation](./dot-notation.md)| Enforce dot notation whenever possible in `<template>`|:wrench:|:hammer:|
311
316
|[vue/eqeqeq](./eqeqeq.md)| Require the use of `===` and `!==` in `<template>`|:wrench:|:hammer:|
312
317
|[vue/func-call-spacing](./func-call-spacing.md)| Require or disallow spacing between function identifiers and their invocations in `<template>`|:wrench:|:lipstick:|
313
-
|[vue/key-spacing](./key-spacing.md)| Enforce consistent spacing between keys and values in object literal properties in `<template>`|:wrench:|:lipstick:|
318
+
|[vue/key-spacing](./key-spacing.md)| Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`|:wrench:|:lipstick:|
314
319
|[vue/keyword-spacing](./keyword-spacing.md)| Enforce consistent spacing before and after keywords in `<template>`|:wrench:|:lipstick:|
315
320
|[vue/max-len](./max-len.md)| enforce a maximum line length in `.vue` files ||:lipstick:|
316
321
|[vue/multiline-ternary](./multiline-ternary.md)| Enforce newlines between operands of ternary expressions in `<template>`|:wrench:|:lipstick:|
@@ -329,7 +334,7 @@ The following rules extend the rules provided by ESLint itself and apply them to
329
334
|[vue/object-shorthand](./object-shorthand.md)| Require or disallow method and property shorthand syntax for object literals in `<template>`|:wrench:|:hammer:|
330
335
|[vue/operator-linebreak](./operator-linebreak.md)| Enforce consistent linebreak style for operators in `<template>`|:wrench:|:lipstick:|
331
336
|[vue/prefer-template](./prefer-template.md)| Require template literals instead of string concatenation in `<template>`|:wrench:|:hammer:|
332
-
|[vue/quote-props](./quote-props.md)| Require quotes around object literal property names in `<template>`|:wrench:|:lipstick:|
337
+
|[vue/quote-props](./quote-props.md)| Require quotes around object literal, type literal, interfaces and enums property names in `<template>`|:wrench:|:lipstick:|
333
338
|[vue/space-in-parens](./space-in-parens.md)| Enforce consistent spacing inside parentheses in `<template>`|:wrench:|:lipstick:|
334
339
|[vue/space-infix-ops](./space-infix-ops.md)| Require spacing around infix operators in `<template>`|:wrench:|:lipstick:|
335
340
|[vue/space-unary-ops](./space-unary-ops.md)| Enforce consistent spacing before or after unary operators in `<template>`|:wrench:|:lipstick:|
Copy file name to clipboardExpand all lines: docs/rules/key-spacing.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,13 @@
2
2
pageClass: rule-details
3
3
sidebarDepth: 0
4
4
title: vue/key-spacing
5
-
description: Enforce consistent spacing between keys and values in object literal properties in `<template>`
5
+
description: Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
6
6
since: v5.2.0
7
7
---
8
8
9
9
# vue/key-spacing
10
10
11
-
> Enforce consistent spacing between keys and values in object literal properties in `<template>`
11
+
> Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
12
12
13
13
-:wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
0 commit comments