@vue/language-service 3.0.0-beta.4 → 3.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/nameCasing.js
CHANGED
|
@@ -16,17 +16,17 @@ var AttrNameCasing;
|
|
|
16
16
|
async function checkCasing(context, uri) {
|
|
17
17
|
const detected = detect(context, uri);
|
|
18
18
|
const [attr, tag] = await Promise.all([
|
|
19
|
-
context.env.getConfiguration?.('vue.
|
|
20
|
-
context.env.getConfiguration?.('vue.
|
|
19
|
+
context.env.getConfiguration?.('vue.suggest.propNameCasing', uri.toString()),
|
|
20
|
+
context.env.getConfiguration?.('vue.suggest.componentNameCasing', uri.toString()),
|
|
21
21
|
]);
|
|
22
|
-
const tagNameCasing = detected.tag.length === 1 && (tag === '
|
|
22
|
+
const tagNameCasing = detected.tag.length === 1 && (tag === 'preferPascalCase' || tag === 'preferKebabCase')
|
|
23
23
|
? detected.tag[0]
|
|
24
|
-
: (tag === '
|
|
24
|
+
: (tag === 'preferKebabCase' || tag === 'alwaysKebabCase')
|
|
25
25
|
? TagNameCasing.Kebab
|
|
26
26
|
: TagNameCasing.Pascal;
|
|
27
|
-
const attrNameCasing = detected.attr.length === 1 && (attr === '
|
|
27
|
+
const attrNameCasing = detected.attr.length === 1 && (attr === 'preferCamelCase' || attr === 'preferKebabCase')
|
|
28
28
|
? detected.attr[0]
|
|
29
|
-
: (attr === '
|
|
29
|
+
: (attr === 'preferCamelCase' || attr === 'alwaysCamelCase')
|
|
30
30
|
? AttrNameCasing.Camel
|
|
31
31
|
: AttrNameCasing.Kebab;
|
|
32
32
|
return {
|
|
@@ -17,7 +17,7 @@ function create() {
|
|
|
17
17
|
if (!(0, utils_1.isTsDocument)(document)) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
const enabled = await context.env.getConfiguration?.('vue.
|
|
20
|
+
const enabled = await context.env.getConfiguration?.('vue.suggest.defineAssignment') ?? true;
|
|
21
21
|
if (!enabled) {
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
@@ -99,7 +99,7 @@ function create(getTsPluginClient) {
|
|
|
99
99
|
attrText = attrText.slice('v-model:'.length);
|
|
100
100
|
}
|
|
101
101
|
else if (attrText === 'v-model') {
|
|
102
|
-
attrText = 'modelValue'; // TODO: support for experimentalModelPropName?
|
|
102
|
+
attrText = context.project.vue.compilerOptions.target >= 3 ? 'modelValue' : 'value'; // TODO: support for experimentalModelPropName?
|
|
103
103
|
}
|
|
104
104
|
else if (attrText.startsWith('v-on:')) {
|
|
105
105
|
attrText = 'on-' + (0, language_core_1.hyphenateAttr)(attrText.slice('v-on:'.length));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-service",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"data",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@volar/language-service": "2.4.15",
|
|
21
|
-
"@vue/language-core": "3.0.0-beta.
|
|
21
|
+
"@vue/language-core": "3.0.0-beta.5",
|
|
22
22
|
"@vue/shared": "^3.5.0",
|
|
23
23
|
"path-browserify": "^1.0.1",
|
|
24
24
|
"volar-service-css": "0.0.64",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@volar/kit": "2.4.15",
|
|
39
39
|
"@volar/typescript": "2.4.15",
|
|
40
40
|
"@vue/compiler-dom": "^3.5.0",
|
|
41
|
-
"@vue/typescript-plugin": "3.0.0-beta.
|
|
41
|
+
"@vue/typescript-plugin": "3.0.0-beta.5",
|
|
42
42
|
"vscode-css-languageservice": "^6.3.1"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "3a4648914c60c90444d939cf762a016a4318ca09"
|
|
45
45
|
}
|