mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
misc linting
This commit is contained in:
parent
cb04a7a786
commit
e8854727e9
9 changed files with 32 additions and 33 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
|
||||
import { App } from './App';
|
||||
|
||||
it('renders without crashing', () => {
|
||||
const div = document.createElement('div');
|
||||
|
|
|
|||
|
|
@ -5,24 +5,21 @@ import { AllListsTable } from './modules';
|
|||
|
||||
const { Header, Content, Footer } = Layout;
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<Layout>
|
||||
<Header>
|
||||
<Logo />
|
||||
<Menu theme="dark" mode="horizontal" style={{ lineHeight: '64px' }} />
|
||||
</Header>
|
||||
<Content>
|
||||
<div style={{ background: '#fff', paddingLeft: 12, paddingTop: 12, paddingRight: 12, minHeight: 280 }}>
|
||||
<AllListsTable />
|
||||
</div>
|
||||
</Content>
|
||||
<Footer style={{ textAlign: 'center' }}>
|
||||
<CopyrightAuthor /> | <Community /> | <GitHub /> | <Api /> | <Donate />
|
||||
</Footer>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
export const App: React.FC = () =>
|
||||
<Layout>
|
||||
<Header>
|
||||
<Logo />
|
||||
<Menu theme="dark" mode="horizontal" style={{ lineHeight: '64px' }} />
|
||||
</Header>
|
||||
<Content>
|
||||
<div style={{ background: '#fff', paddingLeft: 12, paddingTop: 12, paddingRight: 12, minHeight: 280 }}>
|
||||
<AllListsTable />
|
||||
</div>
|
||||
</Content>
|
||||
<Footer style={{ textAlign: 'center' }}>
|
||||
<CopyrightAuthor /> | <Community /> | <GitHub /> | <Api /> | <Donate />
|
||||
</Footer>
|
||||
</Layout>;
|
||||
|
||||
const Logo = () =>
|
||||
<img src="logo_filterlists.png"
|
||||
|
|
@ -65,6 +62,4 @@ const Donate = () =>
|
|||
title="Donate to FilterLists with Beerpay"
|
||||
target="_blank" rel="noopener noreferrer">
|
||||
Donate
|
||||
</a>;
|
||||
|
||||
export default App;
|
||||
</a>;
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import './index.css';
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
|
||||
import { App } from './App';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
|
|
@ -113,8 +113,8 @@ export class AllListsTable extends React.Component<{}, State> {
|
|||
);
|
||||
}
|
||||
|
||||
private tagSorter = (a: number[], b: number[], tags: Tag[]): number => {
|
||||
return a && a.length
|
||||
private tagSorter = (a: number[], b: number[], tags: Tag[]): number =>
|
||||
a && a.length
|
||||
? b && b.length
|
||||
? a.length === b.length
|
||||
? tags.filter((t: Tag) => a.indexOf(t.id) > -1).map((t: Tag) => t.name).join().toLowerCase() > tags.filter((t: Tag) => b.indexOf(t.id) > -1).map((t: Tag) => t.name).join().toLowerCase()
|
||||
|
|
@ -125,7 +125,6 @@ export class AllListsTable extends React.Component<{}, State> {
|
|||
: 1
|
||||
: -1
|
||||
: 1;
|
||||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('resize', this.updatePageSize);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import { AllListsTable } from './AllListsTable'
|
||||
import { AllListsTable } from './AllListsTable';
|
||||
|
||||
export { AllListsTable }
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
import { AllListsTable } from './allListsTable'
|
||||
import { AllListsTable } from './allListsTable';
|
||||
|
||||
export { AllListsTable }
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { Button, Dropdown, Menu } from 'antd';
|
||||
import { ButtonProps, ButtonType } from "antd/lib/button";
|
||||
import { ButtonProps, ButtonType } from 'antd/lib/button';
|
||||
import React from 'react';
|
||||
|
||||
import styles from './SubscribeButton.module.css';
|
||||
|
||||
//TODO: import DropdownButtonType from antd rather than redefining if they export the type
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Tag } from 'antd';
|
||||
import React from 'react';
|
||||
|
||||
import styles from './TagCloud.module.css';
|
||||
|
||||
interface TagData {
|
||||
|
|
@ -8,7 +9,7 @@ interface TagData {
|
|||
};
|
||||
|
||||
interface Props {
|
||||
tags?: TagData[]
|
||||
tags: TagData[]
|
||||
};
|
||||
|
||||
export const TagCloud = (props: Props): JSX.Element | null => {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import { nameof } from './nameof'
|
||||
import { nameof } from './nameof';
|
||||
|
||||
export { nameof }
|
||||
Loading…
Reference in a new issue