mirror of
https://github.com/lainbo/component-party.git
synced 2026-04-04 20:39:02 +08:00
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import prettier from "eslint-config-prettier";
|
|
import js from "@eslint/js";
|
|
import { includeIgnoreFile } from "@eslint/compat";
|
|
import svelte from "eslint-plugin-svelte";
|
|
import globals from "globals";
|
|
import { fileURLToPath } from "node:url";
|
|
import ts from "typescript-eslint";
|
|
import svelteConfig from "./svelte.config";
|
|
import oxlint from "eslint-plugin-oxlint";
|
|
|
|
const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));
|
|
|
|
export default [
|
|
{
|
|
ignores: ["content/**"],
|
|
},
|
|
includeIgnoreFile(gitignorePath),
|
|
js.configs.recommended,
|
|
...ts.configs.recommended,
|
|
...svelte.configs.recommended,
|
|
prettier,
|
|
...svelte.configs["flat/prettier"],
|
|
{
|
|
languageOptions: {
|
|
globals: {
|
|
...globals.browser,
|
|
...globals.node,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
|
|
ignores: ["eslint.config.js", "svelte.config.js"],
|
|
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
extraFileExtensions: [".svelte"],
|
|
parser: ts.parser,
|
|
svelteConfig,
|
|
},
|
|
},
|
|
},
|
|
...oxlint.buildFromOxlintConfigFile("./.oxlintrc.json"),
|
|
];
|