Skip to content

Commit 32cb756

Browse files
committed
Add rule documentation
1 parent 3661f07 commit 32cb756

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

rules/require-task-name-suffix.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# require-task-name-suffix
2+
3+
This rule ensures that the names of all `ember-concurrency` tasks in the app
4+
end with `Task` to distinguish them from regular methods, actions or other
5+
properties on the classes.
6+
7+
8+
## Examples
9+
10+
This rule **forbids** the following:
11+
12+
```js
13+
export default Component.extend({
14+
submit: task(function*() {
15+
//...
16+
}),
17+
})
18+
```
19+
20+
This rule **allows** the following:
21+
22+
```js
23+
export default Component.extend({
24+
submitTask: task(function*() {
25+
//...
26+
}),
27+
})
28+
```

0 commit comments

Comments
 (0)