diff --git a/.github/workflows/superset-docs-verify.yml b/.github/workflows/superset-docs-verify.yml index 185365fb01b..72e8d049569 100644 --- a/.github/workflows/superset-docs-verify.yml +++ b/.github/workflows/superset-docs-verify.yml @@ -21,12 +21,14 @@ jobs: - uses: actions/checkout@v5 # Do not bump this linkinator-action version without opening # an ASF Infra ticket to allow the new version first! - - uses: JustinBeckwith/linkinator-action@v1.11.0 + - uses: JustinBeckwith/linkinator-action@3d5ba091319fa7b0ac14703761eebb7d100e6f6d # v1.11.0 continue-on-error: true # This will make the job advisory (non-blocking, no red X) with: - paths: "**/*.md, **/*.mdx, !superset-frontend/CHANGELOG.md" + paths: "**/*.md, **/*.mdx" linksToSkip: >- - ^https://github.com/apache/(superset|incubator-superset)/(pull|issue)/\d+, + ^https://github.com/apache/(superset|incubator-superset)/(pull|issues)/\d+, + ^https://github.com/apache/(superset|incubator-superset)/commit/[a-f0-9]+, + superset-frontend/.*CHANGELOG\.md, http://localhost:8088/, http://127.0.0.1:3000/, http://localhost:9001/, @@ -41,12 +43,12 @@ jobs: http://theiconic.com.au/, https://dev.mysql.com/doc/refman/5.7/en/innodb-limits.html, ^https://img\.shields\.io/.*, - https://vkusvill.ru/ - https://www.linkedin.com/in/mark-thomas-b16751158/ - https://theiconic.com.au/ - https://wattbewerb.de/ - https://timbr.ai/ - https://opensource.org/license/apache-2-0 + https://vkusvill.ru/, + https://www.linkedin.com/in/mark-thomas-b16751158/, + https://theiconic.com.au/, + https://wattbewerb.de/, + https://timbr.ai/, + https://opensource.org/license/apache-2-0, https://www.plaidcloud.com/ build-deploy: name: Build & Deploy diff --git a/docs/src/theme.d.ts b/docs/src/theme.d.ts new file mode 100644 index 00000000000..04683c86865 --- /dev/null +++ b/docs/src/theme.d.ts @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +declare module '@theme/Layout' { + import type { ReactNode } from 'react'; + + export interface Props { + readonly children?: ReactNode; + readonly noFooter?: boolean; + readonly wrapperClassName?: string; + readonly title?: string; + readonly description?: string; + } + + export default function Layout(props: Props): ReactNode; +} diff --git a/docs/src/webpack.extend.ts b/docs/src/webpack.extend.ts index 81fa9d907a0..58d943fa5cb 100644 --- a/docs/src/webpack.extend.ts +++ b/docs/src/webpack.extend.ts @@ -23,8 +23,8 @@ import type { Plugin } from '@docusaurus/types'; export default function webpackExtendPlugin(): Plugin { return { name: 'custom-webpack-plugin', - configureWebpack(config, isServer, utils) { - const { isDev } = utils; + configureWebpack(config) { + const isDev = process.env.NODE_ENV === 'development'; return { devtool: isDev ? 'eval-source-map' : config.devtool, ...(isDev && { diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 19162d32176..23d994c6b14 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -2,12 +2,27 @@ // This file is not used in compilation. It is here just for a nice editor experience. "extends": "@docusaurus/tsconfig", "compilerOptions": { - "baseUrl": "." + "baseUrl": ".", + "skipLibCheck": true, + "noImplicitAny": false, + "strict": false, + "types": ["@docusaurus/module-type-aliases"] }, "jsx": "react-jsx", "moduleResolution": "node", "baseUrl": "./", "paths": { + "@superset-ui/core": ["../superset-frontend/packages/superset-ui-core/src"], + "@superset-ui/core/*": ["../superset-frontend/packages/superset-ui-core/src/*"], "*": ["src/*", "node_modules/*"] - } + }, + "include": [ + "src/**/*.ts", + "src/**/*.tsx" + ], + "exclude": [ + "node_modules", + "../superset-frontend/**/*", + "src/webpack.extend.ts" + ] }