From a270df82fef9d3f0e421b2ed27edd42afb25a0a6 Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Wed, 27 Nov 2024 17:33:58 +0800 Subject: [PATCH] feat: add slot-name-casing rule (#2620) Co-authored-by: Flo Edelmann --- docs/rules/index.md | 3 +- docs/rules/restricted-component-names.md | 4 +- docs/rules/slot-name-casing.md | 88 ++++++++++++++ lib/index.js | 1 + lib/rules/slot-name-casing.js | 82 +++++++++++++ tests/lib/rules/slot-name-casing.js | 148 +++++++++++++++++++++++ 6 files changed, 323 insertions(+), 3 deletions(-) create mode 100644 docs/rules/slot-name-casing.md create mode 100644 lib/rules/slot-name-casing.js create mode 100644 tests/lib/rules/slot-name-casing.js diff --git a/docs/rules/index.md b/docs/rules/index.md index d280011f1..074f4bd46 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -281,8 +281,9 @@ For example: | [vue/require-prop-comment](./require-prop-comment.md) | require props to have a comment | | :hammer: | | [vue/require-typed-object-prop](./require-typed-object-prop.md) | enforce adding type declarations to object props | :bulb: | :hammer: | | [vue/require-typed-ref](./require-typed-ref.md) | require `ref` and `shallowRef` functions to be strongly typed | | :hammer: | -| [vue/restricted-component-names](./restricted-component-names.md) | enforce using only specific in component names | | :warning: | +| [vue/restricted-component-names](./restricted-component-names.md) | enforce using only specific component names | | :warning: | | [vue/script-indent](./script-indent.md) | enforce consistent indentation in `