Skip to content

Commit 4d991bf

Browse files
committedOct 15, 2023
Fixed eslint config.
Updated swig-cli-modules to get new lint task.
1 parent 5aebc0a commit 4d991bf

File tree

8 files changed

+35
-15
lines changed

8 files changed

+35
-15
lines changed
 

‎.eslintignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
.vscode
22
build
33
cert
4-
client
54
docker
65
docs
76
node_modules
87
release
98
server
10-
client

‎.vscode/settings.json

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"javascript.format.semicolons": "remove",
1313
"typescript.format.semicolons": "remove",
1414
"cSpell.words": [
15+
"appbar",
1516
"nodb"
1617
]
1718
}

‎client/.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.vscode
22
dist
33
node_modules
4+
public
5+
src/assets
46
.env

‎client/src/components/NavBar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export default function NavBar() {
188188
})}
189189
</Menu>
190190
</Box>}
191-
{!auth.user && <Button variant="outlined" color="inherit" onClick={_ => navigate('/login')}>Login</Button>}
191+
{!auth.user && <Button variant="outlined" color="inherit" onClick={() => navigate('/login')}>Login</Button>}
192192
</Toolbar>
193193
</Container>
194194
</AppBar>

‎client/src/layout/AdminLayout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default function AdminLayout() {
6060
>
6161
Admin Dashboard
6262
</Typography>
63-
<IconButton onClick={_ => navigate('/')}><ExitToAppIcon /></IconButton>
63+
<IconButton onClick={() => navigate('/')}><ExitToAppIcon /></IconButton>
6464
</Toolbar>
6565
</AppBar>
6666
<Drawer variant="permanent" open={open}>
@@ -79,19 +79,19 @@ export default function AdminLayout() {
7979
</Toolbar>
8080
<Divider />
8181
<List component="nav">
82-
<ListItem button onClick={_ => navigate('/admin')}>
82+
<ListItem button onClick={() => navigate('/admin')}>
8383
<ListItemIcon>
8484
<DashboardIcon />
8585
</ListItemIcon>
8686
<ListItemText primary="Home" />
8787
</ListItem>
88-
<ListItem button onClick={_ => navigate('/admin/users')}>
88+
<ListItem button onClick={() => navigate('/admin/users')}>
8989
<ListItemIcon>
9090
<PersonIcon />
9191
</ListItemIcon>
9292
<ListItemText primary="Users" />
9393
</ListItem>
94-
<ListItem button onClick={_ => navigate('/admin/whitelist')}>
94+
<ListItem button onClick={() => navigate('/admin/whitelist')}>
9595
<ListItemIcon>
9696
<LockOpenIcon />
9797
</ListItemIcon>

‎client/src/pages/admin/Users.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from 'react'
1+
import { useEffect, useState } from 'react'
22
import { User } from '../../model/models'
33
import AdminApi from '../../logic/AdminApi'
44
import LoadingBackdrop from '../../components/LoadingBackdrop'
@@ -9,7 +9,7 @@ import TableContainer from '@mui/material/TableContainer'
99
import TableHead from '@mui/material/TableHead'
1010
import TableRow from '@mui/material/TableRow'
1111
import Paper from '@mui/material/Paper'
12-
import { Checkbox, FormControlLabel, Grid } from '@mui/material'
12+
import { Checkbox, FormControlLabel } from '@mui/material'
1313

1414
const api = new AdminApi()
1515

@@ -77,7 +77,7 @@ export default function Users() {
7777
<TableCell align="right">
7878
<FormControlLabel label="" control={<Checkbox
7979
checked={user.roles.includes(CONTENT_CREATOR_ROLE)}
80-
onChange={_ => toggleUserContentCreator(user.id, user.roles.includes(CONTENT_CREATOR_ROLE))}
80+
onChange={() => toggleUserContentCreator(user.id, user.roles.includes(CONTENT_CREATOR_ROLE))}
8181
/>} />
8282
</TableCell>
8383
</TableRow>

‎package-lock.json

+23-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dotenv": "^16.3.1",
1616
"eslint": "^8.51.0",
1717
"swig-cli": "^0.0.15",
18-
"swig-cli-modules": "^0.0.15",
18+
"swig-cli-modules": "^0.0.16",
1919
"tsx": "^3.13.0",
2020
"typescript": "^5.2.2"
2121
},

0 commit comments

Comments
 (0)
Please sign in to comment.