Skip to content

Commit 0ee8269

Browse files
committed
formatting: tweaks
1 parent bf564af commit 0ee8269

File tree

6 files changed

+18
-19
lines changed

6 files changed

+18
-19
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"text-summary"
6161
],
6262
"moduleNameMapper": {
63-
"\\_redirects|.(htaccess|ico|jpg|png|svg|webmanifest|woff|xml|txt)$": "<rootDir>/test/__mocks__/file.mock.js",
63+
"\\_redirects|.(ico|jpg|png|svg|txt|webmanifest|woff|xml)$": "<rootDir>/test/__mocks__/file.mock.js",
6464
"\\.(css)$": "<rootDir>/test/__mocks__/style.mock.js"
6565
},
6666
"setupFiles": [
@@ -76,7 +76,7 @@
7676
"dev:fast": "webpack-dev-server --progress",
7777
"format": "prettier --write 'src/**/*.@(css|js)'",
7878
"lint": "eslint \"src/**/*.js\" \"netlify/**/*.js\" \"webpack.config.babel.js\"",
79-
"postbuild": "node src/scripts/template.js && node src/scripts/sitemap.js",
79+
"postbuild": "node src/scripts/sitemap.js && node src/scripts/template.js",
8080
"predev": "yarn build",
8181
"prepush": "yarn lint && yarn test:coverage && cat coverage/lcov.info | coveralls",
8282
"test:coverage": "jest --coverage",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Contact: https://github.com/monospaced
2-
Expires: 2026-12-31T00:00:00.000Z
2+
Expires: 2027-01-05T00:00:00.000Z
33
Preferred-Languages: en-GB
44
Canonical: https://scottboyle.uk/.well-known/security.txt

src/components/Head/Head.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ const Head = ({ meta }) => {
4848
<meta name="viewport" content="width=device-width" />
4949
<link
5050
rel="alternate"
51-
type="application/rss+xml"
52-
title="Pinboard (monospaced)"
5351
href="https://feeds.pinboard.in/rss/secret:408c7b80a1d865c97e0a/u:monospaced/"
52+
title="Pinboard (monospaced)"
53+
type="application/rss+xml"
5454
/>
5555
<link rel="icon" href="/favicon.ico" sizes="32x32" />
5656
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
@@ -62,8 +62,8 @@ const Head = ({ meta }) => {
6262
<link rel="manifest" href="/manifest.webmanifest" />
6363
<link rel="stylesheet" href={`/styles.css?v=${version}`} />
6464
<script
65-
type="application/ld+json"
6665
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
66+
type="application/ld+json"
6767
/>
6868
</head>
6969
);
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[
22
{
3-
"u": "https://example.com/mock-a",
43
"d": "Mock Link A",
4+
"dt": "2025-01-01T00:00:00Z",
55
"n": "Mock note A.",
6-
"dt": "2025-01-01T00:00:00Z"
6+
"u": "https://example.com/mock-a"
77
},
88
{
9-
"u": "https://example.com/mock-b",
109
"d": "Mock Link B",
10+
"dt": "2025-01-02T00:00:00Z",
1111
"n": "",
12-
"dt": "2025-01-02T00:00:00Z"
12+
"u": "https://example.com/mock-b"
1313
},
1414
{
15-
"u": "https://example.com/mock-c",
1615
"d": "Mock Link C",
16+
"dt": "2025-01-03T00:00:00Z",
1717
"n": "Short mock note.",
18-
"dt": "2025-01-03T00:00:00Z"
18+
"u": "https://example.com/mock-c"
1919
}
2020
]

src/components/Linklog/__tests__/Linklog.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ describe("Linklog component", () => {
1818

1919
beforeEach(() => {
2020
fetchMock = jest.fn().mockResolvedValue({
21-
ok: true,
2221
json: () => Promise.resolve(feed),
22+
ok: true,
2323
});
2424
global.fetch = fetchMock;
2525
});
@@ -53,19 +53,19 @@ describe("Linklog component", () => {
5353
component.setState({
5454
links: [
5555
{
56-
u: "/relative",
5756
d: "Relative link",
5857
dt: "2018-04-05T21:20:55Z",
58+
u: "/relative",
5959
},
6060
{
61-
u: "javascript:alert(1)",
6261
d: "Bad link",
6362
dt: "2018-04-06T21:20:55Z",
63+
u: "javascript:alert(1)",
6464
},
6565
{
66-
u: "https://example.com",
6766
d: "Good link",
6867
dt: "2018-04-07T21:20:55Z",
68+
u: "https://example.com",
6969
},
7070
],
7171
});
@@ -100,8 +100,8 @@ describe("Linklog component", () => {
100100

101101
it("should ignore non-array responses", async () => {
102102
fetchMock.mockResolvedValueOnce({
103-
ok: true,
104103
json: () => Promise.resolve({ items: feed }),
104+
ok: true,
105105
});
106106
const component = shallow(<Linklog {...props} />);
107107
await flushPromises();
@@ -121,8 +121,8 @@ describe("Linklog component", () => {
121121

122122
it("should keep links empty when response is not ok", async () => {
123123
fetchMock.mockResolvedValueOnce({
124-
ok: false,
125124
json: jest.fn(),
125+
ok: false,
126126
});
127127
const component = shallow(<Linklog {...props} />);
128128
await flushPromises();

src/scripts/sitemap.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const buildSitemap = (routes = []) => {
4343
const urls = unique(routesArray.filter(isPublicRoute).map(normalizePath)).map(
4444
routePath => `${normalizedSiteUrl}${routePath}`,
4545
);
46-
4746
const xml = [
4847
'<?xml version="1.0" encoding="UTF-8"?>',
4948
'<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',

0 commit comments

Comments
 (0)