Skip to content

Commit

Permalink
chore: migrate to eslint v9 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 15, 2024
1 parent 7181267 commit 8a69be3
Show file tree
Hide file tree
Showing 14 changed files with 867 additions and 237 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@
"source.fixAll.eslint": true
},
"editor.formatOnSave": false,
}
"eslint.experimental.useFlatConfig": true
}
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

0 comments on commit 8a69be3

Please sign in to comment.