From e589e73dde21b1305876d004c96746227eb4e774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Mon, 7 Oct 2024 22:22:45 +0200 Subject: [PATCH] chore: update to eslint 9 and modern config (#700) --- .eslintignore | 11 - .eslintrc.cjs | 107 --- .github/workflows/ci.yml | 2 - .gitignore | 1 - .size-limit.cjs | 2 +- README.md | 3 - docs/.gitignore | 1 - eslint.config.mjs | 68 ++ package.json | 16 +- size-check/base/pages/index.vue | 2 +- size-check/lazy+tracing/pages/index.vue | 2 +- size-check/lazy/pages/index.vue | 2 +- size-check/replay/pages/index.vue | 2 +- size-check/tracing/pages/index.vue | 2 +- size-check/typescript/pages/index.vue | 3 +- src/hooks.ts | 4 +- src/kit-shim.ts | 118 +-- src/module.ts | 24 +- src/options.ts | 28 +- src/types/configuration.d.ts | 18 +- src/types/extend.d.ts | 1 + src/types/sentry.d.ts | 76 +- src/utils.ts | 1 - test/default.test.ts | 1 - .../config/custom-client-integrations.js | 5 +- test/fixture/default/pages/index.vue | 3 +- .../lazy/config/custom-client-integrations.js | 5 +- test/fixture/typescript/api/index.ts | 2 +- .../config/custom-client-integrations.ts | 1 - test/fixture/typescript/pages/index.vue | 3 +- test/options.test.ts | 3 +- test/typescript.test.ts | 1 - tsconfig.json | 2 + yarn.lock | 865 ++++++------------ 34 files changed, 533 insertions(+), 852 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index aed98836..00000000 --- a/.eslintignore +++ /dev/null @@ -1,11 +0,0 @@ -!.eslintrc.cjs -!.release-it.cjs - -# un-ignore @nuxtjs/eslint-config -!*.d.ts -!.nuxt/sentry.*.js - -dist/ -templates/ -node_modules - diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index afe854d6..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,107 +0,0 @@ -const tsParser = require('@typescript-eslint/parser') - -module.exports = { - extends: [ - '@nuxtjs/eslint-config', - ], - rules: { - 'comma-dangle': ['error', 'always-multiline'], - 'import/named': 'off', - 'import/namespace': 'off', - 'import/no-absolute-path': 'off', - 'no-console': [ - 'error', { - allow: ['assert', 'warn', 'error', 'info'], - }, - ], - 'vue/multi-word-component-names': 'off', - }, - overrides: [ - { - files: ['**/.nuxt/*.js'], - rules: { - 'comma-spacing': 'off', - 'import/order': 'off', - 'key-spacing': 'off', - 'object-curly-spacing': 'off', - 'quote-props': 'off', - quotes: 'off', - }, - }, - { - files: ['*.vue'], - parserOptions: { - parser: { - // Overrides script parser for `