Enable no-var-keyword tslint rule

This commit is contained in:
Matt Bierner
2019-01-03 18:02:48 -08:00
parent 3f8579f96a
commit 5cc00861fc
42 changed files with 557 additions and 561 deletions

View File

@@ -18,7 +18,7 @@ export interface HTMLDocumentRegions {
getImportedScripts(): string[];
}
export var CSS_STYLE_RULE = '__';
export const CSS_STYLE_RULE = '__';
interface EmbeddedRegion { languageId: string | undefined; start: number; end: number; attributeValue?: boolean; }

View File

@@ -78,7 +78,7 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
}
function merge(src: any, dst: any): any {
for (var key in src) {
for (const key in src) {
if (src.hasOwnProperty(key)) {
dst[key] = src[key];
}

View File

@@ -67,7 +67,7 @@ export interface LanguageModeRange extends Range {
export function getLanguageModes(supportedLanguages: { [languageId: string]: boolean; }, workspace: Workspace, customTags?: ITagSet, customAttributes?: IAttributeSet): LanguageModes {
var htmlLanguageService = getHTMLLanguageService({
const htmlLanguageService = getHTMLLanguageService({
customTags,
customAttributes
});

View File

@@ -5,7 +5,7 @@
export function pushAll<T>(to: T[], from: T[]) {
if (from) {
for (var i = 0; i < from.length; i++) {
for (let i = 0; i < from.length; i++) {
to.push(from[i]);
}
}

View File

@@ -52,7 +52,7 @@ export function endsWith(haystack: string, needle: string): boolean {
}
export function repeat(value: string, count: number) {
var s = '';
let s = '';
while (count > 0) {
if ((count & 1) === 1) {
s += value;