Skip to content

Commit 4259f15

Browse files
committed
style: fully migrate to @antfu/eslint-config
1 parent 0fb78c1 commit 4259f15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+295
-396
lines changed

.eslintignore

-46
This file was deleted.

.eslintrc.cjs

-38
This file was deleted.

.prettierrc

-16
This file was deleted.

data/notes/Keep Kalm, Rust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ fn main() {
2323

2424
There exist some more "precise" types of panic. I've learned about `unimplemented!()`, for unfinished code, and `unreachable!()` for code scenarios that shouldn't be possible (e.g. calculated [GPA](https://en.wikipedia.org/wiki/Academic_grading_in_the_United_States) is above 4)
2525

26-
But that's it for now, `panicking == fatal errors`, and it's the first Rust error handling *- in that case, error not-handling -* API I've read about!
26+
But that's it for now, `panicking == fatal errors`, and it's the first Rust error handling *- in that case, error not-handling -* API I've read about!

data/notes/Let's Get Coding With Rust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ fn main() {
3232
}
3333
```
3434

35-
I find it quite interesting because module resolution is file system-based (when ignoring crate modules), so it kind of forces you adopt a given file structure for your project, making them standardized? I don't know, more coding ahead!
35+
I find it quite interesting because module resolution is file system-based (when ignoring crate modules), so it kind of forces you adopt a given file structure for your project, making them standardized? I don't know, more coding ahead!

data/notes/Rust, the Cool Part.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let d = c; // ownership is moved, `c` cannot be accessed anymore
1919
Instead, if we just want to reference another variable's data, we can borrow it from its owner.
2020
```rust
2121
let a = vec![1, 2, 3];
22-
let b = &a; // `a` value is borrowed, `a` can still accessed
22+
let b = &a; // `a` value is borrowed, `a` can still accessed
2323
let c = &a; // `a` and `b` can still be accessed
2424
```
2525

data/talks/230209-open-source-ecosystem.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"url": "https://230209-open-source-ecosystem.diapositiv.lihbr.com/1"
1717
},
1818
{
19-
"name": "Transcript",
19+
"name": "Transcript",
2020
"url": "https://docs.google.com/document/d/17-I8Ueq8DVf2UakgmFDAkfAZVwXTHLQOJ9C1dHnJpmk/edit?usp=sharing"
2121
},
22-
{
23-
"name": "Nuxt 3 link RFC",
24-
"url": "https://github.com/nuxt/nuxt/discussions/16023#discussioncomment-1683819"
25-
}
22+
{
23+
"name": "Nuxt 3 link RFC",
24+
"url": "https://github.com/nuxt/nuxt/discussions/16023#discussioncomment-1683819"
25+
}
2626
],
2727
"feedback": {
2828
"hashtags": "vuejsamsterdam",

data/talks/231018-open-source-ecosystem.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
"🧰",
3636
"🌐"
3737
]
38-
}
38+
}

eslint.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import antfu from "@antfu/eslint-config";
2+
3+
export default antfu({
4+
stylistic: {
5+
quotes: "double",
6+
indent: "tab",
7+
semi: true,
8+
overrides: {
9+
"style/arrow-parens": ["error", "always"],
10+
"style/brace-style": ["error", "1tbs"],
11+
"style/operator-linebreak": [
12+
"error",
13+
"after",
14+
{ overrides: { "?": "before", ":": "before" } },
15+
],
16+
"curly": ["error", "all"],
17+
"ts/consistent-type-definitions": ["error", "type"],
18+
"ts/explicit-module-boundary-types": "error",
19+
},
20+
},
21+
});

netlify.toml

+75-75
Original file line numberDiff line numberDiff line change
@@ -1,123 +1,123 @@
11
[build]
2-
base = ""
3-
command = "npm run build"
4-
publish = "dist"
2+
base = ""
3+
command = "npm run build"
4+
publish = "dist"
55

6-
[build.environment]
7-
NODE_VERSION = "16.6.1"
6+
[build.environment]
7+
NODE_VERSION = "20.13.1"
88

9-
[build.processing]
10-
skip_processing = false
9+
[build.processing]
10+
skip_processing = false
1111

12-
[build.processing.html]
13-
pretty_urls = false
12+
[build.processing.html]
13+
pretty_urls = false
1414

15-
[build.processing.css]
16-
bundle = false
17-
minify = false
15+
[build.processing.css]
16+
bundle = false
17+
minify = false
1818

19-
[build.processing.js]
20-
bundle = false
21-
minify = false
19+
[build.processing.js]
20+
bundle = false
21+
minify = false
2222

23-
[build.processing.images]
24-
compress = true
23+
[build.processing.images]
24+
compress = true
2525

2626
[dev]
27-
framework = "#custom"
28-
command = "npm run dev"
29-
port = 8888
30-
targetPort = 5173
31-
autoLaunch = false
27+
framework = "#custom"
28+
command = "npm run dev"
29+
port = 8888
30+
targetPort = 5173
31+
autoLaunch = false
3232

3333
[functions]
34-
directory = "src/functions"
35-
node_bundler = "esbuild"
34+
directory = "src/functions"
35+
node_bundler = "esbuild"
3636

37-
[functions."poll-keepalive"]
38-
schedule = "0 0 * * 0"
37+
[functions.poll-keepalive]
38+
schedule = "0 0 * * 0"
3939

4040
[context.production.processing]
41-
skip_processing = false
41+
skip_processing = false
4242

4343
[context.deploy-preview.processing]
44-
skip_processing = true
44+
skip_processing = true
4545

4646
[context.branch-deploy]
47-
command = "npm run build:staging"
47+
command = "npm run build:staging"
4848

49-
[context.branch-deploy.processing]
50-
skip_processing = true
49+
[context.branch-deploy.processing]
50+
skip_processing = true
5151

5252
# Previews
5353
[[redirects]]
54-
from = "/preview/*"
55-
to = "/.netlify/functions/preview"
56-
status = 200
57-
force = true
54+
from = "/preview/*"
55+
to = "/.netlify/functions/preview"
56+
status = 200
57+
force = true
5858

5959
# Pretty API
6060
[[redirects]]
61-
from = "/api/*"
62-
to = "/.netlify/functions/:splat"
63-
status = 200
64-
force = true
61+
from = "/api/*"
62+
to = "/.netlify/functions/:splat"
63+
status = 200
64+
force = true
6565

6666
# Netlify domain
6767
[[redirects]]
68-
from = "https://lihbr.netlify.app/*"
69-
to = "https://lihbr.com/:splat"
70-
status = 301
71-
force = true
68+
from = "https://lihbr.netlify.app/*"
69+
to = "https://lihbr.com/:splat"
70+
status = 301
71+
force = true
7272

7373
# Analytics
7474
[[redirects]]
75-
from = "/p7e/api/event"
76-
to = "https://plausible.io/api/event"
77-
status = 202
78-
force = true
75+
from = "/p7e/api/event"
76+
to = "https://plausible.io/api/event"
77+
status = 202
78+
force = true
7979

8080
# Old diapositiv (221012)
8181
[[redirects]]
82-
from = "https://diapositiv.lihbr.com/talk/an-introduction-to-nuxt-global-modules"
83-
to = "https://lihbr.com/talks/nuxtnation/an-introduction-to-nuxt-global-modules"
84-
status = 301
85-
force = true
82+
from = "https://diapositiv.lihbr.com/talk/an-introduction-to-nuxt-global-modules"
83+
to = "https://lihbr.com/talks/nuxtnation/an-introduction-to-nuxt-global-modules"
84+
status = 301
85+
force = true
8686

8787
[[redirects]]
88-
from = "https://diapositiv.lihbr.com/talk/integrating-11ty-with-a-cms-and-making-it-cool-to-use"
89-
to = "https://lihbr.com/talks/11ties/integrating-11ty-with-a-cms-and-making-it-cool-to-use"
90-
status = 301
91-
force = true
88+
from = "https://diapositiv.lihbr.com/talk/integrating-11ty-with-a-cms-and-making-it-cool-to-use"
89+
to = "https://lihbr.com/talks/11ties/integrating-11ty-with-a-cms-and-making-it-cool-to-use"
90+
status = 301
91+
force = true
9292

9393
[[redirects]]
94-
from = "https://diapositiv.lihbr.com/talk/nuxt-3-modules-and-open-source"
95-
to = "https://lihbr.com/talks/vueamsterdam/nuxt-3-modules-and-open-source"
96-
status = 301
97-
force = true
94+
from = "https://diapositiv.lihbr.com/talk/nuxt-3-modules-and-open-source"
95+
to = "https://lihbr.com/talks/vueamsterdam/nuxt-3-modules-and-open-source"
96+
status = 301
97+
force = true
9898

9999
# Old diapositiv (230103)
100100
[[redirects]]
101-
from = "https://diapositiv.lihbr.com/talk/*"
102-
to = "https://lihbr.com/talks/:splat"
103-
status = 301
104-
force = true
101+
from = "https://diapositiv.lihbr.com/talk/*"
102+
to = "https://lihbr.com/talks/:splat"
103+
status = 301
104+
force = true
105105

106106
[[redirects]]
107-
from = "https://diapositiv.lihbr.com/*"
108-
to = "https://lihbr.com/:splat"
109-
status = 301
110-
force = true
107+
from = "https://diapositiv.lihbr.com/*"
108+
to = "https://lihbr.com/:splat"
109+
status = 301
110+
force = true
111111

112112
# Old blog (230103)
113113
[[redirects]]
114-
from = "/blog"
115-
to = "/#posts"
116-
status = 301
117-
force = true
114+
from = "/blog"
115+
to = "/#posts"
116+
status = 301
117+
force = true
118118

119119
[[redirects]]
120-
from = "/blog/*"
121-
to = "/posts/:splat"
122-
status = 301
123-
force = true
120+
from = "/blog/*"
121+
to = "/posts/:splat"
122+
status = 301
123+
force = true

postcss.config.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const process = require("node:process");
2+
13
module.exports = {
24
plugins: {
35
"postcss-import": {},

src/akte/constants.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import process from "node:process";
2+
13
import * as dotenv from "dotenv";
24

35
import { getSiteURL } from "./lib/getSiteURL";

0 commit comments

Comments
 (0)