Skip to content

Commit

Permalink
pre-commit autoupdate && pre-commit run --all-files && pnpm up --latest
Browse files Browse the repository at this point in the history
includes auto-fixes from prettier v2->v3
  • Loading branch information
janosh committed Aug 30, 2023
1 parent 5521460 commit 56407db
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 36 deletions.
6 changes: 4 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
env:
browser: true
node: true
extends:
- plugin:svelte/recommended
- eslint:recommended
Expand All @@ -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/]
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,15 +29,15 @@ repos:
- svelte

- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.5
hooks:
- id: codespell
stages: [commit, commit-msg]
exclude_types: [svg]
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]
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
4 changes: 0 additions & 4 deletions src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<title>janosh.dev</title>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
5 changes: 4 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
</p>

<strong>
Check out <a href="https://matbench-discovery.materialsproject.org">
Check out my latest work
<br />
<a href="https://matbench-discovery.materialsproject.org">
matbench-discovery.materialsproject.org
</a>
[<a href="https://arxiv.org/abs/2308.14920">arXiv</a>]
<br />
A new framework to evaluate ML energy models on materials stability prediction from unrelaxed
crystals
Expand Down
1 change: 1 addition & 0 deletions src/routes/cv/cv-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/routes/posts/exclude-drafts-from-production/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
4 changes: 2 additions & 2 deletions src/routes/posts/gatsby-algolia-search/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 && <div>Searching...</div>) ||
(res?.nbHits === 0 && <div>No results for &apos;{state.query}&apos;</div>)
(res?.nbHits === 0 && <div>No results for &apos;{state.query}&apos;</div>),
)

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` : ``}`,
)
```
Expand Down
4 changes: 2 additions & 2 deletions src/routes/posts/gatsby-interactive-plots/triModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/posts/hmc-bnn/bimodalChain.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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` }),
),
},
],
Expand Down

0 comments on commit 56407db

Please sign in to comment.