aboutsummaryrefslogtreecommitdiff
path: root/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js')
-rw-r--r--node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js b/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js
new file mode 100644
index 00000000..77369071
--- /dev/null
+++ b/node_modules/babel-plugin-transform-vue-jsx/lib/must-use-prop.js
@@ -0,0 +1,9 @@
+const acceptValue = ['input','textarea','option','select']
+module.exports = (tag, type, attr) => {
+ return (
+ (attr === 'value' && acceptValue.includes(tag)) && type !== 'button' ||
+ (attr === 'selected' && tag === 'option') ||
+ (attr === 'checked' && tag === 'input') ||
+ (attr === 'muted' && tag === 'video')
+ )
+}