mirror of
https://github.com/SomboChea/ui
synced 2026-01-18 17:16:00 +07:00
feat(eslint-config): add order rule in import
* refactor: added eslint-plugin-import * refactor: disable some rules for muiComponents * fix: fixed import
This commit is contained in:
committed by
Sergio Hg
parent
950f6defca
commit
ae73772a37
@@ -1,13 +1,13 @@
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { MemoryRouter } from 'react-router';
|
||||
import { render, cleanup } from '@testing-library/react';
|
||||
|
||||
import { DetailContext, DetailContextProps } from '../../pages/Version';
|
||||
|
||||
import Versions, { LABEL_CURRENT_TAGS, LABEL_VERSION_HISTORY } from './Versions';
|
||||
import data from './__partials__/data.json';
|
||||
|
||||
import { render, cleanup } from '@testing-library/react';
|
||||
|
||||
const detailContextValue: Partial<DetailContextProps> = {
|
||||
packageName: 'foo',
|
||||
packageMeta: data,
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import React, { useContext } from 'react';
|
||||
|
||||
import { DetailContext } from '../../pages/Version';
|
||||
import { DIST_TAGS } from '../../../lib/constants';
|
||||
|
||||
import { Heading } from './styles';
|
||||
|
||||
import VersionsTagList from './VersionsTagList';
|
||||
import VersionsHistoryList from './VersionsHistoryList';
|
||||
|
||||
import { DIST_TAGS } from '../../../lib/constants';
|
||||
|
||||
export const NOT_AVAILABLE = 'Not available';
|
||||
export const LABEL_CURRENT_TAGS = 'Current Tags';
|
||||
export const LABEL_VERSION_HISTORY = 'Version History';
|
||||
|
||||
@@ -3,11 +3,12 @@ import List from '@material-ui/core/List';
|
||||
import Link from '@material-ui/core/Link';
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import { Link as RouterLink } from 'react-router-dom';
|
||||
import { Spacer, ListItemText } from './styles';
|
||||
|
||||
import { Versions, Time } from '../../../types/packageMeta';
|
||||
import { formatDateDistance } from '../../utils/package';
|
||||
|
||||
import { Spacer, ListItemText } from './styles';
|
||||
|
||||
export const NOT_AVAILABLE = 'Not available';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import List from '@material-ui/core/List';
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import { Spacer, ListItemText } from './styles';
|
||||
|
||||
import { DistTags } from '../../../types/packageMeta';
|
||||
|
||||
import { Spacer, ListItemText } from './styles';
|
||||
|
||||
interface Props {
|
||||
tags: DistTags;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import styled from 'react-emotion';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import { default as MuiListItemText } from '@material-ui/core/ListItemText';
|
||||
|
||||
import { fontWeight } from '../../utils/styles/sizes';
|
||||
|
||||
export const Heading = styled(Typography)({
|
||||
|
||||
Reference in New Issue
Block a user