Skip to content

Commit cdd6a2f

Browse files
committed
eslint fixes
1 parent ac8ce07 commit cdd6a2f

8 files changed

+20
-19
lines changed

.eslintrc.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@ module.exports = {
22
root: true,
33
parser: "@typescript-eslint/parser",
44
plugins: ["@typescript-eslint"],
5-
extends: [
6-
"eslint:recommended",
7-
"plugin:@typescript-eslint/recommended",
8-
"plugin:react/recommended",
9-
],
5+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
106
settings: {
117
react: {
128
version: "detect",

src/FriendList.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ns, widgets } from "solid-ui";
22
import { DataBrowserContext } from "pane-registry";
33
import { NamedNode } from "rdflib";
4-
import { html } from "lit-html";
4+
import { html, TemplateResult } from "lit-html";
55
import { styleMap } from "lit-html/directives/style-map";
66
import { headingLight, padding } from "./baseStyles";
77

@@ -13,7 +13,7 @@ const styles = {
1313
export const FriendList = (
1414
subject: NamedNode,
1515
context: DataBrowserContext
16-
) => html`
16+
): TemplateResult => html`
1717
<div style=${styles.root}>
1818
<h3 style=${styles.heading}>Friends</h3>
1919
${createList(subject, context)}

src/ProfileCard.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { html, nothing } from "lit-html";
1+
import { html, nothing, TemplateResult } from "lit-html";
22
import { styleMap } from "lit-html/directives/style-map";
33
import {
44
fullWidth,
@@ -21,7 +21,7 @@ export const ProfileCard = ({
2121
introduction,
2222
location,
2323
highlightColor,
24-
}: ProfilePresentation) => {
24+
}: ProfilePresentation): TemplateResult => {
2525
const nameStyle = styleMap({
2626
...heading(),
2727
"text-decoration": "underline",

src/ProfileView.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { html } from "lit-html";
1+
import { html, TemplateResult } from "lit-html";
22
import { NamedNode } from "rdflib";
33
import { styleMap } from "lit-html/directives/style-map.js";
44
import { card, paddingSmall, responsiveGrid } from "./baseStyles";
@@ -10,7 +10,7 @@ import { presentProfile } from "./presenter";
1010
export const ProfileView = (
1111
subject: NamedNode,
1212
context: DataBrowserContext
13-
) => {
13+
): TemplateResult => {
1414
const profile = presentProfile(subject, context.session.store);
1515

1616
const styles = {

src/baseStyles.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/*
2+
eslint-disable @typescript-eslint/explicit-module-boundary-types
3+
*/
4+
15
export const responsiveGrid = () => ({
26
"--auto-grid-min-size": "20rem",
37
display: "grid",

src/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const Pane = {
2020
global: false,
2121
icon: icons.iconBase + "noun_15059.svg",
2222
name: "profile",
23-
label: function (subject, context) {
23+
label: function (
24+
subject: NamedNode,
25+
context: DataBrowserContext
26+
): string | null {
2427
const t = context.session.store.findTypeURIs(subject);
2528
if (
2629
t[ns.vcard("Individual").uri] ||

src/integration-tests/friend-list.spec.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pane from "../";
22
import { parse } from "rdflib";
33
import { store } from "solid-ui";
4-
import { findByTestId, getByTestId } from "@testing-library/dom";
4+
import { findByTestId } from "@testing-library/dom";
55
import { context, doc, subject } from "./setup";
66
import fetchMock from "jest-fetch-mock";
77

@@ -11,7 +11,7 @@ describe("profile-pane", () => {
1111
describe("with friends", () => {
1212
beforeAll(async () => {
1313
store.removeDocument(doc);
14-
let turtle = `
14+
const turtle = `
1515
@prefix : <#>.
1616
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1717
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@@ -27,7 +27,6 @@ describe("profile-pane", () => {
2727
friends = await findByTestId(result, "friend-list");
2828
});
2929

30-
beforeAll(() => {});
3130
it("renders the friend list", () => {
3231
expect(friends).toContainHTML("Friends");
3332
});
@@ -54,7 +53,7 @@ describe("profile-pane", () => {
5453
describe("with more friends in separate document", () => {
5554
beforeAll(async () => {
5655
store.removeDocument(doc);
57-
let turtle = `
56+
const turtle = `
5857
@prefix : <#>.
5958
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
6059
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@@ -91,7 +90,6 @@ describe("profile-pane", () => {
9190
friends = await findByTestId(result, "friend-list");
9291
});
9392

94-
beforeAll(() => {});
9593
it("renders the friend list", () => {
9694
expect(friends).toContainHTML("Friends");
9795
});

src/integration-tests/profile-card.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("profile-pane", () => {
1717
describe("with full profile", () => {
1818
beforeAll(() => {
1919
store.removeDocument(doc);
20-
let turtle = `
20+
const turtle = `
2121
@prefix : <#>.
2222
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
2323
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
@@ -77,7 +77,7 @@ describe("profile-pane", () => {
7777
describe("with extended profile", () => {
7878
beforeAll(() => {
7979
store.removeDocument(doc);
80-
let turtle = `
80+
const turtle = `
8181
@prefix : <#>.
8282
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
8383
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

0 commit comments

Comments
 (0)