Skip to content

Commit 5e34035

Browse files
chore: lint with @nuxt/eslint-config
1 parent daf6463 commit 5e34035

File tree

6 files changed

+625
-1416
lines changed

6 files changed

+625
-1416
lines changed

.eslintrc

-10
This file was deleted.

.eslintrc.cjs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['@nuxt/eslint-config'],
4+
rules: {
5+
'vue/multi-word-component-names': 'off'
6+
}
7+
}

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nuxt-remote-fn",
33
"version": "0.1.21",
4-
"packageManager": "[email protected].0",
4+
"packageManager": "[email protected].2",
55
"description": "Remote Functions. Instead of Event Handlers.",
66
"keywords": [
77
"nuxt",
@@ -51,22 +51,22 @@
5151
"dedent": "^0.7.0",
5252
"es-module-lexer": "^1.1.0",
5353
"fast-glob": "^3.2.12",
54-
"h3": "^1.0.1",
54+
"h3": "^1.0.2",
5555
"ofetch": "^1.0.0",
5656
"pathe": "^1.0.0",
5757
"unctx": "^2.1.1"
5858
},
5959
"devDependencies": {
60+
"@nuxt/eslint-config": "^0.1.1",
6061
"@nuxt/module-builder": "^0.2.1",
6162
"@nuxt/schema": "^3.0.0",
62-
"@nuxtjs/eslint-config-typescript": "^12.0.0",
6363
"@prisma/client": "^4.7.1",
6464
"@types/dedent": "^0.7.0",
6565
"bumpp": "^8.2.1",
6666
"eslint": "^8.29.0",
67-
"esno": "^0.16.3",
6867
"nuxt": "^3.0.0",
6968
"prisma": "^4.7.1",
70-
"taze": "^0.8.4"
69+
"taze": "^0.8.4",
70+
"tsx": "^3.12.1"
7171
}
7272
}

playground/components/Form.vue

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { ref } from '#imports'
3-
import { addTodo } from '@/lib/todo.server'
3+
import { addTodo } from '~/lib/todo.server'
44
55
const title = ref('')
66
const content = ref('')
@@ -24,8 +24,15 @@ async function handleSubmit () {
2424
<div>
2525
<h1>Add todo</h1>
2626
<form @submit.prevent="handleSubmit">
27-
<input v-model="title" placeholder="Title" type="text"> <br>
28-
<textarea v-model="content" placeholder="Content" /> <br>
27+
<input
28+
v-model="title"
29+
placeholder="Title"
30+
type="text"
31+
> <br>
32+
<textarea
33+
v-model="content"
34+
placeholder="Content"
35+
/> <br>
2936
<button :disabled="submitting">
3037
Submit
3138
</button>

playground/pages/index.vue

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { useAsyncData } from '#app'
3-
import { deleteTodo, toggleTodo, getTodos } from '~~/lib/todo.server'
3+
import { deleteTodo, toggleTodo, getTodos } from '~/lib/todo.server'
44
55
const { data: todos, refresh } = await useAsyncData('todos', () => getTodos())
66
@@ -18,16 +18,29 @@ async function handleDelete (id: number) {
1818
<template>
1919
<div>
2020
<ul>
21-
<li v-for="todo in todos" :key="todo.id">
21+
<li
22+
v-for="todo in todos"
23+
:key="todo.id"
24+
>
2225
<h2>
2326
<span>{{ todo.title }}</span>
24-
<input type="checkbox" :checked="todo.completed" @change="handleChange(todo.id)">
27+
<input
28+
type="checkbox"
29+
:checked="todo.completed"
30+
@change="handleChange(todo.id)"
31+
>
2532
<button @click="handleDelete(todo.id)">
2633
remove
2734
</button>
2835
</h2>
2936
<p>
30-
<span :style="{textDecoration: todo.completed ? 'line-through' : undefined}">{{ todo.content }}</span>
37+
<span
38+
:style="{
39+
textDecoration: todo.completed ? 'line-through' : undefined
40+
}"
41+
>
42+
{{ todo.content }}
43+
</span>
3144
{{ todo.completed ? ' ✅ done' : '' }}
3245
</p>
3346
</li>

0 commit comments

Comments
 (0)