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 #33

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.experimental.useFlatConfig": true
}
4 changes: 2 additions & 2 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default {
extends: ['@commitlint/config-conventional']
};
extends: ['@commitlint/config-conventional'],
}
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',
],
},
})
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"@commitlint/cli": "^19.2.2",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/prompt-cli": "^19.2.2",
"@nuxt/eslint-config": "^0.3.6",
"@nuxt/eslint-config": "^0.3.10",
"@nuxt/module-builder": "^0.5.5",
"@nuxt/schema": "^3.11.2",
"@nuxt/test-utils": "^3.12.0",
"@types/node": "^20.12.7",
"changelogen": "^0.5.5",
"eslint": "^8.57.0",
"eslint": "^9.1.1",
"husky": "^9.0.11",
"nuxt": "^3.11.2",
"typescript": "^5.4.5",
Expand Down
1 change: 1 addition & 0 deletions playground/components/OtherComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@

<script setup lang="ts">
import { useClientStripe } from '#imports'

const stripeClient = await useClientStripe()
</script>
8 changes: 4 additions & 4 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export default defineNuxtConfig({
modules: ['../src/module'],
stripe: {
client: {
key: 'pk_test_123'
key: 'pk_test_123',
},
server: {
key: 'sk_test_123'
}
}
key: 'sk_test_123',
},
},
})
10 changes: 5 additions & 5 deletions playground/server/api/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { defineEventHandler } from 'h3'
import { useServerStripe } from '#stripe/server'

export default defineEventHandler(async (event) => {
const stripe = await useServerStripe(event)
console.info("Stripe instance:", stripe)
const stripe = await useServerStripe(event)
console.info('Stripe instance:', stripe)

return {
message: 'Inspect your terminal to see stripe server object'
}
return {
message: 'Inspect your terminal to see stripe server object',
}
})
Loading