From 1c2a0f0c2983776d6f9e0dadf7d8aa35486d3a06 Mon Sep 17 00:00:00 2001 From: youxingz Date: Thu, 27 Oct 2022 21:29:59 +0800 Subject: [PATCH 1/2] Add example of rule `vue/no-restricted-static-attribute` --- docs/rules/no-restricted-static-attribute.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/rules/no-restricted-static-attribute.md b/docs/rules/no-restricted-static-attribute.md index 68ed58431..1490168a2 100644 --- a/docs/rules/no-restricted-static-attribute.md +++ b/docs/rules/no-restricted-static-attribute.md @@ -43,6 +43,11 @@ Alternatively, the rule also accepts objects. { "key": "stlye", "message": "Using \"stlye\" is not allowed. Use \"style\" instead." + }, + { + "key": "style", + "element": /^([A-Z$][a-zA-Z_$]*)$/, + "message": "Using \"style\" is not allowed in custom component. Use \"class\" instead." } ] } From cfdafc891be6c4818dde886234a2d02c44b9c2cf Mon Sep 17 00:00:00 2001 From: youxingz Date: Thu, 27 Oct 2022 22:59:40 +0800 Subject: [PATCH 2/2] Fix the example of rule `vue/no-restricted-static-attribute` --- docs/rules/no-restricted-static-attribute.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/rules/no-restricted-static-attribute.md b/docs/rules/no-restricted-static-attribute.md index 1490168a2..428590506 100644 --- a/docs/rules/no-restricted-static-attribute.md +++ b/docs/rules/no-restricted-static-attribute.md @@ -46,7 +46,7 @@ Alternatively, the rule also accepts objects. }, { "key": "style", - "element": /^([A-Z$][a-zA-Z_$]*)$/, + "element": "/^([A-Z][a-zA-Z_-]*)$/", "message": "Using \"style\" is not allowed in custom component. Use \"class\" instead." } ]