35 lines
1 KiB
JavaScript
35 lines
1 KiB
JavaScript
import globals from "globals";
|
|
import pluginJs from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
import eslintConfigPrettier from "eslint-config-prettier";
|
|
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
|
|
import eslintPluginSvelte from "eslint-plugin-svelte";
|
|
import svelteConfig from "./svelte.config.js";
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
{ files: ["**/*.{js,mjs,cjs,ts}"] },
|
|
{ languageOptions: { globals: globals.browser } },
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
eslintConfigPrettier,
|
|
eslintPluginPrettierRecommended,
|
|
...eslintPluginSvelte.configs["flat/recommended"],
|
|
...eslintPluginSvelte.configs["flat/prettier"],
|
|
{
|
|
files: [
|
|
"**/*.svelte",
|
|
"*.svelte",
|
|
"**/*.svelte.ts",
|
|
"*.svelte.ts",
|
|
// "**/*.svelte.js",
|
|
// "*.svelte.js",
|
|
],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
// Specify the `svelte.config.js`.
|
|
svelteConfig,
|
|
},
|
|
},
|
|
},
|
|
];
|