Skip to content

Commit

Permalink
docs: fix some biome stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasheartman committed Jan 30, 2024
1 parent b475bb5 commit 6ad1745
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 58 deletions.
2 changes: 2 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"website/i18n/*.js",
"website/pages",
"website/translated_docs",
"website/global.js",
"website",
"setupJest.js",
"dist",
Expand All @@ -74,6 +75,7 @@
"website/i18n/*.js",
"website/pages",
"website/translated_docs",
"website/global.js",
"setupJest.js",
"dist",
"build",
Expand Down
2 changes: 1 addition & 1 deletion website/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
57 changes: 22 additions & 35 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module.exports = {
{
type: 'doc',
docId: 'unleash-academy/managing-unleash-for-devops',
label: 'Managing Unleash for DevOps/Admins'
label: 'Managing Unleash for DevOps/Admins',
},
],
},
Expand All @@ -112,18 +112,18 @@ module.exports = {
html: '<span class="hide-at-small-sizes">Unleash </span>Certification',
items: [
{
label: 'Foundational Unleash',
href: 'https://docs.google.com/forms/d/1iPUk2I0k5xMzicn9aLMcPF3b9ub3ZwdVjRxCxWxV7js/viewform',
label: 'Foundational Unleash',
href: 'https://docs.google.com/forms/d/1iPUk2I0k5xMzicn9aLMcPF3b9ub3ZwdVjRxCxWxV7js/viewform',
},
{
label: 'Advanced Unleash for Developers',
href: 'https://docs.google.com/forms/d/1NUL9hyO8Ys916TB6fPV3-jkvD97OmPXZ8_TO84Wjqgc/viewform',
label: 'Advanced Unleash for Developers',
href: 'https://docs.google.com/forms/d/1NUL9hyO8Ys916TB6fPV3-jkvD97OmPXZ8_TO84Wjqgc/viewform',
},
{
label: 'Managing Unleash for DevOps/Admins',
href: 'https://docs.google.com/forms/d/1JlIqmXI3P7dj0n-OiUs2IYsYXgmqw23BChaemlSgHJA/viewform',
},
],
label: 'Managing Unleash for DevOps/Admins',
href: 'https://docs.google.com/forms/d/1JlIqmXI3P7dj0n-OiUs2IYsYXgmqw23BChaemlSgHJA/viewform',
},
],
},
{
type: 'html',
Expand Down Expand Up @@ -224,9 +224,9 @@ module.exports = {
// Optional medium-zoom options at
// https://www.npmjs.com/package/medium-zoom#options
options: {
background: 'var(--ifm-background-color)'
background: 'var(--ifm-background-color)',
},
}
},
},
presets: [
[
Expand Down Expand Up @@ -364,7 +364,10 @@ module.exports = {
to: '/reference/integrations/slack',
},
{
from: ['/addons/slack-app', '/reference/addons/slack-app'],
from: [
'/addons/slack-app',
'/reference/addons/slack-app',
],
to: '/reference/integrations/slack-app',
},
{
Expand Down Expand Up @@ -484,10 +487,7 @@ module.exports = {
to: '/reference/projects',
},
{
from: [
'/user_guide/rbac',
'/advanced/groups',
],
from: ['/user_guide/rbac', '/advanced/groups'],
to: '/reference/rbac',
},
{
Expand Down Expand Up @@ -612,10 +612,7 @@ module.exports = {
to: '/',
},
{
from: [
'/topics/feature-flags/tutorials',
'/tutorials',
],
from: ['/topics/feature-flags/tutorials', '/tutorials'],
to: '/feature-flag-tutorials',
},
{
Expand All @@ -631,10 +628,7 @@ module.exports = {
to: '/feature-flag-tutorials/nextjs/implementing-feature-flags',
},
{
from: [
'/tutorials/academy',
'/unleash-academy',
],
from: ['/tutorials/academy', '/unleash-academy'],
to: '/unleash-academy/introduction',
},
{
Expand All @@ -651,7 +645,7 @@ module.exports = {
},
{
from: '/developer-guide',
to: '/contributing'
to: '/contributing',
},
{
from: [
Expand Down Expand Up @@ -706,10 +700,7 @@ module.exports = {
to: '/using-unleash/troubleshooting/feature-not-available',
},
{
from: [
'/reference/deploy',
'/deploy',
],
from: ['/reference/deploy', '/deploy'],
to: '/using-unleash/deploy',
},
{
Expand Down Expand Up @@ -789,10 +780,8 @@ module.exports = {
],
to: '/how-to/how-to-environment-import-export',
},


].map(addDocsRoutePrefix), // add /docs prefixes
createRedirects: function (toPath) {
createRedirects: (toPath) => {
if (
toPath.indexOf('/docs/') === -1 &&
toPath.indexOf('index.html') === -1
Expand Down Expand Up @@ -863,7 +852,5 @@ module.exports = {
async: true,
},
],
clientModules: [
require.resolve('./global.js'),
],
clientModules: [require.resolve('./global.js')],
};
27 changes: 16 additions & 11 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// TODO: Add warning to legacy API docs - but generated items
// TODO: Continue to clean URLs & redirects - but wait for SEO results first


module.exports = {
academy: [
{
Expand Down Expand Up @@ -40,7 +39,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'Feature Flag Best Practices',
description: 'Principles and recommendations for best practices of using feature flags.',
description:
'Principles and recommendations for best practices of using feature flags.',
slug: '/topics',
},
items: [
Expand Down Expand Up @@ -90,7 +90,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'Feature Flag Tutorials',
description: 'Tutorials to implement feature flags with your framework.',
description:
'Tutorials to implement feature flags with your framework.',
slug: 'feature-flag-tutorials',
},
items: [
Expand Down Expand Up @@ -137,7 +138,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'Understanding Unleash',
description: 'Documentation on how Unleash works, high-level architecture and important concepts.',
description:
'Documentation on how Unleash works, high-level architecture and important concepts.',
slug: 'understanding-unleash',
},
items: [
Expand Down Expand Up @@ -202,7 +204,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'Using Unleash',
description: 'Documentation on how to accomplish specific tasks when building with Unleash, including API and SDK documentation.',
description:
'Documentation on how to accomplish specific tasks when building with Unleash, including API and SDK documentation.',
slug: '/using-unleash',
},
items: [
Expand Down Expand Up @@ -245,9 +248,8 @@ module.exports = {
'reference/api/legacy/unleash/client/metrics',
'reference/api/legacy/unleash/client/register',
],

},
]
],
},
{
label: 'Application SDKs',
Expand Down Expand Up @@ -319,7 +321,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'How-to: Unleash API',
description: 'Learn how to work with the Unleash API',
description:
'Learn how to work with the Unleash API',
slug: '/how-to/api',
},
items: [
Expand All @@ -338,7 +341,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'How-to: The Unleash Proxy',
description: 'Learn how to work with the Unleash Proxy',
description:
'Learn how to work with the Unleash Proxy',
slug: '/how-to/proxy',
},
items: ['how-to/how-to-run-the-unleash-proxy'],
Expand Down Expand Up @@ -393,7 +397,8 @@ module.exports = {
link: {
type: 'generated-index',
title: 'How-to: users and permissions',
description: 'Users and permission how-to guides.',
description:
'Users and permission how-to guides.',
slug: '/how-to/users-and-permissions',
},
},
Expand All @@ -415,7 +420,7 @@ module.exports = {
slug: '/how-to/sso',
},
},
]
],
},
{
type: 'category',
Expand Down
14 changes: 7 additions & 7 deletions website/src/components/ApiRequest/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,19 @@ http ${verbUpper} \\
).trim();

return (
<Tabs groupId="api-request">
<TabItem value="http" label="HTTP">
<CodeBlock language="http" title={title}>
<Tabs groupId='api-request'>
<TabItem value='http' label='HTTP'>
<CodeBlock language='http' title={title}>
{httpBlock}
</CodeBlock>
</TabItem>
<TabItem value="curl" label="cURL">
<CodeBlock language="bash" title={title}>
<TabItem value='curl' label='cURL'>
<CodeBlock language='bash' title={title}>
{curlBlock}
</CodeBlock>
</TabItem>
<TabItem value="httpie" label="HTTPie">
<CodeBlock language="bash" title={title}>
<TabItem value='httpie' label='HTTPie'>
<CodeBlock language='bash' title={title}>
{httpieBlock}
</CodeBlock>
</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions website/src/icons/close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import styles from './styles.module.css';
const svg = () => (
<svg
className={styles['icon']}
viewBox="0 0 12 12"
xmlns="http://www.w3.org/2000/svg"
viewBox='0 0 12 12'
xmlns='http://www.w3.org/2000/svg'
>
<path d="m6 5.293 4.789-4.79.707.708-4.79 4.79 4.79 4.789-.707.707-4.79-4.79-4.789 4.79-.707-.707L5.293 6 .502 1.211 1.21.504 6 5.294z" />
<path d='m6 5.293 4.789-4.79.707.708-4.79 4.79 4.79 4.789-.707.707-4.79-4.79-4.789 4.79-.707-.707L5.293 6 .502 1.211 1.21.504 6 5.294z' />
</svg>
);

Expand Down
2 changes: 1 addition & 1 deletion website/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -776,4 +776,4 @@
"permanent": true
}
]
}
}

0 comments on commit 6ad1745

Please sign in to comment.