Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
Lint the codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Astro36 committed Jul 31, 2019
1 parent cd69e16 commit e93c05f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
10 changes: 0 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
"ecmaVersion": 2019,
"sourceType": "module"
},
"plugins": [
"html",
"svelte3"
],
"settings": {
"import/resolver": {
"node": {
Expand All @@ -30,12 +26,6 @@
}
}
},
"overrides": [
{
"files": "*.svelte",
"processor": "svelte3/svelte3"
}
],
"rules": {
"@typescript-eslint/indent": [
"error",
Expand Down
2 changes: 1 addition & 1 deletion example/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
document.querySelector('kecap-a').focus();
document.querySelector('kecap-a').focus()
8 changes: 4 additions & 4 deletions src/kecap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ abstract class Kecap extends HTMLElement {
}

private _onKeyDown(event: KeyboardEvent): void {
if(document.activeElement !== this) return;
if (document.activeElement !== this) return

let handled = true;
let handled = true

switch (event.key) {
case 'ArrowUp':
Expand All @@ -116,10 +116,10 @@ abstract class Kecap extends HTMLElement {
this.selectRight()
break
default:
handled = false;
handled = false
}

if(handled) event.preventDefault();
if (handled) event.preventDefault()
}

/**
Expand Down

0 comments on commit e93c05f

Please sign in to comment.