Skip to content

Commit 02f9f65

Browse files
authored
Update Docusaurus to 3.9.2 (#450)
1 parent 0c80592 commit 02f9f65

33 files changed

Lines changed: 16034 additions & 9207 deletions

File tree

babel.config.js

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

docusaurus.config.js

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @ts-check
2-
/* eslint-disable @typescript-eslint/no-var-requires */
32
/* eslint-disable no-undef */
43
/* eslint-disable @typescript-eslint/ban-ts-comment */
54

@@ -12,6 +11,10 @@
1211
* https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
1312
*
1413
*/
14+
import generated from '@csstools/postcss-global-data';
15+
import postcss_custom_media from 'postcss-custom-media';
16+
import autoprefixer from 'autoprefixer';
17+
1518
const createConfig = async () => {
1619
const { arrowDark: darkCodeTheme } = await import(
1720
'./src/utils/arrowDark.mjs'
@@ -29,13 +32,20 @@ const createConfig = async () => {
2932
projectName: 'arrow-website', // Usually your repo name.
3033

3134
onBrokenLinks: 'throw',
32-
onBrokenMarkdownLinks: 'warn',
3335

3436
i18n: {
3537
defaultLocale: 'en',
3638
locales: ['en'],
3739
},
3840

41+
future: {
42+
experimental_faster: true,
43+
v4: {
44+
removeLegacyPostBuildHeadAttribute: true,
45+
},
46+
// v4: true,
47+
},
48+
3949
presets: [
4050
[
4151
'classic',
@@ -45,7 +55,7 @@ const createConfig = async () => {
4555
path: 'content/docs',
4656
routeBasePath: '/',
4757
sidebarPath: require.resolve('./sidebars.js'),
48-
editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
58+
// editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
4959
breadcrumbs: false,
5060
},
5161
pages: {
@@ -60,7 +70,8 @@ const createConfig = async () => {
6070
blogTagsPostsComponent:
6171
'@site/src/components/Blog/BlogTagsPostsPage',
6272
postsPerPage: 8,
63-
editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
73+
// editUrl: 'https://github.com/arrow-kt/arrow-website/edit/main/',
74+
onUntruncatedBlogPosts: 'ignore',
6475
},
6576
theme: {
6677
customCss: [
@@ -172,7 +183,8 @@ const createConfig = async () => {
172183
{
173184
type: 'html',
174185
position: 'right',
175-
value: '<img src="https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=5b88f8&label=latest">',
186+
value:
187+
'<img src="https://img.shields.io/maven-central/v/io.arrow-kt/arrow-core?color=5b88f8&label=latest">',
176188
},
177189
],
178190
},
@@ -318,18 +330,21 @@ const createConfig = async () => {
318330
// Appends Global Data, Custom Media and AutoPrefixer.
319331
postcssOptions.plugins.push(
320332
// @ts-ignore
321-
require('@csstools/postcss-global-data')({
333+
generated({
322334
files: ['./src/css/vars.css'],
323335
}),
324336
);
325-
postcssOptions.plugins.push(require('postcss-custom-media'));
326-
postcssOptions.plugins.push(require('autoprefixer'));
337+
postcssOptions.plugins.push(postcss_custom_media);
338+
postcssOptions.plugins.push(autoprefixer);
327339
return postcssOptions;
328340
},
329341
}),
330342
],
331343
markdown: {
332344
mermaid: true,
345+
hooks: {
346+
onBrokenMarkdownLinks: 'throw',
347+
},
333348
},
334349
themes: [
335350
'@docusaurus/theme-mermaid',

eslint.config.mjs

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import { defineConfig } from "eslint/config";
2+
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
3+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
4+
import prettier from "eslint-plugin-prettier";
5+
import _import from "eslint-plugin-import";
6+
import tsParser from "@typescript-eslint/parser";
7+
import path from "node:path";
8+
import { fileURLToPath } from "node:url";
9+
import js from "@eslint/js";
10+
import { FlatCompat } from "@eslint/eslintrc";
11+
12+
const __filename = fileURLToPath(import.meta.url);
13+
const __dirname = path.dirname(__filename);
14+
const compat = new FlatCompat({
15+
baseDirectory: __dirname,
16+
recommendedConfig: js.configs.recommended,
17+
allConfig: js.configs.all
18+
});
19+
20+
export default defineConfig([{
21+
extends: fixupConfigRules(compat.extends(
22+
"eslint:recommended",
23+
"plugin:@typescript-eslint/recommended",
24+
"prettier",
25+
"plugin:import/recommended",
26+
"plugin:import/typescript",
27+
)),
28+
29+
plugins: {
30+
"@typescript-eslint": fixupPluginRules(typescriptEslint),
31+
prettier,
32+
import: fixupPluginRules(_import),
33+
},
34+
35+
languageOptions: {
36+
parser: tsParser,
37+
ecmaVersion: "latest",
38+
sourceType: "module",
39+
40+
parserOptions: {
41+
ecmaFeatures: {
42+
jsx: true,
43+
},
44+
},
45+
},
46+
47+
settings: {
48+
"import/parsers": {
49+
"@typescript-eslint/parser": [".ts", ".tsx"],
50+
},
51+
52+
"import/resolver": {
53+
typescript: {
54+
alwaysTryTypes: true,
55+
},
56+
},
57+
},
58+
59+
rules: {
60+
"prettier/prettier": "error",
61+
62+
"import/no-unresolved": ["error", {
63+
ignore: ["^@theme", "^@docusaurus", "^@site"],
64+
}],
65+
66+
"import/order": ["error", {
67+
groups: [
68+
"builtin",
69+
"external",
70+
"internal",
71+
"parent",
72+
"sibling",
73+
"index",
74+
"object",
75+
"type",
76+
],
77+
78+
pathGroups: [{
79+
pattern: "{@docusaurus/**,@theme/**}",
80+
group: "external",
81+
position: "after",
82+
}, {
83+
pattern: "@site/**",
84+
group: "internal",
85+
position: "after",
86+
}],
87+
88+
distinctGroup: true,
89+
pathGroupsExcludedImportTypes: ["@docusaurus/**", "@theme/**", "@site/**"],
90+
"newlines-between": "always",
91+
}],
92+
93+
"@typescript-eslint/no-unused-vars": ["error", {
94+
argsIgnorePattern: "^_",
95+
}],
96+
},
97+
}]);

0 commit comments

Comments
 (0)