Skip to content

Commit

Permalink
feat: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen committed Feb 2, 2021
1 parent 603e471 commit aaa6ba2
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].
The format is based on [Keep a Changelog], and this project adheres to
[Semantic Versioning].

## [0.1.1] - 2020-11-21

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<br>
</p>


```typescript
import * as tty from "https://deno.land/x/tty/mod.ts";

Expand All @@ -29,7 +28,8 @@ setInterval(() => {

### contribution

Pull request, issues and feedback are very welcome. Code style is formatted with deno fmt and commit messages are done following Conventional Commits spec.
Pull request, issues and feedback are very welcome. Code style is formatted with
deno fmt and commit messages are done following Conventional Commits spec.

### licence

Expand Down
26 changes: 13 additions & 13 deletions tty_async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ import { encode } from "./util.ts";

import {
AsyncStream,
RESTORE,
ESC,
POSITION,
HIDE,
SHOW,
SCROLL_UP,
SCROLL_DOWN,
CLEAR_UP,
CLEAR_DOWN,
CLEAR_LEFT,
CLEAR_RIGHT,
CLEAR_LINE,
CLEAR_RIGHT,
CLEAR_SCREEN,
NEXT_LINE,
PREV_LINE,
HOME,
UP,
CLEAR_UP,
DOWN,
ESC,
HIDE,
HOME,
LEFT,
NEXT_LINE,
POSITION,
PREV_LINE,
RESTORE,
RIGHT,
SCROLL_DOWN,
SCROLL_UP,
SHOW,
UP,
} from "./mod.ts";

export async function write(str: string, writer: AsyncStream): Promise<void> {
Expand Down
28 changes: 14 additions & 14 deletions tty_sync.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
import { encode } from "./util.ts";

import {
SyncStream,
RESTORE,
ESC,
POSITION,
HIDE,
SHOW,
SCROLL_UP,
SCROLL_DOWN,
CLEAR_UP,
CLEAR_DOWN,
CLEAR_LEFT,
CLEAR_RIGHT,
CLEAR_LINE,
CLEAR_RIGHT,
CLEAR_SCREEN,
NEXT_LINE,
PREV_LINE,
HOME,
UP,
CLEAR_UP,
DOWN,
ESC,
HIDE,
HOME,
LEFT,
NEXT_LINE,
POSITION,
PREV_LINE,
RESTORE,
RIGHT,
SCROLL_DOWN,
SCROLL_UP,
SHOW,
SyncStream,
UP,
} from "./mod.ts";

export function writeSync(str: string, writer: SyncStream): void {
Expand Down
12 changes: 6 additions & 6 deletions wcwidth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ export function wcswidth(
const opts = { nul, control };
if (typeof str !== "string") return wcwidth(str, opts);

var s = 0;
for (var i = 0; i < str.length; i++) {
var n = wcwidth(str.charCodeAt(i), opts);
let s = 0;
for (let i = 0; i < str.length; i++) {
const n = wcwidth(str.charCodeAt(i), opts);
if (n < 0) return -1;
s += n;
}
Expand Down Expand Up @@ -75,9 +75,9 @@ function wcwidth(ucs: number, { nul = 0, control = 0 }: Defaults = {}): number {
}

function bisearch(ucs: number): boolean {
var min = 0;
var max = combining.length - 1;
var mid;
let min = 0;
let max = combining.length - 1;
let mid;

if (ucs < combining[0][0] || ucs > combining[max][1]) return false;

Expand Down

0 comments on commit aaa6ba2

Please sign in to comment.