From ee25adc8c88d96d7b424e355b393726eacc59e2b Mon Sep 17 00:00:00 2001 From: Theodore Brown Date: Thu, 26 Sep 2024 22:46:35 -0500 Subject: [PATCH] Update ESLint config to match latest version from create-svelte See https://github.com/sveltejs/kit/pull/12721 --- eslint.config.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 4c52f61..23c27ca 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,12 +1,12 @@ -import js from "@eslint/js"; -import ts from "typescript-eslint"; -import svelte from "eslint-plugin-svelte"; +import eslint from "@eslint/js"; import prettier from "eslint-config-prettier"; +import svelte from "eslint-plugin-svelte"; import globals from "globals"; -/** @type {import('eslint').Linter.Config[]} */ -export default [ - js.configs.recommended, - ...ts.configs.recommended, +import tseslint from "typescript-eslint"; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, ...svelte.configs["flat/recommended"], prettier, ...svelte.configs["flat/prettier"], @@ -22,11 +22,11 @@ export default [ files: ["**/*.svelte"], languageOptions: { parserOptions: { - parser: ts.parser, + parser: tseslint.parser, }, }, rules: { "svelte/no-inline-styles": "error", }, }, -]; +);