Skip to content

Commit 88ee2b1

Browse files
committed
chore: migrate to eslint v9
1 parent 9fac05b commit 88ee2b1

20 files changed

+9452
-272
lines changed

.eslintignore

-2
This file was deleted.

.eslintrc

-4
This file was deleted.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"eslint.experimental.useFlatConfig": true
3+
}

eslint.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @ts-check
2+
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'
3+
4+
export default createConfigForNuxt({
5+
features: {
6+
tooling: true,
7+
stylistic: true,
8+
},
9+
dirs: {
10+
src: [
11+
'./playground',
12+
],
13+
},
14+
})

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
"lodash-es": "^4.17.21"
3232
},
3333
"devDependencies": {
34-
"@nuxt/eslint-config": "^0.1.1",
34+
"@nuxt/eslint-config": "^0.3.6",
3535
"@nuxt/module-builder": "^0.2.1",
3636
"@nuxt/schema": "^3.1.1",
3737
"@nuxt/test-utils": "^3.1.1",
3838
"changelogen": "^0.4.1",
39-
"eslint": "^8.33.0",
39+
"eslint": "^9.0.0",
4040
"nuxt": "^3.1.1",
4141
"vitest": "^0.28.3"
4242
}
43-
}
43+
}

playground/app.vue

+16-18
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
shadow-md
4747
focus:outline-none
4848
hover:bg-amber-700 hover:text-white"
49-
@click="setLanguage(lang,
50-
lang == 'fr' ?
51-
{actions: { continue_shopping: 'Revenir a votre magnifique magasin override runtime' }} :
52-
{}
49+
@click="setLanguage(lang,
50+
lang == 'fr'
51+
? { actions: { continue_shopping: 'Revenir a votre magnifique magasin override runtime' } }
52+
: {},
5353
)"
5454
>
5555
<RadioGroupDescription
@@ -62,7 +62,7 @@
6262
</RadioGroup>
6363
<div class="mt-4">
6464
<h1 class="text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl">
65-
{{ product.data.name }}
65+
{{ product.data.name }}
6666
</h1>
6767
</div>
6868
<section
@@ -136,14 +136,14 @@
136136
</template>
137137

138138
<script setup lang="ts">
139-
import { useSnipcart } from '#imports';
140-
import { ref, watch } from "vue"
139+
import { ref, watch } from 'vue'
141140
import { StarIcon, ShoppingBagIcon, UserCircleIcon } from '@heroicons/vue/20/solid'
142-
import { RadioGroup, RadioGroupDescription, RadioGroupOption, } from '@headlessui/vue'
141+
import { RadioGroup, RadioGroupDescription, RadioGroupOption } from '@headlessui/vue'
142+
import { useSnipcart } from '#imports'
143143
144144
const langs = [
145-
"en",
146-
"fr"
145+
'en',
146+
'fr',
147147
]
148148
149149
const selected = ref(langs[0])
@@ -161,25 +161,23 @@ const product = {
161161
price: 220,
162162
id: 1,
163163
description:
164-
"Don't compromise on snack-carrying capacity with this lightweight and spacious bag. The drawstring top keeps all your favorite chips, crisps, fries, biscuits, crackers, and cookies secure.",
164+
'Don\'t compromise on snack-carrying capacity with this lightweight and spacious bag. The drawstring top keeps all your favorite chips, crisps, fries, biscuits, crackers, and cookies secure.',
165165
src: 'https://images.unsplash.com/photo-1525966222134-fcfa99b8ae77?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=796&q=80',
166166
alt: 'Model wearing light green backpack with black canvas straps and front zipper pouch.',
167-
reviews: { average: 4, totalCount: 7 }
167+
reviews: { average: 4, totalCount: 7 },
168168
},
169169
customFields: [
170170
{
171-
"name": "Color",
172-
"options": "Black|Brown|Gold"
171+
name: 'Color',
172+
options: 'Black|Brown|Gold',
173173
},
174-
]
174+
],
175175
}
176176
177-
178177
const bindFullProduct = () => {
179178
return {
180179
...bindProductItemCustom(product.customFields),
181-
...bindProductItem(product.data)
180+
...bindProductItem(product.data),
182181
}
183182
}
184-
185183
</script>

playground/nuxt.config.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
export default defineNuxtConfig({
22
modules: ['../src/module'],
33
snipcart: {
4-
templatesUrl: "/snipcart-custom.html",
5-
publicApiKey: "MTA3ODg5YmMtZTA3ZS00M2QxLWE1N2QtOGI3ZDM5OGNmMGRjNjM3Mjg0MTM0MzA2MjQ2OTg2",
6-
language: "en",
7-
modalStyle: "side",
4+
templatesUrl: '/snipcart-custom.html',
5+
publicApiKey: 'MTA3ODg5YmMtZTA3ZS00M2QxLWE1N2QtOGI3ZDM5OGNmMGRjNjM3Mjg0MTM0MzA2MjQ2OTg2',
6+
language: 'en',
7+
modalStyle: 'side',
88
translations: {
99
en: {
1010
actions: {
11-
continue_shopping: "Go back to your awesome store"
12-
}
11+
continue_shopping: 'Go back to your awesome store',
12+
},
1313
},
1414
fr: {
1515
actions: {
16-
continue_shopping: "Revenir a votre magnifique magasin"
17-
}
18-
}
19-
}
16+
continue_shopping: 'Revenir a votre magnifique magasin',
17+
},
18+
},
19+
},
2020
},
2121
postcss: {
2222
plugins: {
@@ -27,11 +27,11 @@ export default defineNuxtConfig({
2727
app: {
2828
head: {
2929
script: [
30-
{ src: "https://cdn.tailwindcss.com" }
31-
]
32-
}
30+
{ src: 'https://cdn.tailwindcss.com' },
31+
],
32+
},
3333
},
3434
css: [
35-
"~/assets/index.css"
36-
]
35+
'~/assets/index.css',
36+
],
3737
})

playground/tailwind.config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module.exports = {
22
content: [
3-
"./playground/components/**/*.{js,vue,ts}",
4-
"./playground/layouts/**/*.vue",
5-
"./playground/pages/**/*.vue",
6-
"./playground/plugins/**/*.{js,ts}",
7-
"./playground/nuxt.config.{js,ts}",
8-
"./playground/app.vue",
3+
'./playground/components/**/*.{js,vue,ts}',
4+
'./playground/layouts/**/*.vue',
5+
'./playground/pages/**/*.vue',
6+
'./playground/plugins/**/*.{js,ts}',
7+
'./playground/nuxt.config.{js,ts}',
8+
'./playground/app.vue',
99
],
1010
theme: {
1111
extend: {},

0 commit comments

Comments
 (0)