Skip to content

Commit

Permalink
chore: updates eslint-config to v2 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelsos authored Feb 5, 2024
1 parent c849b84 commit 623f321
Show file tree
Hide file tree
Showing 197 changed files with 2,996 additions and 2,197 deletions.
16 changes: 0 additions & 16 deletions .eslintrc.cjs

This file was deleted.

8 changes: 7 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@ assignees: ''
---

## Description

<!-- A clear and concise description of what the bug is.-->

## Reproduction
<!-- Steps to reproduce the behavior:

<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Additional information

### Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->

### Platform

<!--
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
Expand Down
22 changes: 11 additions & 11 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
':dependencyDashboard',
':dependencyDashboardApproval',
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":dependencyDashboard",
":dependencyDashboardApproval"
],
packageRules: [
"packageRules": [
{
allowedVersions: '/^(20)\\./',
groupName: 'Node.js',
matchPackageNames: ['@types/node', 'node'],
},
],
"allowedVersions": "/^(20)\\./",
"groupName": "Node.js",
"matchPackageNames": ["@types/node", "node"]
}
]
}
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ $ pnpm run dev
$ pnpm run build
$ pnpm start
```

## Setting up the environment

Make sure the environment file exists
Expand Down Expand Up @@ -48,19 +49,25 @@ NODE_TLS_REJECT_UNAUTHORIZED=0
You can configure the frontend to proxy the `/webapi` to a server running somewhere:

For the `production` system you could use:

```dotenv
PROXY_DOMAIN=rotki.com
```

or if `staging` is running you could set:

```dotenv
PROXY_DOMAIN=staging.rotki.com
```

If the server where you proxy doesn't run using `https` you can set so that the backend requests are proxied to `http`:

```dotenv
PROXY_INSECURE=true
```

## Run

Run with the development server with the following command:

```bash
Expand Down
7 changes: 4 additions & 3 deletions assets/css/main.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@import "media";
@import 'media';

.body {
@apply text-rui-text;
}

.fade-enter-active, .fade-leave-active {
transition: opacity .4s;
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.4s;
}

