Skip to content

Commit

Permalink
Merge branch 'main' into slorber/blog-post
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jul 31, 2022
2 parents c32d7d5 + f683589 commit 7444301
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 42 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ module.exports = {
'type',
],
pathGroups: [
// always put css import to the last, ref:
// https://github.com/import-js/eslint-plugin-import/issues/1239
{
pattern: '*.+(css|sass|less|scss|pcss|styl)',
group: 'unknown',
patternOptions: {matchBase: true},
position: 'after',
},
{pattern: '@jest/globals', group: 'builtin', position: 'before'},
{pattern: 'react', group: 'builtin', position: 'before'},
{pattern: 'fs-extra', group: 'builtin'},
Expand All @@ -265,6 +273,10 @@ module.exports = {
{pattern: '@theme-original/**', group: 'internal'},
],
pathGroupsExcludedImportTypes: [],
// example: let `import './nprogress.css';` after importing others
// in `packages/docusaurus-theme-classic/src/nprogress.ts`
// see more: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md#warnonunassignedimports-truefalse
warnOnUnassignedImports: true,
},
],
'import/prefer-default-export': OFF,
Expand Down
11 changes: 2 additions & 9 deletions packages/create-docusaurus/templates/facebook/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down Expand Up @@ -35,13 +32,9 @@ module.exports = {
'header/header': [
ERROR,
'block',

[
'*',
' * Copyright (c) Meta Platforms, Inc. and affiliates.',
' *',
' * This source code is licensed under the MIT license found in the',
' * LICENSE file in the root directory of this source tree.',
' * (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.',
' *',
// Unfortunately eslint-plugin-header doesn't support optional lines.
// If you want to enforce your website JS files to have @flow or @format,
Expand Down
5 changes: 2 additions & 3 deletions packages/create-docusaurus/templates/facebook/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
5 changes: 1 addition & 4 deletions packages/create-docusaurus/templates/facebook/sidebars.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
*
* @format
*/
Expand Down
3 changes: 2 additions & 1 deletion packages/docusaurus-theme-classic/src/nprogress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
*/

import nprogress from 'nprogress';
import './nprogress.css';
import type {ClientModule} from '@docusaurus/types';

import './nprogress.css';

nprogress.configure({showSpinner: false});

const delay = 200;
Expand Down
5 changes: 3 additions & 2 deletions packages/docusaurus-theme-classic/src/theme/DocCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ import {
} from '@docusaurus/theme-common/internal';
import isInternalUrl from '@docusaurus/isInternalUrl';
import {translate} from '@docusaurus/Translate';
import type {Props} from '@theme/DocCard';

import styles from './styles.module.css';
import type {Props} from '@theme/DocCard';
import type {
PropSidebarItemCategory,
PropSidebarItemLink,
} from '@docusaurus/plugin-content-docs';

import styles from './styles.module.css';

function CardContainer({
href,
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import Translate from '@docusaurus/Translate';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import BrowserOnly from '@docusaurus/BrowserOnly';
import {usePrismTheme} from '@docusaurus/theme-common';

import type {Props} from '@theme/Playground';
import type {ThemeConfig} from '@docusaurus/theme-live-codeblock';

import styles from './styles.module.css';
import type {ThemeConfig} from '@docusaurus/theme-live-codeblock';

function Header({children}: {children: React.ReactNode}) {
return <div className={clsx(styles.playgroundHeader)}>{children}</div>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ import {useAllDocsData} from '@docusaurus/plugin-content-docs/client';
import Translate, {translate} from '@docusaurus/Translate';
import Layout from '@theme/Layout';

import styles from './styles.module.css';
import type {ThemeConfig} from '@docusaurus/theme-search-algolia';

import styles from './styles.module.css';

// Very simple pluralization: probably good enough for now
function useDocumentsFoundPlural() {
const {selectMessage} = usePluralForm();
Expand Down
2 changes: 2 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ paraiso
pathinfo
pathnames
pbcopy
pcss
peaceiris
philpl
photoshop
Expand Down Expand Up @@ -309,6 +310,7 @@ subsubsubfolder
sucipto
supabase
svgr
styl
swizzlable
teik
templating
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import React from 'react';
import clsx from 'clsx';
import LiteYouTubeEmbed from 'react-lite-youtube-embed';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';
import Link from '@docusaurus/Link';
import Translate, {translate} from '@docusaurus/Translate';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
Expand All @@ -25,6 +24,7 @@ import Features, {type FeatureItem} from '@site/src/data/features';
import ProductHuntCard from '@site/src/components/ProductHuntCard';
import HackerNewsIcon from '@site/src/components/HackerNewsIcon';
import styles from './styles.module.css';
import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css';

function HeroBanner() {
return (
Expand Down

0 comments on commit 7444301

Please sign in to comment.