Skip to content

Commit 28972df

Browse files
Merge branch 'build/update-astro-paper'
# Conflicts: # package-lock.json # package.json # src/components/Datetime.tsx # src/config.ts # src/content/config.ts # src/layouts/PostDetails.astro # src/pages/posts/[slug]/index.astro # src/pages/posts/index.astro # src/pages/tags/[tag]/[page].astro # src/pages/tags/[tag]/index.astro
2 parents ae2cf4b + a34d541 commit 28972df

43 files changed

Lines changed: 1954 additions & 2041 deletions

Some content is hidden

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

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
!astro.config.ts
1010
!package.json
1111
!.prettierrc
12-
!.eslintrc.js
12+
!eslint.config.mjs
1313
!README.md

astro.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import remarkCollapse from "remark-collapse";
66
import sitemap from "@astrojs/sitemap";
77
import { SITE } from "./src/config";
88

9-
import { remarkReadingTime } from "./src/utils/remark-reading-time.mjs";
10-
119
// https://astro.build/config
1210
export default defineConfig({
1311
site: SITE.website,
@@ -16,12 +14,13 @@ export default defineConfig({
1614
applyBaseStyles: false,
1715
}),
1816
react(),
19-
sitemap(),
17+
sitemap({
18+
filter: page => SITE.showArchives || !page.endsWith("/archives"),
19+
}),
2020
],
2121
markdown: {
2222
remarkPlugins: [
2323
remarkToc,
24-
remarkReadingTime,
2524
[
2625
remarkCollapse,
2726
{
@@ -41,4 +40,7 @@ export default defineConfig({
4140
},
4241
},
4342
scopedStyleStrategy: "where",
43+
experimental: {
44+
contentLayer: true,
45+
},
4446
});

eslint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
import astroParser from "astro-eslint-parser";
5+
import eslintPluginAstro from "eslint-plugin-astro";
6+
7+
export default [
8+
js.configs.recommended,
9+
...tseslint.configs.recommended,
10+
...eslintPluginAstro.configs.recommended,
11+
{
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
},
17+
},
18+
},
19+
{
20+
files: ["*.astro"],
21+
languageOptions: {
22+
parser: astroParser,
23+
parserOptions: {
24+
parser: "@typescript-eslint/parser",
25+
extraFileExtensions: [".astro"],
26+
},
27+
},
28+
},
29+
{
30+
files: ["tailwind.config.cjs", "**/*.d.ts"],
31+
rules: {
32+
"@typescript-eslint/no-require-imports": "off",
33+
"@typescript-eslint/triple-slash-reference": "off",
34+
},
35+
},
36+
{
37+
rules: {
38+
"@typescript-eslint/no-unused-expressions": "off",
39+
},
40+
},
41+
{
42+
ignores: ["dist/**", ".astro"],
43+
},
44+
];

0 commit comments

Comments
 (0)