Skip to content

Commit 6a1090f

Browse files
Update plugin types
1 parent 5713f2f commit 6a1090f

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

packages/cursorless-org-docs/src/plugins/scope-tests-plugin.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import {
2-
getPackagePath,
32
getScopeTestLanguagesRecursively,
43
getScopeTestPaths,
54
type ScopeTestPath,
65
} from "@cursorless/node-common";
7-
import { LoadContext, Plugin } from "@docusaurus/types";
6+
import type { LoadContext, Plugin, PluginOptions } from "@docusaurus/types";
87
import * as fs from "node:fs";
98
import * as path from "node:path";
109
import type {
@@ -15,21 +14,20 @@ import type {
1514
} from "../docs/user/languages/components/types";
1615

1716
export default function prepareAssetsPlugin(
18-
context: LoadContext,
19-
options: {},
17+
_context: LoadContext,
18+
_options: PluginOptions,
2019
): Plugin<ScopeTests> {
21-
let data: ScopeTests;
22-
2320
return {
2421
name: "scope-tests-plugin",
2522

2623
loadContent(): ScopeTests {
24+
// eslint-disable-next-line unicorn/prefer-module
2725
const repoRoot = path.join(__dirname, "../../../..");
2826
process.env.CURSORLESS_REPO_ROOT = repoRoot;
2927
return prepareAssets();
3028
},
3129

32-
async contentLoaded({ content, actions }) {
30+
contentLoaded({ content, actions }) {
3331
actions.setGlobalData(content);
3432
},
3533
};
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1-
module.exports = function tailwindPlugin(context, options) {
1+
import type {
2+
LoadContext,
3+
PluginOptions,
4+
PostCssOptions,
5+
} from "@docusaurus/types";
6+
import tailwindcss from "tailwindcss";
7+
8+
export default function tailwindPlugin(
9+
_context: LoadContext,
10+
_options: PluginOptions,
11+
) {
212
return {
313
name: "tailwind-plugin",
4-
configurePostCss(postcssOptions) {
5-
postcssOptions.plugins.push(require("tailwindcss"));
14+
15+
configurePos1tCss(postcssOptions: PostCssOptions): PostCssOptions {
16+
postcssOptions.plugins.push(tailwindcss);
617
return postcssOptions;
718
},
819
};
9-
};
20+
}

0 commit comments

Comments
 (0)