Skip to content

Commit 34f2851

Browse files
committed
minor: prepare & lint
1 parent 429a91c commit 34f2851

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

eslint.config.mjs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ export default createConfigForNuxt({
1010
stylistic: true,
1111
},
1212
dirs: {
13-
src: [
14-
'./playground',
15-
],
13+
src: ['./playground'],
14+
},
15+
}).append({
16+
rules: {
17+
'@typescript-eslint/no-explicit-any': 'off',
1618
},
1719
})
18-
.append(
19-
// your custom flat config here...
20-
)

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
2525
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
2626
"lint": "eslint .",
27+
"lint:fix": "eslint . --fix",
28+
"dev:check": "npm run lint:fix && npm run test",
2729
"test": "vitest run",
2830
"test:watch": "vitest watch",
2931
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"

playground/app.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<template>
22
<div class="bg-black text-white w-screen h-screen p-4">
3-
<input type="text" placeholder="Type name" v-model="name" class="bg-transparent border border-white px-4 py-2 rounded-md" />
3+
<input
4+
v-model="name"
5+
type="text"
6+
placeholder="Type name"
7+
class="bg-transparent border border-white px-4 py-2 rounded-md"
8+
>
49
</div>
510
</template>
611

playground/nuxt.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default defineNuxtConfig({
33
'../src/module',
44
'@nuxtjs/tailwindcss',
55
],
6-
myModule: {},
76
devtools: { enabled: true },
87
compatibilityDate: '2025-01-22',
9-
})
8+
myModule: {},
9+
})

playground/tailwind.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ export default {
66
},
77
plugins: [],
88
}
9-

src/module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { defineNuxtModule, addPlugin, createResolver, addImports } from '@nuxt/kit'
22

33
// Module options TypeScript interface definition
4-
export interface ModuleOptions {}
4+
export interface ModuleOptions {
5+
[key: string]: any
6+
}
57

68
export default defineNuxtModule<ModuleOptions>({
79
meta: {

src/runtime/composables/queryRef.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ function loadQueryParamFromURL(key: string, type: QueryParamType) {
3939
if (!loadedString) return
4040

4141
if (type == 'number') return +loadedString
42-
if (type == 'number[]') return loadedString.split(',').map((n) => +n)
42+
if (type == 'number[]') return loadedString.split(',').map(n => +n)
4343
if (type == 'string[]') return loadedString.split(',')
4444
if (type == 'boolean') return loadedString == 'true'
45-
if (type == 'boolean[]') return loadedString.split(',').map((n) => n == 'true')
45+
if (type == 'boolean[]') return loadedString.split(',').map(n => n == 'true')
4646
if (['object', 'object[]'].includes(type)) return JSON.parse(loadedString)
4747
return loadedString
4848
}

0 commit comments

Comments
 (0)