Skip to content

Commit

Permalink
fix lint errors, client do not fail build if sentry not available
Browse files Browse the repository at this point in the history
  • Loading branch information
tdjsnelling committed Feb 9, 2023
1 parent 9b7d144 commit eb88980
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

"rules": {
"object-curly-spacing": ["error", "always"],
"react/prop-types": 0
"react/prop-types": 0,
"linebreak-style": "off"
},
"env": {
"es6": true,
Expand Down
1 change: 0 additions & 1 deletion client/components/Box.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import styled from 'styled-components'
import {
space,
Expand Down
1 change: 1 addition & 0 deletions client/components/Button.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react'
import styled from 'styled-components'
import { layout, space, display, flexbox, variant } from 'styled-system'
import css from '@styled-system/css'
Expand Down
6 changes: 5 additions & 1 deletion client/components/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,11 @@ const Navigation = ({ isMobile, menuIsOpen, setMenuIsOpen }) => {
>
<Text color="grey" fontSize={0}>
Powered by{' '}
<a href="https://github.com/tdjsnelling/sqtracker" target="_blank">
<a
href="https://github.com/tdjsnelling/sqtracker"
target="_blank"
rel="noreferrer"
>
■ sqtracker
</a>{' '}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion client/components/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const StyledSelect = styled.select(
typography
)

const Select = ({ label, rows, ...rest }) => {
const Select = ({ label, ...rest }) => {
return (
<WrapLabel label={label}>
<Box position="relative" display="inline-block">
Expand Down
3 changes: 3 additions & 0 deletions client/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const nextConfig = {

const sentryWebpackPluginOptions = {
silent: true,
errorHandler: (err, invokeErr, compilation) => {
compilation.warnings.push('Sentry CLI Plugin: ' + err.message)
},
}

module.exports = withSentryConfig(nextConfig, sentryWebpackPluginOptions)
6 changes: 5 additions & 1 deletion client/pages/_error.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const ErrorPage = () => (
</Text>
<Text>
If the error persists, please{' '}
<a href="https://github.com/tdjsnelling/sqtracker/issues" target="_blank">
<a
href="https://github.com/tdjsnelling/sqtracker/issues"
target="_blank"
rel="noreferrer"
>
report it
</a>
. For now,{' '}
Expand Down
1 change: 1 addition & 0 deletions client/pages/torrent/[infoHash].js
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ const Torrent = ({ token, torrent, userId, userRole, uid }) => {
<Box display="flex" flexWrap="wrap" ml={-1} mt={-1}>
{torrent.tags.map((tag) => (
<Box
key={`tag-${tag}`}
bg="sidebar"
border="1px solid"
borderColor="border"
Expand Down
1 change: 1 addition & 0 deletions client/pages/user/[username].js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ const User = ({ token, user, userRole }) => {
<Box>
{user.comments.map((comment) => (
<Comment
key={`comment-${comment._id}`}
comment={{ ...comment, user: { username: user.username } }}
/>
))}
Expand Down

0 comments on commit eb88980

Please sign in to comment.