Skip to content

Commit

Permalink
chore: run prettier format with new plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarneo committed Jan 27, 2024
1 parent d0c8d7c commit a6dd25d
Show file tree
Hide file tree
Showing 45 changed files with 312 additions and 174 deletions.
5 changes: 3 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"singleQuote": true,
"arrowParens": "always",
"jsxSingleQuote": false,
"printWidth": 100
}
"printWidth": 100,
"plugins": ["prettier-plugin-prisma", "prettier-plugin-organize-imports"]
}
108 changes: 99 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"docker-run": "docker run -p 3000:3000 -d --name=hemmelig -v ./data/hemmelig/:/var/tmp/hemmelig/upload/files -v ./database/:/home/node/hemmelig/database/ hemmelig",
"production-test": "npm run docker-build && npm run docker-run",
"prepare": "husky install",
"prettier": "prettier --write --ignore-unknown src/",
"prettier": "prettier --write --ignore-unknown src/ prisma/",
"publish-cli": "rm -rf dist/ && npx microbundle build --target node -i cli.js -o dist/ && npm publish",
"pkg": "rm -rf dist/ bin/ && npx esbuild cli.js --bundle --platform=node --outfile=dist/cli.cjs --define:import.meta.url=__dirname && npx pkg dist/cli.cjs --targets=node18-linux-arm64 --output=bin/hemmelig"
},
Expand Down Expand Up @@ -88,7 +88,9 @@
"lint-staged": "^11.0.0",
"mocha": "^10.0.0",
"nodemon": "^2.0.7",
"prettier": "^2.3.1",
"prettier": "^3.2.4",
"prettier-plugin-organize-imports": "^3.2.4",
"prettier-plugin-prisma": "^5.0.0",
"prisma": "^4.12.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/client/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { USER_LOGIN_CHANGED, USER_LOGIN } from '../util/constants';
import { USER_LOGIN, USER_LOGIN_CHANGED } from '../util/constants';

export const userLoginChanged = (payload) => {
return {
Expand Down
10 changes: 5 additions & 5 deletions src/client/admin-shell.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Outlet, Link } from 'react-router-dom';
import { AppShell, Anchor, Navbar, Header, Group, useMantineTheme } from '@mantine/core';
import { Anchor, AppShell, Group, Header, Navbar, useMantineTheme } from '@mantine/core';
import { Link, Outlet } from 'react-router-dom';

import MainLinks from './components/settings/main-links';
import SecondaryLinks from './components/settings/secondary-links';
import Nav from './components/header/nav';
import Logo from './components/header/logo';
import Nav from './components/header/nav';
import logoStyles from './components/header/style.module.css';
import MainLinks from './components/settings/main-links';
import SecondaryLinks from './components/settings/secondary-links';

const AdminShell = () => {
const theme = useMantineTheme();
Expand Down
2 changes: 1 addition & 1 deletion src/client/app-shell.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Anchor, AppShell, Footer, Group, Header, Text, useMantineTheme } from '@mantine/core';
import { Link, Outlet } from 'react-router-dom';
import { AppShell, Anchor, Header, Footer, Text, useMantineTheme, Group } from '@mantine/core';

import { useMediaQuery } from '@mantine/hooks';
import { useTranslation } from 'react-i18next';
Expand Down
2 changes: 1 addition & 1 deletion src/client/app.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BrowserRouter } from 'react-router-dom';
import { MantineProvider } from '@mantine/core';
import { ModalsProvider } from '@mantine/modals';
import { BrowserRouter } from 'react-router-dom';
import AppRoutes from './routes.jsx';

const HemmeligApplication = () => {
Expand Down
17 changes: 8 additions & 9 deletions src/client/components/header/index.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { Link } from 'react-router-dom';
import { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Navigate } from 'react-router-dom';
import { Anchor, Burger, Container, Group, Grid, Modal, Button } from '@mantine/core';
import { Anchor, Burger, Button, Container, Grid, Group, Modal } from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useDispatch, useSelector } from 'react-redux';
import { Link, Navigate } from 'react-router-dom';

import Nav from './nav';
import { userLoginChanged, userLogin } from '../../actions/';
import Logo from './logo.jsx';
import { userLogin, userLoginChanged } from '../../actions/';
import { getCookie, refreshCookie } from '../../helpers/cookie';
import Logo from './logo.jsx';
import Nav from './nav';

import style from './style.module.css';
import { refresh } from '../../api/authentication.js';
import style from './style.module.css';

const Header = () => {
const { t } = useTranslation();
Expand Down
6 changes: 3 additions & 3 deletions src/client/components/header/nav.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Link } from 'react-router-dom';
import { NavLink, Group } from '@mantine/core';
import { Group, NavLink } from '@mantine/core';
import { useMediaQuery } from '@mantine/hooks';
import { IconUser, IconLockOff, IconLogin, IconFingerprint, IconList } from '@tabler/icons';
import { IconFingerprint, IconList, IconLockOff, IconLogin, IconUser } from '@tabler/icons';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';

import style from './style.module.css';

Expand Down
5 changes: 2 additions & 3 deletions src/client/components/qrlink/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react';
import style from './style.module.css';
import QRCode from 'react-qr-code';
import { Center } from '@mantine/core';
import QRCode from 'react-qr-code';
import style from './style.module.css';

const QRLink = ({ value }) => (
<Center>
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/settings/main-links.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IconUser, IconLock, IconSettings } from '@tabler/icons';
import { ThemeIcon, UnstyledButton, Group, Text } from '@mantine/core';
import { Group, Text, ThemeIcon, UnstyledButton } from '@mantine/core';
import { IconLock, IconSettings, IconUser } from '@tabler/icons';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';

Expand Down
2 changes: 1 addition & 1 deletion src/client/components/settings/secondary-links.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Group, Text, ThemeIcon, UnstyledButton, rem, useMantineTheme } from '@mantine/core';
import { IconFingerprint, IconList, IconLockOff } from '@tabler/icons';
import { ThemeIcon, UnstyledButton, Group, Text, Box, useMantineTheme, rem } from '@mantine/core';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';

Expand Down
1 change: 0 additions & 1 deletion src/client/components/spinner/index.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import style from './style.module.css';

const Spinner = () => <div className={style.loader}>Loading...</div>;
Expand Down
Loading

0 comments on commit a6dd25d

Please sign in to comment.