Skip to content

Commit

Permalink
translate thermo-ensemble-trafos.(tex->typ) using cetz:0.2.2
Browse files Browse the repository at this point in the history
bump site deps and pre-commit hooks, migrate eslint to v9 flat config
  • Loading branch information
janosh committed Apr 19, 2024
1 parent b6657c8 commit 7f4d187
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
ci:
autoupdate_schedule: quarterly
skip: [eslint]

default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-symlinks
Expand Down Expand Up @@ -45,17 +46,16 @@ repos:
args: [--disable, MD013, MD033, MD041, "--"]

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.0.0-rc.0
rev: v9.0.0
hooks:
- id: eslint
types: [file]
args: [--fix]
args: [--fix, --config, site/eslint.config.js]
files: \.(js|ts|svelte)$
additional_dependencies:
- eslint
- svelte
- typescript
- eslint-plugin-svelte
- "@typescript-eslint/eslint-plugin"
- "@typescript-eslint/parser"
- typescript-eslint
- svelte-eslint-parser
Binary file modified assets/ml-activations/ml-activations-hd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/ml-activations/ml-activations.pdf
Binary file not shown.
Binary file modified assets/ml-activations/ml-activations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/ml-activations/ml-activations.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/ml-activations/ml-activations.typ
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
y-tick-step: 2,
x-tick-step: 2,
legend: "legend.inner-north-west",
legend-style: (item: (spacing: 0.18)),
{
plot.add-hline(0, style: (stroke: 0.5pt))
plot.add-vline(0, style: (stroke: 0.5pt))
Expand Down
32 changes: 32 additions & 0 deletions assets/thermo-ensemble-trafos/thermo-ensemble-trafos.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#import "@preview/cetz:0.2.2"
#import cetz.draw: line, content, set-style

#let hd = 4
#let vd = 2

#cetz.canvas(length: 1cm, {
set-style(content: (padding: .3))
content((0, 0), [$Z_m (E)$], name: "Zm")
content((hd, 0), [$Z_c(beta)$], name: "Zc")
content((2*hd, 0), [$Z_g(mu)$], name: "Zg")

content((0, -vd), [$sigma = frac(S_m, N)$], name: "Sm")
content((hd, -vd), [$f = frac(F, N)$], name: "F")
content((2*hd, -vd), [$frac(Omega, V)$], name: "O")

line("Zm", "Sm", mark: (end: ">"), name: "ZmSm")
line("Zc", "F", mark: (end: ">"), name: "ZcF")
line("Zg", "O", mark: (end: ">"), name: "ZgO")

line("Zm", "Zc", mark: (end: ">"), name: "ZmZc")
content(("Zm", 0.5, "Zc"), [Laplace in $E$], anchor: "north-west")

line("Zc", "Zg", mark: (end: ">"))
content(("Zc", 2, "Zg"), [Laplace in $N$], anchor: "north")

line("Sm", "F", mark: (end: ">"))
content(("Sm", 2, "F"), [Legendre in $epsilon = frac(E, N)$], anchor: "south")

line("F", "O", mark: (end: ">"))
content(("F", 2, "O"), [Legendre in $rho = frac(N, V)$], anchor: "south")
})
32 changes: 32 additions & 0 deletions site/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import svelte from 'eslint-plugin-svelte'
import tslint from 'typescript-eslint'

/** @type { import("eslint").Linter.FlatConfig[] } */
export default [
...tslint.configs.recommended,
...svelte.configs[`flat/recommended`],
{
rules: {
'@typescript-eslint/no-unused-vars': [
`error`,
{ argsIgnorePattern: `^_`, varsIgnorePattern: `^_` },
],
'@typescript-eslint/quotes': [`error`, `backtick`, { avoidEscape: true }],
'svelte/no-at-html-tags': `off`,
},
},
{
languageOptions: { ecmaVersion: 2020 },
},
{
files: [`**/*.svelte`],
languageOptions: {
parserOptions: {
parser: tslint.parser,
},
},
},
{
ignores: [`build/`],
},
]
23 changes: 11 additions & 12 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,30 @@
"devDependencies": {
"@iconify/svelte": "^3.1.6",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.5.5",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/js-yaml": "^4.0.9",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"eslint": "^8.57.0",
"eslint-plugin-svelte": "^2.35.1",
"eslint": "^9.0.0",
"eslint-plugin-svelte": "^2.37.0",
"highlight.js": "^11.9.0",
"image-size": "^1.1.1",
"js-yaml": "^4.1.0",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.2",
"prettier-plugin-svelte": "^3.2.3",
"rehype-katex": "^7.0.0",
"rehype-stringify": "^10.0.0",
"remark-math": "3.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"svelte": "4.2.12",
"svelte": "4.2.15",
"svelte-check": "^3.6.9",
"svelte-multiselect": "^10.2.0",
"svelte-preprocess": "^5.1.3",
"svelte-multiselect": "^10.3.0",
"svelte-preprocess": "^5.1.4",
"svelte-zoo": "^0.4.10",
"svelte2tsx": "^0.7.6",
"typescript": "5.4.3",
"typescript": "5.4.5",
"typescript-eslint": "^7.7.0",
"unified": "^11.0.4",
"vite": "^5.2.7"
"vite": "^5.2.9"
}
}

0 comments on commit 7f4d187

Please sign in to comment.