You've already forked Sonarr
mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-11-06 09:19:38 +02:00
Add typescript
This commit is contained in:
committed by
Mark McDowall
parent
27cc551980
commit
910511dba0
@@ -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() {};
|
||||
|
||||
Reference in New Issue
Block a user