From 56407dba340ee9a5cde938a951f16ffe6b34e20f Mon Sep 17 00:00:00 2001
From: Janosh Riebesell
Date: Wed, 30 Aug 2023 05:23:45 +0200
Subject: [PATCH] pre-commit autoupdate && pre-commit run --all-files && pnpm
up --latest
includes auto-fixes from prettier v2->v3
---
.eslintrc.yml | 6 ++--
.pre-commit-config.yaml | 6 ++--
package.json | 34 +++++++++----------
src/app.css | 4 ---
src/app.html | 2 +-
src/routes/+layout.server.ts | 2 +-
src/routes/+page.svelte | 5 ++-
src/routes/cv/cv-data.yml | 1 +
.../exclude-drafts-from-production/+page.md | 2 +-
.../posts/gatsby-algolia-search/+page.md | 4 +--
.../gatsby-interactive-plots/triModal.js | 4 +--
src/routes/posts/hmc-bnn/bimodalChain.js | 2 +-
svelte.config.js | 2 +-
13 files changed, 38 insertions(+), 36 deletions(-)
diff --git a/.eslintrc.yml b/.eslintrc.yml
index d0a1883f..994a3284 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -1,5 +1,6 @@
env:
browser: true
+ node: true
extends:
- plugin:svelte/recommended
- eslint:recommended
@@ -17,7 +18,8 @@ rules:
no-console: [error, allow: [warn, error]]
no-var: error
'@typescript-eslint/no-inferrable-types': off
- '@typescript-eslint/no-unused-vars': [error, { argsIgnorePattern: ^_ }]
+ '@typescript-eslint/no-unused-vars':
+ [error, { argsIgnorePattern: ^_, varsIgnorePattern: ^_ }]
svelte/no-at-html-tags: off
no-inner-declarations: off
-ignorePatterns: [build/]
+ignorePatterns: [build/, dist/]
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 44d29182..c3e51e31 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -19,7 +19,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: v3.0.0-alpha.4
+ rev: v3.0.2
hooks:
- id: prettier
args: [--write] # edit files in-place
@@ -29,7 +29,7 @@ repos:
- svelte
- repo: https://github.com/codespell-project/codespell
- rev: v2.2.2
+ rev: v2.2.5
hooks:
- id: codespell
stages: [commit, commit-msg]
@@ -37,7 +37,7 @@ repos:
args: [--ignore-words-list, 'ist,yau']
- repo: https://github.com/pre-commit/mirrors-eslint
- rev: v8.41.0
+ rev: v8.48.0
hooks:
- id: eslint
types: [file]
diff --git a/package.json b/package.json
index 17055abc..b581a16a 100644
--- a/package.json
+++ b/package.json
@@ -31,33 +31,33 @@
"devDependencies": {
"@iconify/svelte": "^3.1.4",
"@rollup/plugin-yaml": "^4.1.1",
- "@sveltejs/adapter-static": "^2.0.2",
- "@sveltejs/kit": "^1.21.0",
- "@typescript-eslint/eslint-plugin": "^5.60.1",
- "@typescript-eslint/parser": "^5.60.1",
+ "@sveltejs/adapter-static": "^2.0.3",
+ "@sveltejs/kit": "^1.24.0",
+ "@typescript-eslint/eslint-plugin": "^6.5.0",
+ "@typescript-eslint/parser": "^6.5.0",
"devalue": "^4.3.2",
- "eslint": "^8.44.0",
- "eslint-plugin-svelte": "^2.32.2",
+ "eslint": "^8.48.0",
+ "eslint-plugin-svelte": "^2.33.0",
"hast-util-from-string": "^2.0.0",
- "hast-util-select": "^5.0.5",
- "hastscript": "^7.2.0",
+ "hast-util-select": "^6.0.0",
+ "hastscript": "^8.0.0",
"js-yaml": "^4.1.0",
"katex": "^0.16.8",
"mdsvex": "^0.11.0",
- "prettier": "^2.8.8",
- "prettier-plugin-svelte": "^2.10.1",
+ "prettier": "^3.0.3",
+ "prettier-plugin-svelte": "^3.0.3",
"rehype-autolink-headings": "^6.1.1",
"rehype-katex-svelte": "^1.2.0",
"rehype-slug": "^5.1.0",
"remark-math": "3.0.0",
- "svelte": "^4.0.1",
- "svelte-check": "^3.4.4",
- "svelte-multiselect": "^9.0.0",
+ "svelte": "^4.2.0",
+ "svelte-check": "^3.5.1",
+ "svelte-multiselect": "^10.1.0",
"svelte-preprocess": "^5.0.4",
"svelte-preprocess-import-assets": "^1.0.1",
- "svelte-zoo": "^0.4.8",
- "svelte2tsx": "^0.6.16",
- "typescript": "^5.1.6",
- "vite": "^4.3.9"
+ "svelte-zoo": "^0.4.9",
+ "svelte2tsx": "^0.6.21",
+ "typescript": "^5.2.2",
+ "vite": "^4.4.9"
}
}
diff --git a/src/app.css b/src/app.css
index b2f327d4..c7cfbffd 100644
--- a/src/app.css
+++ b/src/app.css
@@ -137,10 +137,6 @@ blockquote p:first-child {
margin-top: 0;
}
-/* for /api/[slug] */
-kbd {
- padding: 0 1ex 0 0;
-}
aside.toc.desktop {
position: fixed;
top: 3em;
diff --git a/src/app.html b/src/app.html
index f42e3535..d439b5d9 100644
--- a/src/app.html
+++ b/src/app.html
@@ -1,4 +1,4 @@
-
+
janosh.dev
diff --git a/src/routes/+layout.server.ts b/src/routes/+layout.server.ts
index dc7a85a2..765339ce 100644
--- a/src/routes/+layout.server.ts
+++ b/src/routes/+layout.server.ts
@@ -3,7 +3,7 @@ export const prerender = true
export const load = async ({ url }) => {
const posts = Object.entries(
// eslint-disable-next-line @typescript-eslint/quotes
- import.meta.glob('./posts/*/+page.{md,svx,svelte}', { eager: true })
+ import.meta.glob('./posts/*/+page.{md,svx,svelte}', { eager: true }),
).map(([file, post]) => ({
...post.metadata,
slug: file.split(`/`)[2],
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index da14d366..648fc02f 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -13,9 +13,12 @@
- Check out
+ Check out my latest work
+
+
matbench-discovery.materialsproject.org
+ [arXiv]
A new framework to evaluate ML energy models on materials stability prediction from unrelaxed
crystals
diff --git a/src/routes/cv/cv-data.yml b/src/routes/cv/cv-data.yml
index 860ae2ec..08b07e87 100644
--- a/src/routes/cv/cv-data.yml
+++ b/src/routes/cv/cv-data.yml
@@ -29,6 +29,7 @@ publications:
date: 10 Feb 2023
journal: ICLR ML4Materials
url: https://matbench-discovery.materialsproject.org/preprint
+ arxiv: https://arxiv.org/abs/2308.14920
- name: CHGNet
title: CHGNet - Pretrained universal neural network potential for charge-informed atomistic modeling
authors: Bowen Deng, Peichen Zhong, Janosh Riebesell, KyuJung Jun, Kevin Han, Christopher J. Bartel, Gerbrand Ceder
diff --git a/src/routes/posts/exclude-drafts-from-production/+page.md b/src/routes/posts/exclude-drafts-from-production/+page.md
index 6050744c..aa044a2d 100644
--- a/src/routes/posts/exclude-drafts-from-production/+page.md
+++ b/src/routes/posts/exclude-drafts-from-production/+page.md
@@ -31,7 +31,7 @@ If the content is part of the site's repo, a solution that avoids these problems
Then, once the content is ready to be published, simply remove the file's `draft-` prefix and build.
-An advantage of this approach is that it works with both files and folders. If you want to exclude multiple files, simply add the prefix to the parent directory. For instance, you could have a permanent `drafts` folder and move posts in and out of this folder as needed. In that case, you'd replace `` [`**/draft-*`] `` with `` [`**/posts/drafts`] ``
+An advantage of this approach is that it works with both files and folders. If you want to exclude multiple files, simply add the prefix to the parent directory. For instance, you could have a permanent `drafts` folder and move posts in and out of this folder as needed. In that case, you'd replace ``[`**/draft-*`]`` with ``[`**/posts/drafts`]``
You can then also prevent those files from cluttering up your `git` tracker by adding this directory to your `.gitignore`.
diff --git a/src/routes/posts/gatsby-algolia-search/+page.md b/src/routes/posts/gatsby-algolia-search/+page.md
index add29962..fcfbbfae 100644
--- a/src/routes/posts/gatsby-algolia-search/+page.md
+++ b/src/routes/posts/gatsby-algolia-search/+page.md
@@ -240,12 +240,12 @@ Next, we define two connected components. `Results` informs the user that no mat
const Results = connectStateResults(
({ searching, searchState: state, searchResults: res }) =>
(searching && Searching...
) ||
- (res?.nbHits === 0 && No results for '{state.query}'
)
+ (res?.nbHits === 0 && No results for '{state.query}'
),
)
const Stats = connectStateResults(
({ searchResults: res }) =>
- res?.nbHits > 0 && `${res.nbHits} result${res.nbHits > 1 ? `s` : ``}`
+ res?.nbHits > 0 && `${res.nbHits} result${res.nbHits > 1 ? `s` : ``}`,
)
```
diff --git a/src/routes/posts/gatsby-interactive-plots/triModal.js b/src/routes/posts/gatsby-interactive-plots/triModal.js
index 4938f58a..6d6750d5 100644
--- a/src/routes/posts/gatsby-interactive-plots/triModal.js
+++ b/src/routes/posts/gatsby-interactive-plots/triModal.js
@@ -5,8 +5,8 @@ const z = range.map((x) =>
(y) =>
Math.exp(-0.05 * (x ** 2 + y ** 2)) +
0.7 * Math.exp(-0.1 * ((x - 10) ** 2 + y ** 2)) +
- 0.5 * Math.exp(-0.1 * ((x + 7) ** 2 + (y - 7) ** 2))
- )
+ 0.5 * Math.exp(-0.1 * ((x + 7) ** 2 + (y - 7) ** 2)),
+ ),
)
export default {
diff --git a/src/routes/posts/hmc-bnn/bimodalChain.js b/src/routes/posts/hmc-bnn/bimodalChain.js
index e5e37906..28b161c1 100644
--- a/src/routes/posts/hmc-bnn/bimodalChain.js
+++ b/src/routes/posts/hmc-bnn/bimodalChain.js
@@ -102,7 +102,7 @@ const chain = [
]
export const [xChain, yChain] = chain[0].map((col, i) =>
- chain.map((row) => row[i])
+ chain.map((row) => row[i]),
)
export default chain
diff --git a/svelte.config.js b/svelte.config.js
index f848cbca..c828c280 100644
--- a/svelte.config.js
+++ b/svelte.config.js
@@ -68,7 +68,7 @@ const rehypePlugins = [
`svg`,
{ width: 16, height: 16, viewBox: `0 0 16 16` },
// symbol #octicon-link defined in app.html
- s(`use`, { 'xlink:href': `#octicon-link` })
+ s(`use`, { 'xlink:href': `#octicon-link` }),
),
},
],