Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to eslint v9 #195

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

21 changes: 2 additions & 19 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
{
"cSpell.words": [
"adsbygoogle",
"ADSENSE",
"adtest",
"crossorigin",
"defu",
"googlesyndication",
"noarchive",
"nofollow",
"pagead",
"pathe",
"Uacct"
],
"prettier.enable": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": false,
}
"eslint.experimental.useFlatConfig": true
danielroe marked this conversation as resolved.
Show resolved Hide resolved
}
14 changes: 14 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// @ts-check
import { createConfigForNuxt } from '@nuxt/eslint-config/flat'

export default createConfigForNuxt({
features: {
tooling: true,
stylistic: true,
},
dirs: {
src: [
'./playground',
],
},
})
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@
},
"devDependencies": {
"@nuxt/devtools": "latest",
"@nuxt/eslint-config": "^0.1.1",
"@nuxt/eslint-config": "^0.3.6",
"@nuxt/module-builder": "^0.4.0",
"@nuxt/schema": "^3.6.5",
"@nuxt/test-utils": "^3.6.5",
"@types/node": "^18.17.3",
"changelogen": "^0.5.4",
"eslint": "^8.46.0",
"eslint": "^9.0.0",
"nuxt": "^3.6.5",
"vitest": "^0.34.1"
}
}
}
8 changes: 4 additions & 4 deletions playground/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<script setup lang="ts">
import { computed, navigateTo, useRoute } from '#imports'

const route = useRoute()

function changeQueryParams() {
if (hasQueryParams.value)
navigateTo({
path: currentRoute.value,
query: {}
query: {},
})
else
navigateTo({
path: currentRoute.value,
query: { test: 'true' }
query: { test: 'true' },
})
}

Expand All @@ -35,14 +36,13 @@ const hasQueryParams = computed(() => currentRoute.value.includes('?'))
<Adsbygoogle
ad-format="horizontal"
data-ad-full-width-responsive="true"
:ad-style="{ display: 'inline-block', height: '90px', maxWidth: '1000px'}"
:ad-style="{ display: 'inline-block', height: '90px', maxWidth: '1000px' }"
/>

<button @click="changeQueryParams()">
Change Query Params
</button>


<NuxtPage />
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default defineNuxtConfig({
modules: ['../src/module'],
googleAdsense: {
id: 'test-me-id'
id: 'test-me-id',
},
devtools: { enabled: true }
devtools: { enabled: true },
})
2 changes: 1 addition & 1 deletion playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Adsbygoogle
ad-format="vertical"
:include-query="true"
:style="{minWidth: '300px'}"
:style="{ minWidth: '300px' }"
/>

<div class="content">
Expand Down
Loading
Loading