Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install lint-staged
echo 📝 Checking lint...
yarn.cmd lint-staged
4 changes: 0 additions & 4 deletions .husky/prepare-commit-msg

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"tabWidth": 2,
"singleQuote": true,
"semi": false
"semi": false,
"endOfLine": "auto"
}
6 changes: 3 additions & 3 deletions mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const handlers = [

return res(
// Respond with a 200 status code
ctx.status(200)
ctx.status(200),
)
}),

Expand All @@ -23,7 +23,7 @@ export const handlers = [
ctx.status(403),
ctx.json({
errorMessage: 'Not authorized',
})
}),
)
}

Expand All @@ -32,7 +32,7 @@ export const handlers = [
ctx.status(200),
ctx.json({
username: 'admin',
})
}),
)
}),
]
17 changes: 7 additions & 10 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt'
import { defineNuxtConfig } from 'nuxt/config'

// https://v3.nuxtjs.org/api/configuration/nuxt.config
export default defineNuxtConfig({
Expand All @@ -14,15 +14,12 @@ export default defineNuxtConfig({
vueuse: {
ssrHandlers: true,
},
build: {
postcss: {
postcssOptions: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
devtools: { enabled: true },
css: ['~/assets/css/tailwind.css'],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
css: ['~/assets/css/tailwind.css'],
})
33 changes: 17 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,28 @@
]
},
"devDependencies": {
"@nuxt/devtools": "^1.0.0-beta.2",
"@nuxt/test-utils": "^3.0.0-rc.3",
"@nuxtjs/eslint-config-typescript": "^9.0.0",
"@pinia/nuxt": "^0.4.1",
"@vueuse/nuxt": "^9.1.0",
"axios": "^0.27.2",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@pinia/nuxt": "^0.5.0",
"@vueuse/nuxt": "^10.5.0",
"axios": "^1.5.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-nuxt": "^3.2.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.0",
"lint-staged": "^12.4.1",
"msw": "^0.45.0",
"nuxt": "3.0.0-rc.8",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-nuxt": "^4.0.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3",
"lint-staged": "^15.0.1",
"msw": "^1.3.2",
"nuxt": "3.7.4",
"pinia": "^2.0.20",
"prettier": "^2.6.2",
"prettier-plugin-tailwindcss": "^0.1.13",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "^0.5.6",
"tailwindcss": "^3.1.8",
"testcafe": "^1.20.1",
"typescript": "^4.6.4",
"vitest": "^0.22.1"
"testcafe": "^3.3.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6"
},
"config": {
"commitizen": {
Expand Down
4 changes: 2 additions & 2 deletions plugins/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ export default defineNuxtPlugin(() => {
// eslint-disable-next-line
const REGEX_MOBILE1 = RegExp(
'(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|FBAN|FBAV|fennec|hiptop|iemobile|ip(hone|od)|Instagram|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows ce|xda|xiino',
'i'
'i',
)

// eslint-disable-next-line
const REGEX_MOBILE2 = RegExp(
'1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-',
'i'
'i',
)
const isMobile = (userAgent: string) => {
return (
Expand Down
8 changes: 4 additions & 4 deletions public/mockServiceWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/* tslint:disable */

/**
* Mock Service Worker (0.45.0).
* Mock Service Worker (1.3.2).
* @see https://github.com/mswjs/msw
* - Please do NOT modify this file.
* - Please do NOT serve this file on production.
*/

const INTEGRITY_CHECKSUM = 'b3066ef78c2f9090b4ce87e874965995'
const INTEGRITY_CHECKSUM = '3d6b9f06410d179a7f7404d4bf4c3c70'
const activeClientIds = new Set()

self.addEventListener('install', function () {
Expand Down Expand Up @@ -174,7 +174,7 @@ async function handleRequest(event, requestId) {
async function resolveMainClient(event) {
const client = await self.clients.get(event.clientId)

if (client.frameType === 'top-level') {
if (client?.frameType === 'top-level') {
return client
}

Expand All @@ -200,7 +200,7 @@ async function getResponse(event, client, requestId) {

function passthrough() {
// Clone the request because it might've been already used
// (i.e. its body has been read and sent to the cilent).
// (i.e. its body has been read and sent to the client).
const headers = Object.fromEntries(clonedRequest.headers.entries())

// Remove MSW-specific request headers so the bypassed requests
Expand Down