diff --git a/docs/rules/no-unsupported-features.md b/docs/rules/no-unsupported-features.md
index 48e222a99..858a8445d 100644
--- a/docs/rules/no-unsupported-features.md
+++ b/docs/rules/no-unsupported-features.md
@@ -32,6 +32,7 @@ The `"ignores"` option accepts an array of the following strings.
- Vue.js 3.1.0+
- `"is-attribute-with-vue-prefix"` ... [`is` attribute with `vue:` prefix](https://v3.vuejs.org/api/special-attributes.html#is)
- Vue.js 3.0.0+
+ - `"style-css-vars-injection"` ... [SFC CSS variable injection][Vue RFCs - 0043-sfc-style-variables]
- `"script-setup"` ... [`
+
+ `,
+ options: buildOptions()
+ },
+ {
+ code: `
+
+ hello
+
+
+
+
+ `,
+ options: buildOptions({ version: '^2.6.0' })
+ }
+ ],
+ invalid: [
+ {
+ code: `
+
+ hello
+
+
+
+
+ `,
+ options: buildOptions({ version: '^3.0.0' }),
+ errors: [
+ {
+ message:
+ 'SFC CSS variable injection is not supported until Vue.js "3.0.3".',
+ line: 21,
+ column: 18,
+ endLine: 21,
+ endColumn: 31
+ },
+ {
+ message:
+ 'SFC CSS variable injection is not supported until Vue.js "3.0.3".',
+ line: 24,
+ column: 22,
+ endLine: 24,
+ endColumn: 41
+ }
+ ]
+ }
+ ]
+})
diff --git a/tests/lib/rules/no-unused-properties.js b/tests/lib/rules/no-unused-properties.js
index 4af8091af..164e562ab 100644
--- a/tests/lib/rules/no-unused-properties.js
+++ b/tests/lib/rules/no-unused-properties.js
@@ -1562,6 +1562,38 @@ tester.run('no-unused-properties', rule, {
}
`,
options: allOptions
+ },
+
+ //style vars
+ {
+ filename: 'test.vue',
+ code: `
+
+ hello
+
+
+
+
+
+ `
}
],
diff --git a/tests/lib/rules/script-setup-uses-vars.js b/tests/lib/rules/script-setup-uses-vars.js
index 5d3c80060..dd49cf6a2 100644
--- a/tests/lib/rules/script-setup-uses-vars.js
+++ b/tests/lib/rules/script-setup-uses-vars.js
@@ -179,6 +179,25 @@ describe('script-setup-uses-vars', () => {
`
+ },
+
+ //style vars
+ {
+ filename: 'test.vue',
+ code: `
+
+
+
+ `
}
],
@@ -305,6 +324,27 @@ describe('script-setup-uses-vars', () => {
line: 4
}
]
+ },
+
+ //style vars
+ {
+ filename: 'test.vue',
+ code: `
+
+
+
+ `,
+ errors: ["'color' is assigned a value but never used."]
}
]
})