Skip to content

Commit 00549d5

Browse files
committed
Fix linting errors
1 parent 30b5e86 commit 00549d5

37 files changed

Lines changed: 89 additions & 88 deletions

src/database/domains.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Domain from '../models/Domain.js'
2-
import sortByProp from '../utils/sortByProp.js'
2+
import sortByProperty from '../utils/sortByProperty.js'
33

44
const response = (entry) => ({
55
id: entry.id,
@@ -22,7 +22,7 @@ export const add = async (data) => {
2222

2323
export const all = async () => {
2424
const enhance = (entries) => {
25-
return entries.map(response).toSorted(sortByProp('title'))
25+
return entries.map(response).toSorted(sortByProperty('title'))
2626
}
2727

2828
return enhance(await Domain.find({}))

src/database/events.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Event from '../models/Event.js'
2-
import sortByProp from '../utils/sortByProp.js'
2+
import sortByProperty from '../utils/sortByProperty.js'
33

44
const response = (entry) => ({
55
id: entry.id,
@@ -19,7 +19,7 @@ export const add = async (data) => {
1919

2020
export const all = async () => {
2121
const enhance = (entries) => {
22-
return entries.map(response).toSorted(sortByProp('title'))
22+
return entries.map(response).toSorted(sortByProperty('title'))
2323
}
2424

2525
return enhance(await Event.find({}))

src/database/permanentTokens.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import PermanentToken from '../models/PermanentToken.js'
2-
import sortByProp from '../utils/sortByProp.js'
2+
import sortByProperty from '../utils/sortByProperty.js'
33

44
const response = (entry) => ({
55
id: entry.id,
@@ -22,7 +22,7 @@ export const add = async (data) => {
2222

2323
export const all = async () => {
2424
const enhance = (entries) => {
25-
return entries.map(response).toSorted(sortByProp('title'))
25+
return entries.map(response).toSorted(sortByProperty('title'))
2626
}
2727

2828
return enhance(await PermanentToken.find({}))

src/ui/scripts/api/links/createAuthLink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { SetContextLink } from '@apollo/client/link/context'
33
import { get as getToken } from '../../hooks/useToken.js'
44

55
export default () => {
6-
return new SetContextLink((prevContext) => {
6+
return new SetContextLink((previousContext) => {
77
const token = getToken()
88

99
return {
1010
headers: {
11-
...prevContext.headers,
11+
...previousContext.headers,
1212
Authorization: `Bearer ${token}`,
1313
},
1414
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import sortByProp from '../../../../utils/sortByProp.js'
1+
import sortByProperty from '../../../../utils/sortByProperty.js'
22

3-
export default (newRef, prop) =>
3+
export default (newRef, property) =>
44
(existingRefs = [], { readField }) => {
5-
const toObj = (ref) => ({ ref, [prop]: readField(prop, ref) })
5+
const toObj = (ref) => ({ ref, [property]: readField(property, ref) })
66
const toRef = (obj) => obj.ref
77

8-
return [...existingRefs, newRef].map(toObj).toSorted(sortByProp(prop)).map(toRef)
8+
return [...existingRefs, newRef].map(toObj).toSorted(sortByProperty(property)).map(toRef)
99
}

src/ui/scripts/components/Context.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ const Context = (props) => {
100100
return h(Button, {
101101
key: item.label + index,
102102
...item,
103-
onClick: (e) => {
104-
item.onClick(e)
105-
props.onItemClick(e)
103+
onClick: (event) => {
104+
item.onClick(event)
105+
props.onItemClick(event)
106106
},
107107
})
108108

src/ui/scripts/components/Dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const Dashboard = (props) => {
5555
useHotkey('d', () => props.setRoute('/insights/durations'))
5656
useHotkey('e', () => props.setRoute('/insights/events'))
5757
useHotkey('s', () => props.setRoute('/settings'))
58-
useHotkey('0,1,2,3,4,5,6,7,8,9', (e, { key }) => gotoDomainWhenDefined(domains.value, props.setRoute, key), {}, [
58+
useHotkey('0,1,2,3,4,5,6,7,8,9', (event, { key }) => gotoDomainWhenDefined(domains.value, props.setRoute, key), {}, [
5959
domains.value,
6060
])
6161

src/ui/scripts/components/Input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import PropTypes from 'prop-types'
22
import { createElement as h, useEffect, useRef } from 'react'
33

4-
const copyInput = (e) => {
5-
e.target.select()
4+
const copyInput = (event) => {
5+
event.target.select()
66
document.execCommand('copy')
77
}
88

src/ui/scripts/components/Textarea.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import PropTypes from 'prop-types'
22
import { createElement as h } from 'react'
33

4-
const copyInput = (e) => {
5-
e.target.select()
4+
const copyInput = (event) => {
5+
event.target.select()
66
document.execCommand('copy')
77
}
88

src/ui/scripts/components/modals/ModalDomainAdd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const ModalDomainAdd = (props) => {
1919
title: '',
2020
})
2121

22-
const onSubmit = async (e) => {
23-
e.preventDefault()
22+
const onSubmit = async (event) => {
23+
event.preventDefault()
2424
await createDomain.mutate({
2525
variables: {
2626
input: inputs,

0 commit comments

Comments
 (0)