.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
Expand Down
20 changes: 15 additions & 5 deletions assets/css/media.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
@mixin for-size($size) {
@if $size == phone-only {
@media (max-width: 599px) { @content; }
@media (max-width: 599px) {
@content;
}
} @else if $size == tablet-portrait-up {
@media (min-width: 600px) { @content; }
@media (min-width: 600px) {
@content;
}
} @else if $size == tablet-landscape-up {
@media (min-width: 900px) { @content; }
@media (min-width: 900px) {
@content;
}
} @else if $size == desktop-up {
@media (min-width: 1200px) { @content; }
@media (min-width: 1200px) {
@content;
}
} @else if $size == big-desktop-up {
@media (min-width: 1800px) { @content; }
@media (min-width: 1800px) {
@content;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/css/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
@tailwind utilities;

.container {
@apply px-4 md:px-12 xl:px-16;
@apply px-4 md:px-12 xl:px-16;
}
10 changes: 8 additions & 2 deletions components/NavigationMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ const menus: Menu[] = [
:to="menu.to"
>
{{ menu.label }}
<template v-if="menu.external" #append>
<RuiIcon size="18" name="external-link-line" />
<template
v-if="menu.external"
#append
>
<RuiIcon
size="18"
name="external-link-line"
/>
</template>
</ButtonLink>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/account/CountrySelect.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { get } from '@vueuse/core';
import { type Country } from '~/composables/countries';
import type { Country } from '~/composables/countries';
const props = withDefaults(
defineProps<{
Expand Down
33 changes: 24 additions & 9 deletions components/account/InputField.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { type BaseErrorObject } from '~/types/common';
import type { BaseErrorObject } from '~/types/common';
const props = withDefaults(
defineProps<{
Expand Down Expand Up @@ -35,12 +35,12 @@ const emit = defineEmits<{
}>();
const inputField = ref<HTMLInputElement | null>(null);
const input = (event: Event) => {
function input(event: Event) {
const target = event.target;
if (target) {
if (target)
emit('update:modelValue', (target as HTMLInputElement).value ?? '');
}
};
}
const value = toRef(props, 'modelValue');
const lastMessage = ref('');
watch(toRef(props, 'errorMessages'), (value) => {
Expand Down Expand Up @@ -72,7 +72,10 @@ const slots = useSlots();
}"
>
<div :class="css.slot">
<slot v-if="slots.prepend" name="prepend" />
<slot
v-if="slots.prepend"
name="prepend"
/>
<div :class="css.inputContainer">
<input
:id="id"
Expand All @@ -94,9 +97,18 @@ const slots = useSlots();
@input="input($event)"
@keypress.enter="enter()"
/>
<label v-if="label" :class="css.label" :for="id"> {{ label }}</label>
<label
v-if="label"
:class="css.label"
:for="id"
>
{{ label }}
</label>
</div>
<slot v-if="$slots.append" name="append" />
<slot
v-if="$slots.append"
name="append"
/>
</div>
</div>

Expand All @@ -108,7 +120,10 @@ const slots = useSlots();
{{ errorMessages[0].$message }}
</span>

<span v-else :class="css.caption">
<span
v-else
:class="css.caption"
>
<slot name="hint">{{ hint }}</slot>
</span>
<slot />
Expand Down
53 changes: 37 additions & 16 deletions components/account/activation/AccountActivate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ const isValid = ref(false);
const { getAccount } = useMainStore();
const validateToken = async () => {
async function validateToken() {
try {
await fetchWithCsrf(`/webapi/activate/${uid}/${token}/`);
set(isValid, true);
} catch (e: any) {
if (!(e instanceof FetchError && e.status === 404)) {
logger.debug(e);
}
} finally {
}
catch (error: any) {
if (!(error instanceof FetchError && error.status === 404))
logger.debug(error);
}
finally {
set(validating, false);
}
};
}
onBeforeMount(async () => {
await validateToken();
if (get(isValid)) {
if (get(isValid))
await getAccount();
}
});
const { t } = useI18n();
</script>
Expand All @@ -38,22 +38,43 @@ const { t } = useI18n();
class="container py-16 lg:pt-[200px] lg:pb-32 flex flex-col items-center justify-center"
>
<div class="w-[380px] max-w-full">
<div v-if="validating" class="flex justify-center">
<RuiProgress variant="indeterminate" circular color="primary" />
<div
v-if="validating"
class="flex justify-center"
>
<RuiProgress
variant="indeterminate"
circular
color="primary"
/>
</div>
<div v-else-if="!isValid" class="space-y-3">
<div class="text-h4">{{ t('auth.activation.invalid.title') }}</div>
<div
v-else-if="!isValid"
class="space-y-3"
>
<div class="text-h4">
{{ t('auth.activation.invalid.title') }}
</div>
<div class="text-body-1 text-rui-text-secondary">
{{ t('auth.activation.invalid.message') }}
</div>
</div>
<div v-else class="space-y-3">
<div class="text-h4">{{ t('auth.activation.success.title') }}</div>
<div
v-else
class="space-y-3"
>
<div class="text-h4">
{{ t('auth.activation.success.title') }}
</div>
<div class="text-body-1 text-rui-text-secondary">
<span>
{{ t('auth.activation.success.message') }}
</span>
<ButtonLink to="/home/subscription" inline color="primary">
<ButtonLink
to="/home/subscription"
inline
color="primary"
>
{{ t('common.here') }}
</ButtonLink>
</div>
Expand Down
4 changes: 3 additions & 1 deletion components/account/activation/PendingActivation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { t } = useI18n();
class="container h-full flex flex-col pt-10 md:pt-0 md:flex-1 md:items-center md:justify-center"
>
<div class="w-[30.6rem] max-w-full space-y-3">
<div class="text-h4">{{ t('auth.pending_activation.title') }}</div>
<div class="text-h4">
{{ t('auth.pending_activation.title') }}
</div>
<div class="text-body-1 text-rui-text-secondary">
{{ t('auth.pending_activation.message') }}
</div>
Expand Down
4 changes: 3 additions & 1 deletion components/account/delete/AccountDeletedPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { t } = useI18n();
class="container h-full flex flex-col pt-10 md:pt-0 md:flex-1 md:items-center md:justify-center"
>
<div class="max-w-[380px] max-w-full space-y-3">
<div class="text-h4">{{ t('account.account_deleted.title') }}</div>
<div class="text-h4">
{{ t('account.account_deleted.title') }}
</div>
<div class="text-body-1 text-rui-text-secondary">
{{ t('account.account_deleted.message') }}
</div>
Expand Down
Loading

0 comments on commit 623f321

Please sign in to comment.