Skip to content

Commit

Permalink
Merge pull request #6854 from TheThingsNetwork/dependabot/npm_and_yar…
Browse files Browse the repository at this point in the history
…n/prettier-3.2.4

dev: bump prettier from 2.8.8 to 3.2.4
  • Loading branch information
kschiffer authored Feb 5, 2024
2 parents c2284ac + 1ef0404 commit 1fee386
Show file tree
Hide file tree
Showing 21 changed files with 81 additions and 59 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/console/shared/collaborators/edit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ describe('Collaborators', () => {
entity === 'applications'
? applicationRights
: entity === 'gateways'
? gatewayRights
: organizationRights,
? gatewayRights
: organizationRights,
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ const generateCollaborator = (entity, type) => {
entity === 'applications'
? applicationRights
: entity === 'gateways'
? gatewayRights
: organizationRights,
? gatewayRights
: organizationRights,
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-jsdoc": "^48.0.4",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"file-loader": "^6.2.0",
"html-webpack-plugin": "^5.6.0",
Expand All @@ -61,7 +61,7 @@
"mkdirp": "^3.0.1",
"nib": "^1.2.0",
"pg": "^8.11.3",
"prettier": "^2.8.8",
"prettier": "^3.2.4",
"react-refresh": "^0.14.0",
"stylint": "^2.0.0",
"stylus": "^0.62.0",
Expand Down
8 changes: 4 additions & 4 deletions pkg/webui/components/form/field/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ const FormField = props => {
const describedBy = showError
? `${name}-field-error`
: showWarning
? `${name}-field-warning`
: showDescription
? `${name}-field-description`
: undefined
? `${name}-field-warning`
: showDescription
? `${name}-field-description`
: undefined

const fieldMessage = showError ? (
<div className={style.messages}>
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/components/modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ const Modal = props => {
buttonMessage !== undefined
? buttonMessage
: approval
? sharedMessages.approve
: sharedMessages.ok
? sharedMessages.approve
: sharedMessages.ok
let buttons = (
<div>
<Button
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/components/offline-status/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ const OfflineStatus = ({ showOfflineOnly, showWarnings, onlineStatus }) => {
const message = isOnline
? sharedMessages.online
: isChecking
? sharedMessages.connectionIssues
: sharedMessages.offline
? sharedMessages.connectionIssues
: sharedMessages.offline
const cls = classnames(style.status, {
[style.online]: isOnline,
[style.offline]: isOffline,
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/components/table/story/story.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class SortableExample extends React.Component {
order === 'asc'
? asc(a[orderBy], b[orderBy])
: order === 'desc'
? -asc(a[orderBy], b[orderBy])
: 0,
? -asc(a[orderBy], b[orderBy])
: 0,
),
}),
800,
Expand Down
8 changes: 4 additions & 4 deletions pkg/webui/components/toast/toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ const createToast = () => {
typeof message === 'string'
? message.length
: typeof message === 'object' && message.defaultMessage
? message.defaultMessage.length
: 0
? message.defaultMessage.length
: 0
if (title) {
messageLength +=
typeof title === 'string'
? title.length
: typeof title === 'object' && title.defaultMessage
? title.defaultMessage.length
: 0
? title.defaultMessage.length
: 0
}
// Calculate the reading time to use as `autoClose` duration.
autoClose = Math.min(12000, Math.max(5000, messageLength * 150))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ const TestForm = props => {
showTestError || showTestWarning
? JSON.stringify(testResult, null, 2)
: 'decoded_payload' in testResult && !('frm_payload' in testResult)
? formatMessage(m.emptyPayload)
: ''
? formatMessage(m.emptyPayload)
: ''
}
let infoIcon = 'info'
let infoMessage = m.noResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ const activationModeValueSetter = ({ setValues }, { value, value: { multicast }
multicast && isClassA
? undefined
: !multicast && supports_class_b === undefined
? false
: supports_class_b,
? false
: supports_class_b,
supports_class_c:
multicast && isClassA
? undefined
: !multicast && supports_class_c === undefined
? false
: supports_class_c,
? false
: supports_class_c,
// Reset provisioning data if activation mode changed.
...(values.supports_join !== value.supports_join ? provisioningInitialValues : {}),
// Skip JoinEUI check if the device is ABP/Multicast.
Expand Down
8 changes: 4 additions & 4 deletions pkg/webui/console/containers/device-onboarding-form/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export const getActivationMode = device =>
device.supports_join === true
? ACTIVATION_MODES.OTAA
: device.multicast === true
? ACTIVATION_MODES.MULTICAST
: device.supports_join === false && device.multicast === false
? ACTIVATION_MODES.ABP
: ACTIVATION_MODES.NONE
? ACTIVATION_MODES.MULTICAST
: device.supports_join === false && device.multicast === false
? ACTIVATION_MODES.ABP
: ACTIVATION_MODES.NONE

export const getLorawanVersion = device => device.lorawan_version || '1.1.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ const DeviceCard = props => {
const modeTitleLabel = device.supports_join
? sharedMessages.otaa
: device.multicast
? sharedMessages.multicast
: sharedMessages.abp
? sharedMessages.multicast
: sharedMessages.abp
const deviceClassTitleLabel = device.supports_class_c
? m.classC
: device.supports_class_b
? m.classB
: m.classA
? m.classB
: m.classA
const hasLinks = Boolean(product_url || datasheet_url)

return (
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/console/lib/location-to-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const createLocationObject = (location, key) => ({
key === 'user' || location?.source === 'SOURCE_REGISTRY'
? sharedMessages.locationMarkerDescriptionUser
: location.trusted === false
? sharedMessages.locationMarkerDescriptionUntrusted
: sharedMessages.locationMarkerDescriptionNonUser
? sharedMessages.locationMarkerDescriptionUntrusted
: sharedMessages.locationMarkerDescriptionNonUser
}
/>
<br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ const RoutingConfigurationView = () => {
isValidPolicy(defaultRoutingPolicy)
? 'all_networks'
: onlyTtn(routingPolicies) && !isValidPolicy(defaultRoutingPolicy)
? 'ttn'
: 'custom',
? 'ttn'
: 'custom',
_use_default_policy: isValidPolicy(defaultRoutingPolicy),
}
initialValues.policy = isValidPolicy(defaultRoutingPolicy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const IdentityServerForm = React.memo(props => {
device.join_server_address
? device.join_server_address
: jsConfig.enabled
? getHostnameFromUrl(jsConfig.base_url)
: '',
? getHostnameFromUrl(jsConfig.base_url)
: '',
)

const [error, setError] = React.useState('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ const NetworkServerForm = React.memo(props => {
const initialActivationMode = supports_join
? ACTIVATION_MODES.OTAA
: multicast
? ACTIVATION_MODES.MULTICAST
: ACTIVATION_MODES.ABP
? ACTIVATION_MODES.MULTICAST
: ACTIVATION_MODES.ABP

const initialValues = React.useMemo(
() =>
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/console/views/device-overview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ const DeviceInfo = ({ frequencyPlans, device, onExport }) => {
lorawanVersion < 100
? sharedMessages.appEUIJoinEUI
: lorawanVersion >= 104
? sharedMessages.joinEUI
: sharedMessages.appEUI
? sharedMessages.joinEUI
: sharedMessages.appEUI

activationInfoData.items.push(
{ key: joinEUI, value: ids.join_eui, type: 'byte', sensitive: false },
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/containers/collaborator-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ const CollaboratorForm = props => {
deleteDisabled
? sharedMessages.removeCollaboratorLast
: isCollaboratorCurrentUser
? sharedMessages.removeCollaboratorSelf
: sharedMessages.removeCollaborator
? sharedMessages.removeCollaboratorSelf
: sharedMessages.removeCollaborator
}
modalData={{
message: isCollaboratorCurrentUser
Expand Down
9 changes: 6 additions & 3 deletions pkg/webui/lib/components/date-time/relative.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ const RelativeTime = props => {
// Show the `just now` message for deltas shorter than the update interval.
if (absDelta < minInterval) {
setShowLessThan(true)
const timer = setTimeout(() => {
setShowLessThan(false)
}, (minInterval - absDelta) * 1000)
const timer = setTimeout(
() => {
setShowLessThan(false)
},
(minInterval - absDelta) * 1000,
)
return () => {
clearTimeout(timer)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/webui/lib/hooks/use-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const useRequest = requestAction => {
requestAction instanceof Array
? Promise.all(requestAction.map(req => dispatch(attachPromise(req))))
: typeof requestAction === 'function'
? requestAction(dispatch)
: dispatch(attachPromise(requestAction))
? requestAction(dispatch)
: dispatch(attachPromise(requestAction))

promise
.then(result => {
Expand Down
35 changes: 27 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,11 @@
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==

"@pkgr/core@^0.1.0":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31"
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==

"@pmmmwh/react-refresh-webpack-plugin@^0.5.11":
version "0.5.11"
resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.11.tgz#7c2268cedaa0644d677e8c4f377bc8fb304f714a"
Expand Down Expand Up @@ -5626,12 +5631,13 @@ eslint-plugin-prefer-arrow@^1.2.3:
resolved "https://registry.yarnpkg.com/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz#e7fbb3fa4cd84ff1015b9c51ad86550e55041041"
integrity sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==

eslint-plugin-prettier@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b"
integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==
eslint-plugin-prettier@^5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1"
integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==
dependencies:
prettier-linter-helpers "^1.0.0"
synckit "^0.8.6"

eslint-plugin-react-hooks@^1.7.0:
version "1.7.0"
Expand Down Expand Up @@ -9790,10 +9796,10 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@^2.8.8:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
prettier@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.4.tgz#4723cadeac2ce7c9227de758e5ff9b14e075f283"
integrity sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==

pretty-bytes@^5.6.0:
version "5.6.0"
Expand Down Expand Up @@ -11506,6 +11512,14 @@ synchronous-promise@^2.0.15:
resolved "https://registry.yarnpkg.com/synchronous-promise/-/synchronous-promise-2.0.15.tgz#07ca1822b9de0001f5ff73595f3d08c4f720eb8e"
integrity sha512-k8uzYIkIVwmT+TcglpdN50pS2y1BDcUnBPK9iJeGu0Pl1lOI8pD6wtzgw91Pjpe+RxtTncw32tLxs/R0yNL2Mg==

synckit@^0.8.6:
version "0.8.8"
resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7"
integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==
dependencies:
"@pkgr/core" "^0.1.0"
tslib "^2.6.2"

tapable@^0.1.8:
version "0.1.10"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.1.10.tgz#29c35707c2b70e50d07482b5d202e8ed446dafd4"
Expand Down Expand Up @@ -11739,6 +11753,11 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.0.tgz#b295854684dbda164e181d259a22cd779dcd7bc3"
integrity sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==

tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==

tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
Expand Down

0 comments on commit 1fee386

Please sign in to comment.