Skip to content

Commit

Permalink
style: import scss with new line
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed May 17, 2023
1 parent 16b2c7c commit 3090bab
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
"pattern": "@react-devui/**",
"group": "internal",
"position": "after"
},
{
"pattern": "*.scss",
"group": "index",
"patternOptions": { "matchBase": true },
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["type", "builtin"],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"build:icons": "ts-node -P ./tools/tsconfig.json ./tools/ui-icons.ts",
"build:vscode-extension": "nx build vscode-extension && cd dist/packages/vscode-extension && yarn install && vsce package --yarn",
"lint:affected": "nx affected --target=lint --parallel=7",
"lint:affected:fix": "nx affected --target=lint --parallel=7 --fix",
"lint:style": "stylelint **/*.{css,scss,html,md}",
"lint:style:fix": "yarn lint:style --fix",
"prepare": "husky install && ts-node -P ./tools/tsconfig.json ./tools/husky.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/platform/src/app/routes/dashboard/amap/AMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { DRadio } from '@react-devui/ui';

import { AppMap } from '../../../components';
import { AppRoute } from '../../../utils';
import styles from './AMap.module.scss';
import points from './points';

import styles from './AMap.module.scss';

export default AppRoute(() => {
const [mapTmp, setMapTmp] = useState('Marker');
const [infoWindow, setInfoWindow] = useImmer<{ visible: boolean; position?: [number, number] }>({ visible: false });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import { DCard } from '@react-devui/ui';

import { AppChart, AppRouteHeader } from '../../../components';
import { AppRoute } from '../../../utils';
import styles from './ECharts.module.scss';
import { barOptions, lineOptions, nightingaleOptions, pieOptions, scatterOptions, stackedBarOptions, stackedLineOptions } from './options';

import styles from './ECharts.module.scss';

export default AppRoute(() => {
const [options, setOptions] = useState<echarts.EChartsOption[]>([]);
const { t } = useTranslation();
Expand Down
1 change: 1 addition & 0 deletions packages/platform/src/app/routes/exception/Exception.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AppRoute } from '../../utils';
import { ReactComponent as S403 } from './403.svg';
import { ReactComponent as S404 } from './404.svg';
import { ReactComponent as S500 } from './500.svg';

import styles from './Exception.module.scss';

export default AppRoute(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/platform/src/app/routes/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { Outlet, useLocation } from 'react-router-dom';

import { getClassName } from '@react-devui/utils';

import styles from './Layout.module.scss';
import { AppHeader } from './header/Header';
import { AppSidebar } from './sidebar/Sidebar';

import styles from './Layout.module.scss';

export interface AppLayoutProps {
sidebar?: {
width?: number;
Expand Down
3 changes: 2 additions & 1 deletion packages/platform/src/app/routes/layout/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import { getClassName } from '@react-devui/utils';
import { AppLanguage } from '../../../components';
import { APP_NAME } from '../../../config/other';
import { STORAGE_KEY } from '../../../config/storage';
import styles from './Header.module.scss';
import { AppNotification } from './notification/Notification';
import { AppUser } from './user/User';

import styles from './Header.module.scss';

export interface AppHeaderProps {
sidebarWidth: number;
menuMode: 'vertical' | 'icon';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { getClassName } from '@react-devui/utils';

import { AppList } from '../../../../components';
import { useNotificationState } from '../../../../core';

import styles from './Notification.module.scss';

export function AppNotification(props: React.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DDrawer, DMenu } from '@react-devui/ui';
import { getClassName } from '@react-devui/utils';

import { useMenu } from '../../../core';

import styles from './Sidebar.module.scss';

export interface AppSidebarProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useHttp } from '../../../core';
import { useAPI, useQueryParams } from '../../../hooks';
import { AppRoute, DialogService } from '../../../utils';
import { AppDeviceModal } from './DeviceModal';

import styles from './StandardTable.module.scss';

export type DeviceData = DeviceDoc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useHttp } from '../../../../core';
import { useAPI } from '../../../../hooks';
import { AppRoute, DialogService } from '../../../../utils';
import { AppDeviceModal } from '../DeviceModal';

import styles from './Detail.module.scss';

export default AppRoute(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/platform/src/app/routes/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import { LOGIN_PATH } from '../../config/other';
import { APP_NAME } from '../../config/other';
import { TOKEN, useHttp, useInit } from '../../core';
import { AppRoute, NotificationService } from '../../utils';
import styles from './Login.module.scss';
import { BASE64_DATA } from './base64.out';

import styles from './Login.module.scss';

export default AppRoute(() => {
const { t } = useTranslation();
const http = useHttp();
Expand Down
1 change: 1 addition & 0 deletions packages/platform/src/app/routes/test/acl/ACL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DAlert, DButton, DCard, DTable, DTag } from '@react-devui/ui';
import { AppRouteHeader } from '../../../components';
import { useACL } from '../../../core';
import { AppRoute } from '../../../utils';

import styles from './ACL.module.scss';

export default AppRoute(() => {
Expand Down
1 change: 1 addition & 0 deletions packages/platform/src/app/routes/test/http/Http.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DButton, DCard } from '@react-devui/ui';
import { AppRouteHeader } from '../../../components';
import { useHttp } from '../../../core';
import { AppRoute } from '../../../utils';

import styles from './Http.module.scss';

export default AppRoute(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import packageJsonFn from './files/codesandbox/package.json';
import tsconfigJson from './files/codesandbox/tsconfig.json';
import indexHtml from './files/index.html';
import indexTsx from './files/index.tsx';

import stylesScss from './files/styles.scss';

export function openCodeSandbox(name: string, tsxSource: string, scssSource?: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import indexHtml from './files/index.html';
import indexTsx from './files/index.tsx';
import packageJsonFn from './files/stackblitz/package.json';
import tsconfigJson from './files/stackblitz/tsconfig.json';

import stylesScss from './files/styles.scss';

export function openStackBlitz(name: string, tsxSource: string, scssSource?: string) {
Expand Down

0 comments on commit 3090bab

Please sign in to comment.