From f7a346d5277a2c50796a2a8d5affc09e5c696444 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Fri, 12 Apr 2024 21:11:19 +0200 Subject: [PATCH 1/3] chore: migrate to eslint v9 --- .eslintignore | 2 - .eslintrc | 4 - .vscode/settings.json | 21 +- eslint.config.js | 14 + package.json | 6 +- playground/layouts/default.vue | 8 +- playground/nuxt.config.ts | 4 +- playground/pages/index.vue | 2 +- pnpm-lock.yaml | 983 ++++++++++++++++++++----- src/module.ts | 42 +- src/runtime/components/Adsbygoogle.vue | 5 +- src/runtime/composables/adsense.ts | 21 +- src/utils.ts | 5 +- test/nuxt3.test.ts | 6 +- 14 files changed, 867 insertions(+), 256 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index de4d1f0..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -node_modules diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 9e17846..0000000 --- a/.eslintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "root": true, - "extends": ["@nuxt/eslint-config"] -} diff --git a/.vscode/settings.json b/.vscode/settings.json index db03992..e78d7ff 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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 +} \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..db7232e --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,14 @@ +// @ts-check +import { createConfigForNuxt } from '@nuxt/eslint-config/flat' + +export default createConfigForNuxt({ + features: { + tooling: true, + stylistic: true, + }, + dirs: { + src: [ + './playground', + ], + }, +}) diff --git a/package.json b/package.json index 9c5d0f7..d26e998 100644 --- a/package.json +++ b/package.json @@ -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" } -} +} \ No newline at end of file diff --git a/playground/layouts/default.vue b/playground/layouts/default.vue index 8868ded..e77ee89 100644 --- a/playground/layouts/default.vue +++ b/playground/layouts/default.vue @@ -1,17 +1,18 @@