Skip to content

Commit 9cb0c1d

Browse files
committed
fix: 🔥 bump eslint
1 parent 64b27d3 commit 9cb0c1d

16 files changed

+1226
-1461
lines changed

.prettierignore

Lines changed: 0 additions & 99 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

components/app/AppBar.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ const toggleDark = useToggle<true, false | null>(isDark)
99
const $auth = useAuth()
1010
const breadcrumbs = computed(() =>
1111
route.matched
12-
.filter((item) => item.meta?.title && item.meta?.breadcrumb !== 'hidden')
13-
.map((r) => ({
12+
.filter(item => item.meta?.title && item.meta?.breadcrumb !== 'hidden')
13+
.map(r => ({
1414
title: r.meta.title!,
1515
disabled: r.meta?.breadcrumb === false || r.path === route.path || false,
1616
to: r.path,
@@ -61,7 +61,9 @@ function onChanged(dark: boolean) {
6161
</VListItem>
6262
<VListItem>
6363
<template #prepend>
64-
<VIcon start>mdi-translate</VIcon>
64+
<VIcon start>
65+
mdi-translate
66+
</VIcon>
6567
</template>
6668
<VListItemTitle>
6769
{{ $t('common.title.switchLang') }}
@@ -70,7 +72,9 @@ function onChanged(dark: boolean) {
7072
<VDivider thickness="1" />
7173
<VListItem @click="$auth.logout()">
7274
<template #prepend>
73-
<VIcon start>mdi-logout-variant</VIcon>
75+
<VIcon start>
76+
mdi-logout-variant
77+
</VIcon>
7478
</template>
7579
<VListItemTitle>
7680
{{ $t('auth.logout') }}

components/app/AppDrawer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const drawer = computed({
1111
})
1212
const rail = computed(() => !drawerState.value && !mobile.value)
1313
14-
const routes = router.getRoutes().filter((r) => r.path.lastIndexOf('/') === 0)
14+
const routes = router.getRoutes().filter(r => r.path.lastIndexOf('/') === 0)
1515
routes.sort((a, b) => (Number(a.meta?.drawerIndex) ?? 99) - (Number(b.meta?.drawerIndex) ?? 98))
1616
1717
nextTick(() => {

components/app/AppDrawerItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const props = withDefaults(
1313
)
1414
const children = computed(() =>
1515
props.item.children
16-
?.filter((child) => child.meta?.icon)
16+
?.filter(child => child.meta?.icon)
1717
.sort((a, b) => (Number(a.meta?.drawerIndex) ?? 99) - (Number(b.meta?.drawerIndex) ?? 98)),
1818
)
1919
const isItem = computed(() => !props.item.children || (children.value?.length ?? 0) <= 1)

eslint.config.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import withNuxt from './.nuxt/eslint.config.mjs'
2+
3+
export default withNuxt({
4+
rules: {
5+
'vue/max-attributes-per-line': 'off',
6+
},
7+
}).override('nuxt/stylistic', {
8+
rules: {
9+
'@stylistic/quotes': ['error', 'single', { allowTemplateLiterals: true }],
10+
},
11+
})

nuxt.config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default defineNuxtConfig({
114114
},
115115
http: {
116116
credentials: 'include',
117-
debug: process.env.NODE_ENV === 'development',
117+
// debug: process.env.NODE_ENV === 'development',
118118
},
119119
veeValidate: {
120120
autoImports: true,
@@ -127,8 +127,12 @@ export default defineNuxtConfig({
127127
},
128128
},
129129
eslint: {
130+
checker: true,
130131
config: {
131-
// stylistic: true,
132+
stylistic: true,
133+
typescript: {
134+
strict: true,
135+
},
132136
},
133137
},
134138
})

package.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@chantouchsek/amazing-admin",
33
"private": true,
4-
"packageManager": "pnpm@8.15.5",
4+
"packageManager": "pnpm@8.15.6",
55
"type": "module",
66
"engines": {
77
"node": ">=18",
@@ -14,55 +14,52 @@
1414
"dev": "nuxt dev",
1515
"generate": "nuxt generate",
1616
"postinstall": "nuxt prepare",
17-
"lint": "pnpm lint:js && pnpm lint:style && pnpm lint:prettier",
18-
"lint:fix": "prettier --write --list-different . && pnpm lint:js --fix && pnpm lint:style --fix",
17+
"lint": "pnpm lint:js && pnpm lint:style",
18+
"lint:fix": "pnpm lint:js --fix && pnpm lint:style --fix",
1919
"lint:js": "eslint . --cache",
20-
"lint:prettier": "prettier --check --ignore-unknown .",
2120
"lint:style": "stylelint '**/*.{css,scss,sass,vue}' --ignore-path .gitignore",
2221
"prepare": "husky",
2322
"preview": "nuxt preview"
2423
},
2524
"lint-staged": {
2625
"*.{js,ts,vue}": "eslint --cache",
27-
"*.{css,scss,sass,vue}": "stylelint",
28-
"*.**": "prettier --check --ignore-unknown"
26+
"*.{css,scss,sass,vue}": "stylelint"
2927
},
3028
"devDependencies": {
3129
"@commitlint/cli": "^19.2.1",
3230
"@commitlint/config-conventional": "^19.1.0",
3331
"@date-io/dayjs": "^3.0.0",
3432
"@nuxt-alt/auth": "^3.1.6",
3533
"@nuxt-alt/http": "^1.7.10",
36-
"@nuxt/eslint": "0.3.0-beta.7",
34+
"@nuxt/eslint": "0.3.0-beta.9",
3735
"@nuxt/fonts": "^0.6.1",
3836
"@nuxtjs/color-mode": "^3.3.3",
3937
"@nuxtjs/i18n": "^8.3.0",
4038
"@nuxtjs/robots": "^3.0.0",
4139
"@nuxtjs/sitemap": "^5.1.2",
4240
"@pinia/colada": "^0.6.0",
4341
"@pinia/nuxt": "^0.5.1",
44-
"@unocss/nuxt": "^0.58.6",
42+
"@unocss/nuxt": "^0.58.9",
4543
"@vee-validate/nuxt": "^4.12.6",
4644
"@vee-validate/zod": "^4.12.6",
47-
"@vue-macros/nuxt": "^1.9.26",
45+
"@vue-macros/nuxt": "^1.9.28",
4846
"@vueuse/nuxt": "^10.9.0",
4947
"dayjs-nuxt": "^2.1.9",
5048
"eslint": "^8.57.0",
5149
"husky": "^9.0.11",
5250
"lint-staged": "^15.2.2",
5351
"nuxt": "^3.11.1",
5452
"pinia": "^2.1.7",
55-
"prettier": "^3.2.5",
56-
"sass": "^1.72.0",
53+
"sass": "^1.74.1",
5754
"sass-loader": "^14.1.1",
5855
"stylelint": "^16.3.1",
59-
"stylelint-config-prettier": "^9.0.5",
6056
"stylelint-config-recommended-vue": "^1.5.0",
6157
"stylelint-config-standard": "^36.0.0",
6258
"typescript": "^5.4.3",
6359
"unocss": "^0.58.9",
6460
"unocss-preset-useful": "^0.4.1",
6561
"vee-validate": "^4.12.6",
62+
"vite-plugin-eslint2": "^4.4.0",
6663
"vue": "^3.4.21",
6764
"vue-eslint-parser": "^9.4.2",
6865
"vue-router": "^4.3.0",

pages/[...all].vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export default defineComponent({
77
<template>
88
<div class="wrapper">
99
<VIcon class="logo mb-4" icon="mdi-view-grid-outline" />
10-
<p class="text-h5">404 Not Found</p>
10+
<p class="text-h5">
11+
404 Not Found
12+
</p>
1113
</div>
1214
</template>
1315

pages/index.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const name = ref('')
2525
<VBtn class="mr-2" color="primary" :disabled="!name">
2626
{{ $t('common.confirm') }}
2727
</VBtn>
28-
<VBtn :disabled="!name">{{ $t('common.cancel') }}</VBtn>
28+
<VBtn :disabled="!name">
29+
{{ $t('common.cancel') }}
30+
</VBtn>
2931
</div>
3032
</template>

pages/nested/menu1.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ definePageMeta({
66
</script>
77

88
<template>
9-
<VContainer fluid>empty page</VContainer>
9+
<VContainer fluid>
10+
empty page
11+
</VContainer>
1012
</template>

pages/nested/menu2/menu2-1.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ definePageMeta({
66
</script>
77

88
<template>
9-
<div class="relative text-center py-2">Page: nested/menu2/menu2-1</div>
9+
<div class="relative text-center py-2">
10+
Page: nested/menu2/menu2-1
11+
</div>
1012
</template>

pages/nested/menu2/menu2-2.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ definePageMeta({
66
</script>
77

88
<template>
9-
<div class="relative text-center py-2">Page: nested/menu2/menu2-2</div>
9+
<div class="relative text-center py-2">
10+
Page: nested/menu2/menu2-2
11+
</div>
1012
</template>

0 commit comments

Comments
 (0)