From a4aed0afb0a02e9acb56ae2210dcfc849b4b8a33 Mon Sep 17 00:00:00 2001 From: Kevin Sommer <37016102+kevsommer@users.noreply.github.com> Date: Mon, 2 Sep 2024 11:47:21 +0200 Subject: [PATCH] Implements proposed max-template-depth rule (#2525) --- docs/rules/index.md | 1 + docs/rules/max-template-depth.md | 67 ++++++++++ lib/index.js | 1 + lib/rules/max-template-depth.js | 82 +++++++++++++ tests/lib/rules/max-template-depth.js | 168 ++++++++++++++++++++++++++ 5 files changed, 319 insertions(+) create mode 100644 docs/rules/max-template-depth.md create mode 100644 lib/rules/max-template-depth.js create mode 100644 tests/lib/rules/max-template-depth.js diff --git a/docs/rules/index.md b/docs/rules/index.md index 16a195125..9624111c6 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -224,6 +224,7 @@ For example: | [vue/match-component-import-name](./match-component-import-name.md) | require the registered component name to match the imported component name | | :warning: | | [vue/max-lines-per-block](./max-lines-per-block.md) | enforce maximum number of lines in Vue SFC blocks | | :warning: | | [vue/max-props](./max-props.md) | enforce maximum number of props in Vue component | | :warning: | +| [vue/max-template-depth](./max-template-depth.md) | enforce maximum depth of template | | :warning: | | [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: | | [vue/next-tick-style](./next-tick-style.md) | enforce Promise or callback style in `nextTick` | :wrench: | :hammer: | | [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `