feat: forced file naming format (#2270)

This commit is contained in:
Himself65
2023-05-09 06:37:07 +08:00
committed by GitHub
parent 95bc5cac49
commit 4f99ad2db4
132 changed files with 208 additions and 100 deletions

View File

@@ -10,7 +10,7 @@ import debugLocal from 'next-debug-local';
import { fileURLToPath } from 'url';
import { blockSuiteFeatureFlags, buildFlags } from './preset.config.mjs';
import { getCommitHash, getGitVersion } from './scripts/gitInfo.mjs';
import { getCommitHash, getGitVersion } from './scripts/git-info.mjs';
const require = createRequire(import.meta.url);
const { createVanillaExtractPlugin } = require('@vanilla-extract/next-plugin');

View File

@@ -67,6 +67,7 @@
"dotenv": "^16.0.3",
"eslint": "^8.40.0",
"eslint-config-next": "^13.4.1",
"eslint-plugin-unicorn": "^47.0.0",
"next": "^13.4.1",
"next-debug-local": "^0.1.5",
"next-router-mock": "^0.9.3",

View File

@@ -18,7 +18,7 @@ import {
StyledPinboard,
StyledSearchContainer,
} from '../styles';
import { SearchContent } from './SearchContent';
import { SearchContent } from './search-content';
export interface PinboardMenuProps extends PureMenuProps {
metas: PageMeta[];

View File

@@ -1,7 +1,7 @@
import { PlusIcon } from '@blocksuite/icons';
import { StyledOperationButton } from '../styles';
import type { OperationButtonProps } from './OperationButton';
import type { OperationButtonProps } from './operation-button';
export const AddButton = ({
onAdd,

View File

@@ -14,9 +14,9 @@ import { useMemo, useState } from 'react';
import { workspacePreferredModeAtom } from '../../../../atoms';
import type { PinboardNode } from '../../../../hooks/use-pinboard-data';
import { StyledCollapsedButton, StyledPinboard } from '../styles';
import { AddButton } from './AddButton';
import EmptyItem from './EmptyItem';
import { OperationButton } from './OperationButton';
import { AddButton } from './add-button';
import EmptyItem from './empty-item';
import { OperationButton } from './operation-button';
const getIcon = (type: 'root' | 'edgeless' | 'page') => {
switch (type) {

View File

@@ -28,7 +28,7 @@ import {
StyledHorizontalDivider,
StyledHorizontalDividerContainer,
} from '../styles';
import { LanguageMenu } from './LanguageMenu';
import { LanguageMenu } from './language-menu';
const CommonMenu = () => {
const content = (
<div

View File

@@ -16,12 +16,12 @@ import {
import { useCurrentMode } from '../../../hooks/current/use-current-mode';
import type { AffineOfficialWorkspace } from '../../../shared';
import { EditorOptionMenu } from './header-right-items/EditorOptionMenu';
import EditPage from './header-right-items/EditPage';
import { HeaderShareMenu } from './header-right-items/ShareMenu';
import SyncUser from './header-right-items/SyncUser';
import TrashButtonGroup from './header-right-items/TrashButtonGroup';
import UserAvatar from './header-right-items/UserAvatar';
import EditPage from './header-right-items/edit-page';
import { EditorOptionMenu } from './header-right-items/editor-option-menu';
import { HeaderShareMenu } from './header-right-items/share-menu';
import SyncUser from './header-right-items/sync-user';
import TrashButtonGroup from './header-right-items/trash-button-group';
import UserAvatar from './header-right-items/user-avatar';
import {
StyledBrowserWarning,
StyledCloseButton,

View File

@@ -8,7 +8,7 @@ import { lazy, Suspense, useState } from 'react';
import { openOnboardingModalAtom } from '../../../atoms';
import { useCurrentMode } from '../../../hooks/current/use-current-mode';
import { ShortcutsModal } from '../shortcuts-modal';
import { ContactIcon, HelpIcon, KeyboardIcon } from './Icons';
import { ContactIcon, HelpIcon, KeyboardIcon } from './icons';
import {
StyledAnimateWrapper,
StyledIconWrapper,

View File

@@ -1,3 +1,3 @@
import { Loading } from './PageLoading';
export * from './PageLoading';
import { Loading } from './page-loading';
export * from './page-loading';
export default Loading;

View File

@@ -14,10 +14,10 @@ import {
} from 'react';
import type { BlockSuiteWorkspace } from '../../../shared';
import { Footer } from './Footer';
import { PublishedResults } from './PublishedResults';
import { Results } from './Results';
import { SearchInput } from './SearchInput';
import { Footer } from './footer';
import { PublishedResults } from './published-results';
import { Results } from './results';
import { SearchInput } from './search-input';
import {
StyledContent,
StyledModalDivider,

View File

@@ -13,7 +13,7 @@ import {
useWindowsKeyboardShortcuts,
useWinMarkdownShortcuts,
} from './config';
import { KeyboardIcon } from './Icons';
import { KeyboardIcon } from './icons';
import {
StyledListItem,
StyledModalHeader,

View File

@@ -1 +1 @@
export * from './WorkspaceSelector';
export * from './workspace-selector';

View File

@@ -36,7 +36,7 @@ import { useSyncRouterWithCurrentPageId } from '../hooks/use-sync-router-with-cu
import { useSyncRouterWithCurrentWorkspaceId } from '../hooks/use-sync-router-with-current-workspace-id';
import { useWorkspaces } from '../hooks/use-workspaces';
import { WorkspacePlugins } from '../plugins';
import { ModalProvider } from '../providers/ModalProvider';
import { ModalProvider } from '../providers/modal-provider';
import { pathGenerator, publicPathGenerator } from '../shared';
import {
MainContainer,

View File

@@ -17,7 +17,7 @@ import { AffineErrorBoundary } from '../components/affine/affine-error-eoundary'
import { ProviderComposer } from '../components/provider-composer';
import { PageLoading } from '../components/pure/loading';
import { MessageCenter } from '../components/pure/message-center';
import { ThemeProvider } from '../providers/ThemeProvider';
import { ThemeProvider } from '../providers/theme-provider';
import type { NextPageWithLayout } from '../shared';
import createEmotionCache from '../utils/create-emotion-cache';

View File

@@ -6,7 +6,7 @@ import { StyledPage, StyledWrapper } from '../../layouts/styles';
import type { NextPageWithLayout } from '../../shared';
const Editor = lazy(() =>
import('../../components/__debug__/client/Editor').then(module => ({
import('../../components/__debug__/client/editor').then(module => ({
default: module.default,
}))
);

View File

@@ -10,7 +10,7 @@ const config: SWRConfiguration = {
fetcher,
};
export const AffineSWRConfigProvider = memo<React.PropsWithChildren>(
export const AffineSwrConfigProvider = memo<React.PropsWithChildren>(
function AffineSWRConfigProvider({ children }) {
return <SWRConfig value={config}>{children}</SWRConfig>;
}

View File

@@ -40,7 +40,7 @@ const TmpDisableAffineCloudModal = lazy(() =>
)
);
const OnboardingModalAtom = lazy(() =>
import('../components/pure/OnboardingModal').then(module => ({
import('../components/pure/onboarding-modal').then(module => ({
default: module.OnboardingModal,
}))
);