Browse Source

Fixes lint issues

main
Eric Amodio 5 years ago
parent
commit
1e59b2ee22
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      generateEmojiShortcodeMap.js
  2. +2
    -2
      src/system/function.ts
  3. +1
    -1
      src/system/promise.ts

+ 2
- 2
generateEmojiShortcodeMap.js View File

@ -22,7 +22,7 @@ async function generate() {
if (emoji.shortcodes == null || emoji.shortcodes.length === 0) continue;
for (let code of emoji.shortcodes) {
if (code[0] === ':' && code[code.length - 1] === ':') {
if (code.startsWith(':') && code.endsWith(':')) {
code = code.substring(1, code.length - 2);
}
@ -48,7 +48,7 @@ async function generate() {
// eslint-disable-next-line import/no-dynamic-require
const gitmojis = require(path.join(process.cwd(), 'gitmojis.json')).gitmojis;
for (const emoji of gitmojis) {
if (emoji.code[0] === ':' && emoji.code[emoji.code.length - 1] === ':') {
if (emoji.code.startsWith(':') && emoji.code.endsWith(':')) {
emoji.code = emoji.code.substring(1, emoji.code.length - 2);
}

+ 2
- 2
src/system/function.ts View File

@ -166,7 +166,7 @@ export namespace Functions {
}
}
};
timer = setInterval(fn, ms);
timer = global.setInterval(fn, ms);
return disposable;
}
@ -174,7 +174,7 @@ export namespace Functions {
export function progress<T>(promise: Promise<T>, intervalMs: number, onProgress: () => boolean): Promise<T> {
return new Promise((resolve, reject) => {
let timer: NodeJS.Timer | undefined;
timer = setInterval(() => {
timer = global.setInterval(() => {
if (onProgress()) {
if (timer !== undefined) {
clearInterval(timer);

+ 1
- 1
src/system/promise.ts View File

@ -23,7 +23,7 @@ export namespace Promises {
let fulfilled = false;
let timer: NodeJS.Timer | undefined;
if (typeof timeoutOrToken === 'number') {
timer = setTimeout(() => {
timer = global.setTimeout(() => {
if (typeof options.onDidCancel === 'function') {
options.onDidCancel(resolve, reject);
} else {

Loading…
Cancel
Save