more typescript specific rules

This commit is contained in:
Martin Aeschlimann 2020-03-31 01:12:37 +02:00
parent b0007945b9
commit 17e140249f
3 changed files with 13 additions and 5 deletions

View file

@ -99,7 +99,9 @@
"variable": ["variable.other.readwrite.js"],
"variable.readonly": ["variable.other.constant.object.js"],
"function": ["entity.name.function.js"],
"namespace": ["entity.name.type.module.js"]
"namespace": ["entity.name.type.module.js"],
"variable.defaultLibrary": ["support.variable.js"],
"function.defaultLibrary": ["support.function.js"]
}
},
{
@ -110,7 +112,9 @@
"variable": ["variable.other.readwrite.jsx"],
"variable.readonly": ["variable.other.constant.object.jsx"],
"function": ["entity.name.function.jsx"],
"namespace": ["entity.name.type.module.jsx"]
"namespace": ["entity.name.type.module.jsx"],
"variable.defaultLibrary": ["support.variable.js"],
"function.defaultLibrary": ["support.function.js"]
}
}
],

View file

@ -88,7 +88,9 @@
"variable": ["variable.other.readwrite.ts"],
"variable.readonly": ["variable.other.constant.object.ts"],
"function": ["entity.name.function.ts"],
"namespace": ["entity.name.type.module.ts"]
"namespace": ["entity.name.type.module.ts"],
"variable.defaultLibrary": ["support.variable.ts"],
"function.defaultLibrary": ["support.function.ts"]
}
},
{
@ -99,7 +101,9 @@
"variable": ["variable.other.readwrite.tsx"],
"variable.readonly": ["variable.other.constant.object.tsx"],
"function": ["entity.name.function.tsx"],
"namespace": ["entity.name.type.module.tsx"]
"namespace": ["entity.name.type.module.tsx"],
"variable.defaultLibrary": ["support.variable.tsx"],
"function.defaultLibrary": ["support.function.tsx"]
}
}
],

View file

@ -353,7 +353,7 @@ class TokenClassificationRegistry implements ITokenClassificationRegistry {
if (selector.language !== language) {
return -1;
}
score += 100;
score += 10;
}
if (selector.type !== TOKEN_TYPE_WILDCARD) {
const hierarchy = this.getTypeHierarchy(type);