diff --git a/.eslintrc b/.eslintrc index 35d92042471a480ef2bfb832d34104b7531dd648..2dc55b0ec53755829dac743c83ed5d776d174676 100644 --- a/.eslintrc +++ b/.eslintrc @@ -30,6 +30,13 @@ }], "react/jsx-props-no-spreading": "off", "arrow-parens": "off", - "import/no-anonymous-default-export": "off" + "import/no-anonymous-default-export": "off", + "max-len": ["error", { + "code": 120, + "ignoreComments": true, + "ignoreStrings": true, + "ignoreTemplateLiterals": true, + "ignoreRegExpLiterals": true + }] } } diff --git a/src/components/AnnotationsOverlay.js b/src/components/AnnotationsOverlay.js index dad600e2010ff243ed1c36d5e187a9bfb1761fd9..eb527f1d9f7a48679fcf88b544166120426bf968 100644 --- a/src/components/AnnotationsOverlay.js +++ b/src/components/AnnotationsOverlay.js @@ -423,7 +423,7 @@ AnnotationsOverlay.defaultProps = { }; AnnotationsOverlay.propTypes = { - annotations: PropTypes.arrayOf(PropTypes.object), + annotations: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types canvasWorld: PropTypes.instanceOf(CanvasWorld).isRequired, deselectAnnotation: PropTypes.func, drawAnnotations: PropTypes.bool, @@ -432,7 +432,7 @@ AnnotationsOverlay.propTypes = { hoverAnnotation: PropTypes.func, hoveredAnnotationIds: PropTypes.arrayOf(PropTypes.string), palette: PropTypes.object, // eslint-disable-line react/forbid-prop-types - searchAnnotations: PropTypes.arrayOf(PropTypes.object), + searchAnnotations: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types selectAnnotation: PropTypes.func, selectedAnnotationId: PropTypes.string, viewer: PropTypes.object, // eslint-disable-line react/forbid-prop-types diff --git a/src/components/AudioViewer.js b/src/components/AudioViewer.js index fd63c4053fb73af660192e406cc6ac3b7f71db38..15d51c3d1401e1e63576fbf9e29c9cc86e362e69 100644 --- a/src/components/AudioViewer.js +++ b/src/components/AudioViewer.js @@ -32,8 +32,8 @@ export class AudioViewer extends Component { AudioViewer.propTypes = { audioOptions: PropTypes.object, // eslint-disable-line react/forbid-prop-types - audioResources: PropTypes.arrayOf(PropTypes.object), - captions: PropTypes.arrayOf(PropTypes.object), + audioResources: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types + captions: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types classes: PropTypes.objectOf(PropTypes.string).isRequired, }; diff --git a/src/components/OpenSeadragonViewer.js b/src/components/OpenSeadragonViewer.js index 7c3244bf072bfc8ebead0d147e3939a5f8ec3ab3..d6353a624e52c31d715a76b1541b4f43e734c8ce 100644 --- a/src/components/OpenSeadragonViewer.js +++ b/src/components/OpenSeadragonViewer.js @@ -383,7 +383,7 @@ OpenSeadragonViewer.propTypes = { children: PropTypes.node, classes: PropTypes.objectOf(PropTypes.string).isRequired, drawAnnotations: PropTypes.bool, - infoResponses: PropTypes.arrayOf(PropTypes.object), + infoResponses: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types label: PropTypes.string, nonTiledImages: PropTypes.array, // eslint-disable-line react/forbid-prop-types osdConfig: PropTypes.object, // eslint-disable-line react/forbid-prop-types diff --git a/src/components/PrimaryWindow.js b/src/components/PrimaryWindow.js index ee5d4e672c07edeaade90ed46aecd6058bca9661..552681b8afaa228012d7332d67fb55a02422a2f0 100644 --- a/src/components/PrimaryWindow.js +++ b/src/components/PrimaryWindow.js @@ -92,13 +92,13 @@ export class PrimaryWindow extends Component { } PrimaryWindow.propTypes = { - audioResources: PropTypes.arrayOf(PropTypes.object), + audioResources: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types children: PropTypes.node, classes: PropTypes.objectOf(PropTypes.string).isRequired, isCollection: PropTypes.bool, isCollectionDialogVisible: PropTypes.bool, isFetching: PropTypes.bool, - videoResources: PropTypes.arrayOf(PropTypes.object), + videoResources: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types view: PropTypes.string, windowId: PropTypes.string.isRequired, }; diff --git a/src/components/SearchPanelNavigation.js b/src/components/SearchPanelNavigation.js index 59f9eb65b79d41e5e935791658c0ab5ab0106fcc..355a0787b4a29d3b171eec044dc8eab8eaf9d05e 100644 --- a/src/components/SearchPanelNavigation.js +++ b/src/components/SearchPanelNavigation.js @@ -84,7 +84,7 @@ SearchPanelNavigation.propTypes = { classes: PropTypes.objectOf(PropTypes.string), direction: PropTypes.string.isRequired, numTotal: PropTypes.number, - searchHits: PropTypes.arrayOf(PropTypes.object), + searchHits: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types searchService: PropTypes.shape({ id: PropTypes.string, }).isRequired, diff --git a/src/components/SearchResults.js b/src/components/SearchResults.js index 7c5ca415b3d3d993451d6b3c8c0044358c5f7c4f..bb75972a80306f2dc0470dfbe0ba7cca10a5405e 100644 --- a/src/components/SearchResults.js +++ b/src/components/SearchResults.js @@ -149,8 +149,8 @@ SearchResults.propTypes = { isFetching: PropTypes.bool, nextSearch: PropTypes.string, query: PropTypes.string, - searchAnnotations: PropTypes.arrayOf(PropTypes.object), - searchHits: PropTypes.arrayOf(PropTypes.object), + searchAnnotations: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types + searchHits: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types searchNumTotal: PropTypes.number, t: PropTypes.func, windowId: PropTypes.string.isRequired, // eslint-disable-line react/no-unused-prop-types diff --git a/src/components/VideoViewer.js b/src/components/VideoViewer.js index ebcc6ff94d79442773201dceb34da32247ab5072..bb1d0327083448f793ad48026911ccc53019a580 100644 --- a/src/components/VideoViewer.js +++ b/src/components/VideoViewer.js @@ -30,10 +30,10 @@ export class VideoViewer extends Component { } VideoViewer.propTypes = { - captions: PropTypes.arrayOf(PropTypes.object), + captions: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types classes: PropTypes.objectOf(PropTypes.string).isRequired, videoOptions: PropTypes.object, // eslint-disable-line react/forbid-prop-types - videoResources: PropTypes.arrayOf(PropTypes.object), + videoResources: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types }; VideoViewer.defaultProps = { diff --git a/src/components/WindowSideBarCanvasPanel.js b/src/components/WindowSideBarCanvasPanel.js index abd76e08f454494c84c583d824e724ff22cf1080..9d4e988f7958801e75972ce91316c9807a328986 100644 --- a/src/components/WindowSideBarCanvasPanel.js +++ b/src/components/WindowSideBarCanvasPanel.js @@ -162,7 +162,7 @@ WindowSideBarCanvasPanel.propTypes = { collection: PropTypes.object, // eslint-disable-line react/forbid-prop-types id: PropTypes.string.isRequired, sequenceId: PropTypes.string, - sequences: PropTypes.arrayOf(PropTypes.object), + sequences: PropTypes.arrayOf(PropTypes.object), // eslint-disable-line react/forbid-prop-types showMultipart: PropTypes.func.isRequired, showToc: PropTypes.bool, t: PropTypes.func.isRequired, diff --git a/src/components/WorkspaceAdd.js b/src/components/WorkspaceAdd.js index 696038d3b07fec4144f26e03cce0f38bc8333cb3..f1676e47a9ebe1116ae7dbf23cce29538ba3b7d2 100644 --- a/src/components/WorkspaceAdd.js +++ b/src/components/WorkspaceAdd.js @@ -179,7 +179,10 @@ export class WorkspaceAdd extends React.Component { WorkspaceAdd.propTypes = { addResource: PropTypes.func, - catalog: PropTypes.arrayOf(PropTypes.object), + catalog: PropTypes.arrayOf(PropTypes.shape({ + manifestId: PropTypes.string.isRequired, + provider: PropTypes.string, + })), classes: PropTypes.objectOf(PropTypes.string), setWorkspaceAddVisibility: PropTypes.func.isRequired, t: PropTypes.func,