Skip to content

Commit acb4b4a

Browse files
committed
addresses PR comments
1 parent 2d2e3ed commit acb4b4a

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

docs/rules/max-template-depth.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ There is one property that can be specified for the object.
2222

2323
- `maxDepth` ... Specify the maximum template depth `template` block.
2424

25-
## `{ maxDepth: 3 }`
25+
### `{ maxDepth: 3 }`
2626

2727
<eslint-code-block :rules="{'vue/max-template-depth': ['error', { maxDepth: 3 }]}">
2828

@@ -46,7 +46,7 @@ There is one property that can be specified for the object.
4646

4747
</eslint-code-block>
4848

49-
### `{ maxDepth: 5 }`
49+
### `{ maxDepth: 3}`
5050

5151
<eslint-code-block :rules="{'vue/max-template-depth': ['error', { maxDepth: 3 }]}">
5252

lib/rules/max-template-depth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module.exports = {
2828
],
2929
messages: {
3030
templateTooDeep:
31-
'Template is too deep (depth of {{depth}}). Maximum allowed is {{limit}}.'
31+
'Element is nested too deeply (depth of {{depth}}, maximum allowed is {{limit}}).'
3232
}
3333
},
3434
/** @param {RuleContext} context */

tests/lib/rules/max-template-depth.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ tester.run('max-template-depth', rule, {
9393
options: [{ maxDepth: 3 }],
9494
errors: [
9595
{
96-
message: 'Template is too deep (depth of 4). Maximum allowed is 3.',
96+
message:
97+
'Element is nested too deeply (depth of 4, maximum allowed is 3).',
9798
line: 6
9899
}
99100
]
@@ -117,7 +118,8 @@ tester.run('max-template-depth', rule, {
117118
options: [{ maxDepth: 3 }],
118119
errors: [
119120
{
120-
message: 'Template is too deep (depth of 4). Maximum allowed is 3.',
121+
message:
122+
'Element is nested too deeply (depth of 4, maximum allowed is 3).',
121123
line: 9
122124
}
123125
]
@@ -143,17 +145,20 @@ tester.run('max-template-depth', rule, {
143145
options: [{ maxDepth: 3 }],
144146
errors: [
145147
{
146-
message: 'Template is too deep (depth of 4). Maximum allowed is 3.',
148+
message:
149+
'Element is nested too deeply (depth of 4, maximum allowed is 3).',
147150
line: 9,
148151
endLine: 12
149152
},
150153
{
151-
message: 'Template is too deep (depth of 5). Maximum allowed is 3.',
154+
message:
155+
'Element is nested too deeply (depth of 5, maximum allowed is 3).',
152156
line: 10,
153157
endLine: 10
154158
},
155159
{
156-
message: 'Template is too deep (depth of 5). Maximum allowed is 3.',
160+
message:
161+
'Element is nested too deeply (depth of 5, maximum allowed is 3).',
157162
line: 11,
158163
endLine: 12
159164
}

0 commit comments

Comments
 (0)