mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 01:23:53 -07:00
Add typescript
(cherry picked from commit 910511dba03196f14bb238c8e15f060c12183c08)
This commit is contained in:
parent
f38f00c64e
commit
eacaf9be32
17 changed files with 635 additions and 38 deletions
|
@ -4,7 +4,15 @@ import Alert from 'Components/Alert';
|
|||
import { kinds } from 'Helpers/Props';
|
||||
import styles from './Form.css';
|
||||
|
||||
function Form({ children, validationErrors, validationWarnings, ...otherProps }) {
|
||||
function Form(props) {
|
||||
const {
|
||||
children,
|
||||
validationErrors,
|
||||
validationWarnings,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@ SortMenuItem.propTypes = {
|
|||
name: PropTypes.string,
|
||||
sortKey: PropTypes.string,
|
||||
sortDirection: PropTypes.oneOf(sortDirections.all),
|
||||
children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ function ViewMenuItem(props) {
|
|||
|
||||
ViewMenuItem.propTypes = {
|
||||
name: PropTypes.string,
|
||||
selectedView: PropTypes.string.isRequired
|
||||
selectedView: PropTypes.string.isRequired,
|
||||
children: PropTypes.oneOfType([PropTypes.string, PropTypes.element]).isRequired,
|
||||
onPress: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default ViewMenuItem;
|
||||
|
|
|
@ -173,7 +173,7 @@ OverlayScroller.defaultProps = {
|
|||
scrollDirection: scrollDirections.VERTICAL,
|
||||
autoHide: false,
|
||||
autoScroll: true,
|
||||
registerScroller: () => {}
|
||||
registerScroller: () => { /* no-op */ }
|
||||
};
|
||||
|
||||
export default OverlayScroller;
|
||||
|
|
|
@ -89,7 +89,7 @@ Scroller.defaultProps = {
|
|||
scrollDirection: scrollDirections.VERTICAL,
|
||||
autoFocus: true,
|
||||
autoScroll: true,
|
||||
registerScroller: () => {}
|
||||
registerScroller: () => { /* no-op */ }
|
||||
};
|
||||
|
||||
export default Scroller;
|
||||
|
|
|
@ -13,6 +13,7 @@ export function virtualTableSelectCellRenderer(cellProps) {
|
|||
} = cellProps;
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
<VirtualTableSelectCell
|
||||
key={cellKey}
|
||||
id={rowData.name}
|
||||
|
|
|
@ -13,6 +13,8 @@ export function headerRenderer(headerProps) {
|
|||
} = headerProps;
|
||||
|
||||
return (
|
||||
|
||||
// eslint-disable-next-line no-use-before-define
|
||||
<VirtualTableHeaderCell
|
||||
name={dataKey}
|
||||
{...columnData}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* eslint no-empty-function: 0 no-extend-native: 0 */
|
||||
/* eslint no-empty-function: 0, no-extend-native: 0, "@typescript-eslint/no-empty-function": 0 */
|
||||
|
||||
window.console = window.console || {};
|
||||
window.console.log = window.console.log || function() {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue