Skip to content

Commit

Permalink
Merge pull request #2697 from jasongrout/linter
Browse files Browse the repository at this point in the history
Fix lint errors
  • Loading branch information
vidartf committed Jan 8, 2020
2 parents 60c2d39 + d8d8b70 commit 1cdcb81
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Expand Up @@ -21,9 +21,8 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install, build, integrity, test
- name: yarn install, integrity, lint
run: |
yarn install --frozen-lockfile
yarn run build
yarn run integrity
yarn run eslint:check
1 change: 0 additions & 1 deletion .github/workflows/testjs.yml
Expand Up @@ -29,7 +29,6 @@ jobs:
yarn install --frozen-lockfile
yarn run build
yarn run build:examples
yarn run integrity
pushd packages/base
yarn run test:unit:firefox:headless
Expand Down
4 changes: 2 additions & 2 deletions packages/base/src/widget.ts
Expand Up @@ -886,8 +886,8 @@ class DOMWidgetView extends WidgetView {
}
}

updateTooltip() {
let title = this.model.get('tooltip')
updateTooltip(): void {
const title = this.model.get('tooltip')
if (!title) {
this.el.removeAttribute('title');
} else if (this.model.get('description').length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions packages/controls/src/widget_bool.ts
Expand Up @@ -120,9 +120,9 @@ class CheckboxView extends DescriptionView {
}
}

updateTooltip() {
updateTooltip(): void {
if (!this.checkbox) return; // we might be constructing the parent
let title = this.model.get('tooltip');
const title = this.model.get('tooltip');
if (!title) {
this.checkbox.removeAttribute('title');
} else if (this.model.get('description').length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/controls/src/widget_description.ts
Expand Up @@ -77,7 +77,7 @@ class DescriptionView extends DOMWidgetView {
}
}

updateTooltip() {
updateTooltip(): void {
if (!this.label) return;
this.label.title = this.model.get('tooltip');
}
Expand Down
4 changes: 2 additions & 2 deletions packages/controls/src/widget_selection.ts
Expand Up @@ -73,9 +73,9 @@ class SelectionView extends DescriptionView {
}
}

updateTooltip() {
updateTooltip(): void {
if (!this.listbox) return; // we might be constructing the parent
let title = this.model.get('tooltip');
const title = this.model.get('tooltip');
if (!title) {
this.listbox.removeAttribute('title');
} else if (this.model.get('description').length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions packages/controls/src/widget_string.ts
Expand Up @@ -39,7 +39,7 @@ class StringView extends DescriptionView {
/**
* Called when view is rendered.
*/
render() {
render(): void {
super.render(); // Incl. setting some defaults.
this.el.classList.add('jupyter-widgets');
this.el.classList.add('widget-inline-hbox');
Expand Down Expand Up @@ -385,7 +385,7 @@ class TextView extends StringView {
}
}

updateTooltip() {
updateTooltip(): void {
if (!this.textbox) return; // we might be constructing the parent
const title = this.model.get('tooltip');
if (!title) {
Expand Down

0 comments on commit 1cdcb81

Please sign in to comment.