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/README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
38
38
39
39
| Rule ID | Description ||
40
40
|:--------|:------------|:---|
41
+
|[vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md)| disallow using arrow functions to define watcher ||
41
42
|[vue/no-async-in-computed-properties](./no-async-in-computed-properties.md)| disallow asynchronous actions in computed properties ||
42
43
|[vue/no-deprecated-data-object-declaration](./no-deprecated-data-object-declaration.md)| disallow using deprecated object declaration on data (in Vue.js 3.0.0+) |:wrench:|
43
44
|[vue/no-deprecated-dollar-listeners-api](./no-deprecated-dollar-listeners-api.md)| disallow using deprecated `$listeners` (in Vue.js 3.0.0+) ||
@@ -159,6 +160,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
159
160
160
161
| Rule ID | Description ||
161
162
|:--------|:------------|:---|
163
+
|[vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md)| disallow using arrow functions to define watcher ||
162
164
|[vue/no-async-in-computed-properties](./no-async-in-computed-properties.md)| disallow asynchronous actions in computed properties ||
163
165
|[vue/no-custom-modifiers-on-v-model](./no-custom-modifiers-on-v-model.md)| disallow custom modifiers on v-model used on the component ||
164
166
|[vue/no-dupe-keys](./no-dupe-keys.md)| disallow duplication of field names ||
@@ -286,7 +288,6 @@ For example:
286
288
|[vue/keyword-spacing](./keyword-spacing.md)| enforce consistent spacing before and after keywords |:wrench:|
287
289
|[vue/match-component-file-name](./match-component-file-name.md)| require component name property to match its file name ||
288
290
|[vue/max-len](./max-len.md)| enforce a maximum line length ||
289
-
|[vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md)| disallows using arrow functions to define wathcer ||
Copy file name to clipboardExpand all lines: docs/rules/no-arrow-functions-in-watch.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
pageClass: rule-details
3
3
sidebarDepth: 0
4
4
title: vue/no-arrow-functions-in-watch
5
-
description: disallow arrow functions to define watcher
5
+
description: disallow using arrow functions to define watcher
6
6
---
7
7
# vue/no-arrow-functions-in-watch
8
8
> disallow using arrow functions to define watcher
9
9
10
+
-:gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-recommended"` and `"plugin:vue/recommended"`.
11
+
10
12
## :book: Rule Details
11
13
12
14
This rules disallows using arrow functions to defined watcher.The reason is arrow functions bind the parent context, so `this` will not be the Vue instance as you expect.([see here for more details](https://vuejs.org/v2/api/#watch))
0 commit comments