From 4b108caf081bd39b3b2833d76937ae25c77183e6 Mon Sep 17 00:00:00 2001 From: Mathieu Schimmerling Date: Sun, 6 Oct 2024 20:11:30 +0200 Subject: [PATCH 1/3] refactor(eslint): add eslint config for svelte4, svelte5, lit, emberOctane, emberPolaris --- .eslintrc.cjs | 2 - .eslintrc.esm.mjs | 24 --- eslint.config.js | 16 ++ frameworks.mjs | 147 +++++++++++++----- package.json | 11 +- pnpm-lock.yaml | 388 ++++++++++++++++++++++++++-------------------- 6 files changed, 350 insertions(+), 238 deletions(-) delete mode 100644 .eslintrc.cjs delete mode 100644 .eslintrc.esm.mjs create mode 100644 eslint.config.js diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 02f35b2e..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,2 +0,0 @@ -const _require = require("esm")(module); -module.exports = _require("./.eslintrc.esm.mjs").default; diff --git a/.eslintrc.esm.mjs b/.eslintrc.esm.mjs deleted file mode 100644 index 56779451..00000000 --- a/.eslintrc.esm.mjs +++ /dev/null @@ -1,24 +0,0 @@ -import FRAMEWORKS from "./frameworks.mjs"; - -/** - * @type {import("eslint").Linter.Config} - */ -export default { - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - env: { - browser: true, - }, - plugins: ["prettier"], - overrides: FRAMEWORKS.reduce((acc, { eslint }) => { - if (Array.isArray(eslint)) { - acc.push(...eslint); - } else { - acc.push(eslint); - } - - return acc; - }, []), -}; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..ba5c9919 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,16 @@ +import FRAMEWORKS from "./frameworks.mjs"; + +/** @type {import('eslint').Linter.Config[]} */ +const config = ( + await Promise.all( + FRAMEWORKS.map(({ getEslintConfigs }) => { + if (typeof getEslintConfigs === "function") { + return getEslintConfigs(); + } + }).filter(Boolean) + ) +).flat(); + +// console.log(config) + +export default config; diff --git a/frameworks.mjs b/frameworks.mjs index f8c7a0c7..5ba8b960 100644 --- a/frameworks.mjs +++ b/frameworks.mjs @@ -15,9 +15,28 @@ const frameworks = [ frameworkName: "Svelte", isCurrentVersion: true, img: "framework/svelte.svg", - eslint: { - files: ["**/svelte4/*.svelte"], - parser: "svelte-eslint-parser", + async getEslintConfigs() { + const js = await importDefault("@eslint/js"); + const svelteParser = await importDefault("svelte-eslint-parser"); + const globalsBrowser = (await importDefault("globals")).browser; + + return [ + { + files: ["content/**/svelte4/**/*.svelte"], + languageOptions: { + parser: svelteParser, + }, + }, + { + files: ["content/**/svelte4/**/*.js"], + rules: js.configs.recommended.rules, + languageOptions: { + globals: { + ...globalsBrowser, + }, + }, + }, + ]; }, playgroundURL: "https://svelte.dev/repl", documentationURL: "https://svelte.dev/", @@ -34,7 +53,7 @@ const frameworks = [ isCurrentVersion: true, img: "framework/react.svg", eslint: { - files: ["**/react/*.jsx", "**/react/*.tsx"], + files: ["content/**/react/*.jsx"], extends: [ "eslint:recommended", "plugin:react/recommended", @@ -61,7 +80,7 @@ const frameworks = [ isCurrentVersion: true, img: "framework/vue.svg", eslint: { - files: ["**/vue3/*.vue"], + files: ["content/**/vue3/*.vue"], env: { "vue/setup-compiler-macros": true, }, @@ -87,7 +106,7 @@ const frameworks = [ img: "framework/angular.svg", eslint: [ { - files: ["**/angular/**"], + files: ["content/**/angular/**"], parserOptions: { project: ["tsconfig.app.json"], createDefaultProgram: true, @@ -113,7 +132,7 @@ const frameworks = [ }, }, { - files: ["**/angular/*.html"], + files: ["content/**/angular/*.html"], extends: ["plugin:@angular-eslint/template/recommended"], rules: { /** @@ -142,11 +161,19 @@ const frameworks = [ frameworkName: "Lit", isCurrentVersion: true, img: "framework/lit.svg", - eslint: { - files: ["**/lit/**"], - plugins: ["lit"], - parser: "@babel/eslint-parser", - extends: ["plugin:lit/recommended"], + async getEslintConfigs() { + const { configs } = await import("eslint-plugin-lit"); + const babelParser = await importDefault("@babel/eslint-parser"); + + return [ + { + ...configs["flat/recommended"], + files: ["content/**/lit/**.js"], + languageOptions: { + parser: babelParser, + }, + }, + ]; }, playgroundURL: "https://lit.dev/playground", documentationURL: "https://lit.dev", @@ -163,7 +190,7 @@ const frameworks = [ isCurrentVersion: false, img: "framework/vue.svg", eslint: { - files: ["**/vue2/*.vue"], + files: ["content/**/vue2/*.vue"], extends: ["eslint:recommended", "plugin:vue/recommended"], rules: { "vue/multi-word-component-names": "off", @@ -184,11 +211,20 @@ const frameworks = [ frameworkName: "Ember", isCurrentVersion: true, img: "framework/ember.svg", - eslint: { - files: ["**/emberOctane/**"], - plugins: ["ember"], - parser: "@babel/eslint-parser", - extends: ["plugin:ember/recommended"], + async getEslintConfigs() { + const filepaths = ["content/**/emberOctane/**/*.js"]; + const eslintPluginEmberConfigRecommended = await importDefault( + "eslint-plugin-ember/configs/recommended" + ); + + return [ + { + ...eslintPluginEmberConfigRecommended[1], + plugins: eslintPluginEmberConfigRecommended[0].plugins, + files: filepaths, + rules: eslintPluginEmberConfigRecommended[2].rules, + }, + ]; }, playgroundURL: "https://ember-twiddle.com", documentationURL: "https://emberjs.com", @@ -205,7 +241,7 @@ const frameworks = [ isCurrentVersion: true, img: "framework/solid.svg", eslint: { - files: ["**/solid/*.jsx"], + files: ["content/**/solid/*.jsx"], plugins: ["solid"], extends: ["eslint:recommended", "plugin:solid/recommended"], }, @@ -224,7 +260,7 @@ const frameworks = [ isCurrentVersion: true, img: "framework/alpine.svg", eslint: { - files: ["**/alpine/**"], + files: ["content/**/alpine/**"], extends: ["eslint:recommended"], }, playgroundURL: "https://codesandbox.io/s/7br3q8", @@ -241,9 +277,38 @@ const frameworks = [ frameworkName: "Svelte", isCurrentVersion: false, img: "framework/svelte.svg", - eslint: { - files: ["**/TODO-THIS-IS-DISABLED-svelte5/*.svelte"], - parser: "svelte-eslint-parser", + async getEslintConfigs() { + const js = await importDefault("@eslint/js"); + const globalsBrowser = (await importDefault("globals")).browser; + const eslintPluginSvelte = await importDefault("eslint-plugin-svelte"); + const svelteParser = await importDefault("svelte-eslint-parser"); + + const eslintPluginSvelteConfig = + eslintPluginSvelte.configs["flat/recommended"]; + + return [ + { + ...eslintPluginSvelteConfig[1], + files: ["content/**/svelte5/**/*.svelte"], + plugins: eslintPluginSvelteConfig[0].plugins, + rules: eslintPluginSvelteConfig[2].rules, + }, + { + files: ["content/**/svelte5/**/*.svelte.js"], + languageOptions: { + parser: svelteParser, + }, + }, + { + files: ["content/**/svelte5/**/*.js"], + rules: js.configs.recommended.rules, + languageOptions: { + globals: { + ...globalsBrowser, + }, + }, + }, + ]; }, playgroundURL: "https://svelte-5-preview.vercel.app/", documentationURL: "https://svelte-5-preview.vercel.app/docs", @@ -259,15 +324,20 @@ const frameworks = [ frameworkName: "Ember", isCurrentVersion: false, img: "framework/ember.svg", - eslint: { - files: ["**/emberPolaris/**"], - plugins: ["ember"], - parser: "ember-eslint-parser", - extends: [ - "eslint:recommended", - "plugin:ember/recommended", - "plugin:ember/recommended-gjs", - ], + async getEslintConfigs() { + const filepaths = ["content/**/emberPolaris/**/*.{gjs,gts,js}"]; + const eslintPluginEmberConfigRecommended = await importDefault( + "eslint-plugin-ember/configs/recommended" + ); + + return [ + { + ...eslintPluginEmberConfigRecommended[1], + plugins: eslintPluginEmberConfigRecommended[0].plugins, + files: filepaths, + rules: eslintPluginEmberConfigRecommended[2].rules, + }, + ]; }, playgroundURL: "http://new.emberjs.com", documentationURL: "https://emberjs.com", @@ -289,7 +359,7 @@ const frameworks = [ es2021: true, node: true, }, - files: ["**/mithril/**"], + files: ["content/**/mithril/**"], extends: ["eslint:recommended"], }, playgroundURL: "https://codesandbox.io/s/q99qzov66", @@ -318,7 +388,7 @@ const frameworks = [ jsx: true, }, }, - files: ["**/aurelia2/**"], + files: ["content/**/aurelia2/**"], extends: ["eslint:recommended"], }, playgroundURL: @@ -353,7 +423,7 @@ const frameworks = [ jsx: true, }, }, - files: ["**/qwik/**"], + files: ["content/**/qwik/**"], extends: ["eslint:recommended", "plugin:qwik/recommended"], rules: { "qwik/valid-lexical-scope": "off", @@ -402,7 +472,7 @@ const frameworks = [ jsx: true, }, }, - files: ["**/aurelia1/**"], + files: ["content/**/aurelia1/**"], extends: ["eslint:recommended"], }, playgroundURL: "https://codesandbox.io/s/ppmy26opw7", @@ -429,4 +499,9 @@ export function matchFrameworkId(id) { ); } +async function importDefault(moduleName) { + const module = await import(moduleName); + return module.default; +} + export default frameworks; diff --git a/package.json b/package.json index e811da99..9f54a0e7 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,9 @@ "@babel/core": "^7.25.8", "@babel/eslint-parser": "^7.25.8", "@babel/plugin-proposal-decorators": "^7.25.7", - "@builder.io/qwik": "^1.9.1", - "@lit/context": "^1.1.3", + "@builder.io/qwik": "^1.9.0", + "@eslint/js": "^9.12.0", + "@lit/context": "^1.1.2", "@matschik/lz-string": "^0.0.2", "@shikijs/markdown-it": "^1.22.0", "@sveltejs/vite-plugin-svelte": "4.0.0-next.7", @@ -54,18 +55,18 @@ "codesandbox": "^2.2.3", "cypress": "^13.15.0", "ember-eslint-parser": "^0.5.2", - "eslint": "^8.57.1", + "eslint": "^9.12.0", "eslint-plugin-ember": "^12.2.1", "eslint-plugin-lit": "^1.15.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-qwik": "^1.9.1", "eslint-plugin-react": "^7.37.1", "eslint-plugin-solid": "^0.14.3", - "eslint-plugin-svelte": "^2.44.1", + "eslint-plugin-svelte": "2.36.0-next.13", "eslint-plugin-vue": "^9.28.0", - "esm": "^3.2.25", "eta": "^3.5.0", "folder-hash": "^4.0.4", + "globals": "^15.10.0", "html-minifier-terser": "^7.2.0", "husky": "^9.1.6", "lint-staged": "^15.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7a38ea2..ae2bef25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,13 +20,13 @@ importers: devDependencies: '@angular-eslint/eslint-plugin': specifier: ^18.3.1 - version: 18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + version: 18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@angular-eslint/eslint-plugin-template': specifier: ^18.3.1 - version: 18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + version: 18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@angular-eslint/template-parser': specifier: ^18.3.1 - version: 18.3.1(eslint@8.57.1)(typescript@5.6.3) + version: 18.3.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@angular/core': specifier: ^18.2.8 version: 18.2.8(rxjs@7.8.1)(zone.js@0.14.10) @@ -38,15 +38,18 @@ importers: version: 7.25.8 '@babel/eslint-parser': specifier: ^7.25.8 - version: 7.25.8(@babel/core@7.25.8)(eslint@8.57.1) + version: 7.25.8(@babel/core@7.25.8)(eslint@9.12.0(jiti@1.21.6)) '@babel/plugin-proposal-decorators': specifier: ^7.25.7 version: 7.25.7(@babel/core@7.25.8) '@builder.io/qwik': - specifier: ^1.9.1 + specifier: ^1.9.0 version: 1.9.1(@types/node@22.7.5)(terser@5.34.1) + '@eslint/js': + specifier: ^9.12.0 + version: 9.12.0 '@lit/context': - specifier: ^1.1.3 + specifier: ^1.1.2 version: 1.1.3 '@matschik/lz-string': specifier: ^0.0.2 @@ -62,10 +65,10 @@ importers: version: 3.0.0-next.3(@sveltejs/vite-plugin-svelte@4.0.0-next.7(svelte@5.0.0-next.262)(vite@5.4.8(@types/node@22.7.5)(terser@5.34.1)))(svelte@5.0.0-next.262)(vite@5.4.8(@types/node@22.7.5)(terser@5.34.1)) '@typescript-eslint/eslint-plugin': specifier: ^8.8.1 - version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) + version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@typescript-eslint/parser': specifier: ^8.8.1 - version: 8.8.1(eslint@8.57.1)(typescript@5.6.3) + version: 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@unocss/preset-icons': specifier: ^0.63.4 version: 0.63.4 @@ -98,43 +101,43 @@ importers: version: 13.15.0 ember-eslint-parser: specifier: ^0.5.2 - version: 0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) + version: 0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6)) eslint: - specifier: ^8.57.1 - version: 8.57.1 + specifier: ^9.12.0 + version: 9.12.0(jiti@1.21.6) eslint-plugin-ember: specifier: ^12.2.1 - version: 12.2.1(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) + version: 12.2.1(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6)) eslint-plugin-lit: specifier: ^1.15.0 - version: 1.15.0(eslint@8.57.1) + version: 1.15.0(eslint@9.12.0(jiti@1.21.6)) eslint-plugin-prettier: specifier: ^5.2.1 - version: 5.2.1(eslint@8.57.1)(prettier@3.3.3) + version: 5.2.1(eslint@9.12.0(jiti@1.21.6))(prettier@3.3.3) eslint-plugin-qwik: specifier: ^1.9.1 - version: 1.9.1(eslint@8.57.1) + version: 1.9.1(eslint@9.12.0(jiti@1.21.6)) eslint-plugin-react: specifier: ^7.37.1 - version: 7.37.1(eslint@8.57.1) + version: 7.37.1(eslint@9.12.0(jiti@1.21.6)) eslint-plugin-solid: specifier: ^0.14.3 - version: 0.14.3(eslint@8.57.1)(typescript@5.6.3) + version: 0.14.3(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) eslint-plugin-svelte: - specifier: ^2.44.1 - version: 2.44.1(eslint@8.57.1)(svelte@5.0.0-next.262) + specifier: 2.36.0-next.13 + version: 2.36.0-next.13(eslint@9.12.0(jiti@1.21.6))(svelte@5.0.0-next.262) eslint-plugin-vue: specifier: ^9.28.0 - version: 9.28.0(eslint@8.57.1) - esm: - specifier: ^3.2.25 - version: 3.2.25 + version: 9.28.0(eslint@9.12.0(jiti@1.21.6)) eta: specifier: ^3.5.0 version: 3.5.0 folder-hash: specifier: ^4.0.4 version: 4.0.4 + globals: + specifier: ^15.10.0 + version: 15.11.0 html-minifier-terser: specifier: ^7.2.0 version: 7.2.0 @@ -728,13 +731,29 @@ packages: resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.1.0': + resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.12.0': + resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.2.0': + resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@glimmer/env@0.1.7': resolution: {integrity: sha512-JKF/a9I9jw6fGoz8kA7LEQslrwJ5jms5CXhu/aqkBWk+PmZ6pTl8mlb/eJ/5ujBGTiQzBhy5AIWF712iA+4/mw==} @@ -760,18 +779,21 @@ packages: '@hapi/topo@5.1.0': resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@humanfs/core@0.19.0': + resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.5': + resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + engines: {node: '>=18.18.0'} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} + engines: {node: '>=18.18'} '@iconify-json/heroicons@1.2.1': resolution: {integrity: sha512-TkKfS5U27kE5MXmSGLzPoz95BP5VA9xEJXwJFwmPMVLX+xyWq0OkoiWTUXB0uAoQODpb8BaRpzSydItrq9fIRA==} @@ -981,6 +1003,9 @@ packages: '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/keyv@3.1.4': resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} @@ -1829,10 +1854,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dom-serializer@1.4.1: resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==} @@ -2045,12 +2066,12 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-svelte@2.44.1: - resolution: {integrity: sha512-w6wkoJPw1FJKFtM/2oln21rlu5+HTd2CSkkzhm32A+trNoW2EYQqTQAbDTU6k2GI/6Vh64rBHYQejqEgDld7fw==} + eslint-plugin-svelte@2.36.0-next.13: + resolution: {integrity: sha512-N4bLGdFkGbbAQiKvX17kLfBgnZ+Em00khOY3AReppO7fkP9jaSxwjdgTCcWf+Q5/uZWor58g4GleRqHcb2Dk2w==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0-0 || ^9.0.0-0 - svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.191 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0-next.73 peerDependenciesMeta: svelte: optional: true @@ -2087,18 +2108,26 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.12.0: + resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true esm-env@1.0.0: resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} - esm@3.2.25: - resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==} - engines: {node: '>=6'} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} @@ -2225,9 +2254,9 @@ packages: resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} engines: {node: '>=8'} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} file-name@0.1.0: resolution: {integrity: sha512-Q8SskhjF4eUk/xoQkmubwLkoHwOTv6Jj/WGtOVLKkZ0vvM+LipkSXugkn1F/+mjWXU32AXLZB3qaz0arUzgtRw==} @@ -2264,9 +2293,9 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -2447,6 +2476,14 @@ packages: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.11.0: + resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2940,9 +2977,6 @@ packages: known-css-properties@0.30.0: resolution: {integrity: sha512-VSWXYUnsPu9+WYKkfmJyLKtIvaRJi1kXUqVmBACORXZQxT5oZDsoZ2vQP+bQFDnWtpI/4eq3MLoRMjI2fnLzTQ==} - known-css-properties@0.34.0: - resolution: {integrity: sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==} - kolorist@1.8.0: resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} @@ -3751,11 +3785,6 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.24.0: resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4496,36 +4525,36 @@ snapshots: '@angular-eslint/bundled-angular-compiler@18.3.1': {} - '@angular-eslint/eslint-plugin-template@18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@angular-eslint/eslint-plugin-template@18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@angular-eslint/bundled-angular-compiler': 18.3.1 - '@angular-eslint/utils': 18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@angular-eslint/utils': 18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) aria-query: 5.3.0 axobject-query: 4.1.0 - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) typescript: 5.6.3 - '@angular-eslint/eslint-plugin@18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@angular-eslint/eslint-plugin@18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@angular-eslint/bundled-angular-compiler': 18.3.1 - '@angular-eslint/utils': 18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) - eslint: 8.57.1 + '@angular-eslint/utils': 18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + eslint: 9.12.0(jiti@1.21.6) typescript: 5.6.3 - '@angular-eslint/template-parser@18.3.1(eslint@8.57.1)(typescript@5.6.3)': + '@angular-eslint/template-parser@18.3.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@angular-eslint/bundled-angular-compiler': 18.3.1 - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) eslint-scope: 8.1.0 typescript: 5.6.3 - '@angular-eslint/utils@18.3.1(@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@angular-eslint/utils@18.3.1(@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@angular-eslint/bundled-angular-compiler': 18.3.1 - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) - eslint: 8.57.1 + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + eslint: 9.12.0(jiti@1.21.6) typescript: 5.6.3 '@angular/core@18.2.8(rxjs@7.8.1)(zone.js@0.14.10)': @@ -4626,11 +4655,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/eslint-parser@7.25.8(@babel/core@7.25.8)(eslint@8.57.1)': + '@babel/eslint-parser@7.25.8(@babel/core@7.25.8)(eslint@9.12.0(jiti@1.21.6))': dependencies: '@babel/core': 7.25.8 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) eslint-visitor-keys: 2.1.0 semver: 6.3.1 @@ -4967,19 +4996,29 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.12.0(jiti@1.21.6))': dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.1': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.18.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7(supports-color@8.1.1) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + + '@eslint/core@0.6.0': {} + + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.7(supports-color@8.1.1) - espree: 9.6.1 - globals: 13.24.0 + espree: 10.2.0 + globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -4988,7 +5027,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.1': {} + '@eslint/js@9.12.0': {} + + '@eslint/object-schema@2.1.4': {} + + '@eslint/plugin-kit@0.2.0': + dependencies: + levn: 0.4.1 '@glimmer/env@0.1.7': {} @@ -5022,17 +5067,16 @@ snapshots: dependencies: '@hapi/hoek': 9.3.0 - '@humanwhocodes/config-array@0.13.0': + '@humanfs/core@0.19.0': {} + + '@humanfs/node@0.16.5': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7(supports-color@8.1.1) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@humanfs/core': 0.19.0 + '@humanwhocodes/retry': 0.3.1 '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.1': {} '@iconify-json/heroicons@1.2.1': dependencies: @@ -5237,6 +5281,8 @@ snapshots: dependencies: '@types/unist': 3.0.3 + '@types/json-schema@7.0.15': {} + '@types/keyv@3.1.4': dependencies: '@types/node': 22.7.5 @@ -5266,15 +5312,15 @@ snapshots: '@types/node': 22.7.5 optional: true - '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.8.1 - '@typescript-eslint/type-utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.8.1 - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -5284,14 +5330,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.8.1 '@typescript-eslint/types': 8.8.1 '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.8.1 debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -5302,10 +5348,10 @@ snapshots: '@typescript-eslint/types': 8.8.1 '@typescript-eslint/visitor-keys': 8.8.1 - '@typescript-eslint/type-utils@8.8.1(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) debug: 4.3.7(supports-color@8.1.1) ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -5331,13 +5377,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.8.1(eslint@8.57.1)(typescript@5.6.3)': + '@typescript-eslint/utils@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@1.21.6)) '@typescript-eslint/scope-manager': 8.8.1 '@typescript-eslint/types': 8.8.1 '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript @@ -6308,10 +6354,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dom-serializer@1.4.1: dependencies: domelementtype: 2.3.0 @@ -6370,16 +6412,16 @@ snapshots: electron-to-chromium@1.5.36: {} - ember-eslint-parser@0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): + ember-eslint-parser@0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6)): dependencies: '@babel/core': 7.25.8 - '@babel/eslint-parser': 7.25.8(@babel/core@7.25.8)(eslint@8.57.1) + '@babel/eslint-parser': 7.25.8(@babel/core@7.25.8)(eslint@9.12.0(jiti@1.21.6)) '@glimmer/syntax': 0.92.3 content-tag: 2.0.2 eslint-scope: 7.2.2 html-tags: 3.3.1 optionalDependencies: - '@typescript-eslint/parser': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) transitivePeerDependencies: - eslint @@ -6569,49 +6611,49 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@8.57.1): + eslint-compat-utils@0.5.1(eslint@9.12.0(jiti@1.21.6)): dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) semver: 7.6.3 - eslint-plugin-ember@12.2.1(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1): + eslint-plugin-ember@12.2.1(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6)): dependencies: '@ember-data/rfc395-data': 0.0.4 css-tree: 2.3.1 - ember-eslint-parser: 0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1) + ember-eslint-parser: 0.5.2(@babel/core@7.25.8)(@typescript-eslint/parser@8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3))(eslint@9.12.0(jiti@1.21.6)) ember-rfc176-data: 0.3.18 - eslint: 8.57.1 - eslint-utils: 3.0.0(eslint@8.57.1) + eslint: 9.12.0(jiti@1.21.6) + eslint-utils: 3.0.0(eslint@9.12.0(jiti@1.21.6)) estraverse: 5.3.0 lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 requireindex: 1.2.0 snake-case: 3.0.4 optionalDependencies: - '@typescript-eslint/parser': 8.8.1(eslint@8.57.1)(typescript@5.6.3) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) transitivePeerDependencies: - '@babel/core' - eslint-plugin-lit@1.15.0(eslint@8.57.1): + eslint-plugin-lit@1.15.0(eslint@9.12.0(jiti@1.21.6)): dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) parse5: 6.0.1 parse5-htmlparser2-tree-adapter: 6.0.1 requireindex: 1.2.0 - eslint-plugin-prettier@5.2.1(eslint@8.57.1)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(eslint@9.12.0(jiti@1.21.6))(prettier@3.3.3): dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 - eslint-plugin-qwik@1.9.1(eslint@8.57.1): + eslint-plugin-qwik@1.9.1(eslint@9.12.0(jiti@1.21.6)): dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) jsx-ast-utils: 3.3.5 - eslint-plugin-react@7.37.1(eslint@8.57.1): + eslint-plugin-react@7.37.1(eslint@9.12.0(jiti@1.21.6)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -6619,7 +6661,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.1.0 - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -6633,10 +6675,10 @@ snapshots: string.prototype.matchall: 4.0.11 string.prototype.repeat: 1.0.0 - eslint-plugin-solid@0.14.3(eslint@8.57.1)(typescript@5.6.3): + eslint-plugin-solid@0.14.3(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3): dependencies: - '@typescript-eslint/utils': 8.8.1(eslint@8.57.1)(typescript@5.6.3) - eslint: 8.57.1 + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0(jiti@1.21.6))(typescript@5.6.3) + eslint: 9.12.0(jiti@1.21.6) estraverse: 5.3.0 is-html: 2.0.0 kebab-case: 1.0.2 @@ -6646,14 +6688,15 @@ snapshots: - supports-color - typescript - eslint-plugin-svelte@2.44.1(eslint@8.57.1)(svelte@5.0.0-next.262): + eslint-plugin-svelte@2.36.0-next.13(eslint@9.12.0(jiti@1.21.6))(svelte@5.0.0-next.262): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@1.21.6)) '@jridgewell/sourcemap-codec': 1.5.0 - eslint: 8.57.1 - eslint-compat-utils: 0.5.1(eslint@8.57.1) + debug: 4.3.7(supports-color@8.1.1) + eslint: 9.12.0(jiti@1.21.6) + eslint-compat-utils: 0.5.1(eslint@9.12.0(jiti@1.21.6)) esutils: 2.0.3 - known-css-properties: 0.34.0 + known-css-properties: 0.30.0 postcss: 8.4.47 postcss-load-config: 3.1.4(postcss@8.4.47) postcss-safe-parser: 6.0.0(postcss@8.4.47) @@ -6663,18 +6706,19 @@ snapshots: optionalDependencies: svelte: 5.0.0-next.262 transitivePeerDependencies: + - supports-color - ts-node - eslint-plugin-vue@9.28.0(eslint@8.57.1): + eslint-plugin-vue@9.28.0(eslint@9.12.0(jiti@1.21.6)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - eslint: 8.57.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@1.21.6)) + eslint: 9.12.0(jiti@1.21.6) globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.6.3 - vue-eslint-parser: 9.4.3(eslint@8.57.1) + vue-eslint-parser: 9.4.3(eslint@9.12.0(jiti@1.21.6)) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -6694,61 +6738,66 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-utils@3.0.0(eslint@8.57.1): + eslint-utils@3.0.0(eslint@9.12.0(jiti@1.21.6)): dependencies: - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) eslint-visitor-keys: 2.1.0 eslint-visitor-keys@2.1.0: {} eslint-visitor-keys@3.4.3: {} - eslint@8.57.1: + eslint-visitor-keys@4.1.0: {} + + eslint@9.12.0(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0(jiti@1.21.6)) '@eslint-community/regexpp': 4.11.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 + '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.12.0 + '@eslint/plugin-kit': 0.2.0 + '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 + '@humanwhocodes/retry': 0.3.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.7(supports-color@8.1.1) - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - strip-ansi: 6.0.1 text-table: 0.2.0 + optionalDependencies: + jiti: 1.21.6 transitivePeerDependencies: - supports-color esm-env@1.0.0: {} - esm@3.2.25: {} + espree@10.2.0: + dependencies: + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) + eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: @@ -6907,9 +6956,9 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 file-name@0.1.0: {} @@ -6944,11 +6993,10 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -7145,6 +7193,10 @@ snapshots: dependencies: type-fest: 0.20.2 + globals@14.0.0: {} + + globals@15.11.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -7625,8 +7677,6 @@ snapshots: known-css-properties@0.30.0: {} - known-css-properties@0.34.0: {} - kolorist@1.8.0: {} latest-version@3.1.0: @@ -8502,10 +8552,6 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.24.0: dependencies: '@types/estree': 1.0.6 @@ -9228,10 +9274,10 @@ snapshots: optionalDependencies: vite: 5.4.8(@types/node@22.7.5)(terser@5.34.1) - vue-eslint-parser@9.4.3(eslint@8.57.1): + vue-eslint-parser@9.4.3(eslint@9.12.0(jiti@1.21.6)): dependencies: debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.1 + eslint: 9.12.0(jiti@1.21.6) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 From db4f6dd7c59614b01b3e4958c1dffaac49224a15 Mon Sep 17 00:00:00 2001 From: Mathieu Schimmerling Date: Fri, 11 Oct 2024 01:45:43 +0200 Subject: [PATCH 2/3] refactor(lint): move eslint configs from frameworks config to eslint config js --- eslint.config.js | 130 ++++++++++++++++++++++++++++++++++++++++++++++- frameworks.mjs | 102 +------------------------------------ 2 files changed, 129 insertions(+), 103 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index ba5c9919..b039a8f9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,11 +1,137 @@ import FRAMEWORKS from "./frameworks.mjs"; +async function importDefault(moduleName) { + const module = await import(moduleName); + return module.default; +} + +const getEslintConfigsByFrameworkId = new Map([ + [ + "svelte4", + async ({ contentFilesPath }) => { + const js = await importDefault("@eslint/js"); + const svelteParser = await importDefault("svelte-eslint-parser"); + const globalsBrowser = (await importDefault("globals")).browser; + + return [ + { + files: [`${contentFilesPath}.svelte`], + languageOptions: { + parser: svelteParser, + }, + }, + { + files: [`${contentFilesPath}.js`], + rules: js.configs.recommended.rules, + languageOptions: { + globals: { + ...globalsBrowser, + }, + }, + }, + ]; + }, + ], + [ + "lit", + async ({ contentFilesPath }) => { + const { configs } = await import("eslint-plugin-lit"); + const babelParser = await importDefault("@babel/eslint-parser"); + + return [ + { + ...configs["flat/recommended"], + files: [`${contentFilesPath}.js`], + languageOptions: { + parser: babelParser, + }, + }, + ]; + }, + ], + [ + "emberOctane", + async ({ contentFilesPath }) => { + const eslintPluginEmberConfigRecommended = await importDefault( + "eslint-plugin-ember/configs/recommended" + ); + + return [ + { + ...eslintPluginEmberConfigRecommended[1], + plugins: eslintPluginEmberConfigRecommended[0].plugins, + files: [`${contentFilesPath}.js`], + rules: eslintPluginEmberConfigRecommended[2].rules, + }, + ]; + }, + ], + [ + "svelte5", + async ({ contentFilesPath }) => { + const js = await importDefault("@eslint/js"); + const globalsBrowser = (await importDefault("globals")).browser; + const eslintPluginSvelte = await importDefault("eslint-plugin-svelte"); + const svelteParser = await importDefault("svelte-eslint-parser"); + + const eslintPluginSvelteConfig = + eslintPluginSvelte.configs["flat/recommended"]; + + return [ + { + ...eslintPluginSvelteConfig[1], + files: [`${contentFilesPath}.svelte`], + plugins: eslintPluginSvelteConfig[0].plugins, + rules: eslintPluginSvelteConfig[2].rules, + }, + { + files: [`${contentFilesPath}.svelte.js`], + languageOptions: { + parser: svelteParser, + }, + }, + { + files: [`${contentFilesPath}.js`], + rules: js.configs.recommended.rules, + languageOptions: { + globals: { + ...globalsBrowser, + }, + }, + }, + ]; + }, + ], + [ + "emberPolaris", + async ({ contentFilesPath }) => { + const eslintPluginEmberConfigRecommended = await importDefault( + "eslint-plugin-ember/configs/recommended" + ); + + return [ + { + ...eslintPluginEmberConfigRecommended[1], + plugins: eslintPluginEmberConfigRecommended[0].plugins, + files: [`${contentFilesPath}.{gjs,gts,js}`], + rules: eslintPluginEmberConfigRecommended[2].rules, + }, + ]; + }, + ], +]); + /** @type {import('eslint').Linter.Config[]} */ const config = ( await Promise.all( - FRAMEWORKS.map(({ getEslintConfigs }) => { + FRAMEWORKS.map(({ id }) => { + const getEslintConfigs = getEslintConfigsByFrameworkId.get(id); if (typeof getEslintConfigs === "function") { - return getEslintConfigs(); + return getEslintConfigs({ + contentFilesPath: `content/**/${id}/**/*`, + }); + } else { + console.warn(`[eslint] config missing for framework id '${id}'`); } }).filter(Boolean) ) diff --git a/frameworks.mjs b/frameworks.mjs index 5ba8b960..75ea7736 100644 --- a/frameworks.mjs +++ b/frameworks.mjs @@ -15,29 +15,6 @@ const frameworks = [ frameworkName: "Svelte", isCurrentVersion: true, img: "framework/svelte.svg", - async getEslintConfigs() { - const js = await importDefault("@eslint/js"); - const svelteParser = await importDefault("svelte-eslint-parser"); - const globalsBrowser = (await importDefault("globals")).browser; - - return [ - { - files: ["content/**/svelte4/**/*.svelte"], - languageOptions: { - parser: svelteParser, - }, - }, - { - files: ["content/**/svelte4/**/*.js"], - rules: js.configs.recommended.rules, - languageOptions: { - globals: { - ...globalsBrowser, - }, - }, - }, - ]; - }, playgroundURL: "https://svelte.dev/repl", documentationURL: "https://svelte.dev/", filesSorter(files) { @@ -161,20 +138,6 @@ const frameworks = [ frameworkName: "Lit", isCurrentVersion: true, img: "framework/lit.svg", - async getEslintConfigs() { - const { configs } = await import("eslint-plugin-lit"); - const babelParser = await importDefault("@babel/eslint-parser"); - - return [ - { - ...configs["flat/recommended"], - files: ["content/**/lit/**.js"], - languageOptions: { - parser: babelParser, - }, - }, - ]; - }, playgroundURL: "https://lit.dev/playground", documentationURL: "https://lit.dev", filesSorter(files) { @@ -211,21 +174,6 @@ const frameworks = [ frameworkName: "Ember", isCurrentVersion: true, img: "framework/ember.svg", - async getEslintConfigs() { - const filepaths = ["content/**/emberOctane/**/*.js"]; - const eslintPluginEmberConfigRecommended = await importDefault( - "eslint-plugin-ember/configs/recommended" - ); - - return [ - { - ...eslintPluginEmberConfigRecommended[1], - plugins: eslintPluginEmberConfigRecommended[0].plugins, - files: filepaths, - rules: eslintPluginEmberConfigRecommended[2].rules, - }, - ]; - }, playgroundURL: "https://ember-twiddle.com", documentationURL: "https://emberjs.com", filesSorter(files) { @@ -277,39 +225,6 @@ const frameworks = [ frameworkName: "Svelte", isCurrentVersion: false, img: "framework/svelte.svg", - async getEslintConfigs() { - const js = await importDefault("@eslint/js"); - const globalsBrowser = (await importDefault("globals")).browser; - const eslintPluginSvelte = await importDefault("eslint-plugin-svelte"); - const svelteParser = await importDefault("svelte-eslint-parser"); - - const eslintPluginSvelteConfig = - eslintPluginSvelte.configs["flat/recommended"]; - - return [ - { - ...eslintPluginSvelteConfig[1], - files: ["content/**/svelte5/**/*.svelte"], - plugins: eslintPluginSvelteConfig[0].plugins, - rules: eslintPluginSvelteConfig[2].rules, - }, - { - files: ["content/**/svelte5/**/*.svelte.js"], - languageOptions: { - parser: svelteParser, - }, - }, - { - files: ["content/**/svelte5/**/*.js"], - rules: js.configs.recommended.rules, - languageOptions: { - globals: { - ...globalsBrowser, - }, - }, - }, - ]; - }, playgroundURL: "https://svelte-5-preview.vercel.app/", documentationURL: "https://svelte-5-preview.vercel.app/docs", filesSorter(files) { @@ -324,21 +239,6 @@ const frameworks = [ frameworkName: "Ember", isCurrentVersion: false, img: "framework/ember.svg", - async getEslintConfigs() { - const filepaths = ["content/**/emberPolaris/**/*.{gjs,gts,js}"]; - const eslintPluginEmberConfigRecommended = await importDefault( - "eslint-plugin-ember/configs/recommended" - ); - - return [ - { - ...eslintPluginEmberConfigRecommended[1], - plugins: eslintPluginEmberConfigRecommended[0].plugins, - files: filepaths, - rules: eslintPluginEmberConfigRecommended[2].rules, - }, - ]; - }, playgroundURL: "http://new.emberjs.com", documentationURL: "https://emberjs.com", filesSorter(files) { @@ -500,7 +400,7 @@ export function matchFrameworkId(id) { } async function importDefault(moduleName) { - const module = await import(moduleName); + const module = await import(/* @vite-ignore */ moduleName); return module.default; } From b95358642ad063c662149e30230018a488ae6b98 Mon Sep 17 00:00:00 2001 From: Mathieu Schimmerling Date: Fri, 11 Oct 2024 03:34:17 +0200 Subject: [PATCH 3/3] style(eslint9): add solid, mithril, angular, react, aurelia, vue, qwik eslint configs --- .../2-templating/2-styling/vue2/CssStyle.vue | 8 +- .../2-templating/2-styling/vue3/CssStyle.vue | 8 +- .../4-event-click/vue2/Counter.vue | 4 +- .../4-event-click/vue3/Counter.vue | 4 +- .../6-conditional/vue2/TrafficLight.vue | 4 +- .../6-conditional/vue3/TrafficLight.vue | 4 +- .../3-lifecycle/2-on-unmount/aurelia1/time.ts | 4 +- .../1-props/angular/userprofile.component.ts | 6 +- .../2-emit-to-parent/vue2/AnswerButton.vue | 8 +- .../2-emit-to-parent/vue3/AnswerButton.vue | 8 +- .../1-render-app/qwik/app.tsx | 2 +- .../2-fetch-data/angular/user.service.ts | 2 +- .../2-fetch-data/angular/users.component.ts | 1 - .../2-fetch-data/aurelia2/app.ts | 1 - .../2-fetch-data/vue2/App.vue | 8 +- .../2-fetch-data/vue3/App.vue | 8 +- eslint.config.js | 251 +++++++++++++++++- frameworks.mjs | 31 --- package.json | 3 +- pnpm-lock.yaml | 232 +++++++++++++++- 20 files changed, 535 insertions(+), 62 deletions(-) diff --git a/content/2-templating/2-styling/vue2/CssStyle.vue b/content/2-templating/2-styling/vue2/CssStyle.vue index 4fa118f6..6cf3e269 100644 --- a/content/2-templating/2-styling/vue2/CssStyle.vue +++ b/content/2-templating/2-styling/vue2/CssStyle.vue @@ -1,7 +1,11 @@ diff --git a/content/2-templating/2-styling/vue3/CssStyle.vue b/content/2-templating/2-styling/vue3/CssStyle.vue index 7954f6bb..dbda3daf 100644 --- a/content/2-templating/2-styling/vue3/CssStyle.vue +++ b/content/2-templating/2-styling/vue3/CssStyle.vue @@ -1,6 +1,10 @@