mirror of
https://github.com/halo-dev/halo.git
synced 2025-12-20 16:44:38 +08:00
#### What type of PR is this? /area ui /kind cleanup #### What this PR does / why we need it: Upgrade dev dependencies versions #### Does this PR introduce a user-facing change? ```release-note None ```
69 lines
1.7 KiB
TypeScript
69 lines
1.7 KiB
TypeScript
import pluginVitest from "@vitest/eslint-plugin";
|
|
import skipFormatting from "@vue/eslint-config-prettier/skip-formatting";
|
|
import {
|
|
defineConfigWithVueTs,
|
|
vueTsConfigs,
|
|
} from "@vue/eslint-config-typescript";
|
|
import { Linter } from "eslint";
|
|
import eslintPluginUnicorn from "eslint-plugin-unicorn";
|
|
import pluginVue from "eslint-plugin-vue";
|
|
|
|
export default defineConfigWithVueTs(
|
|
{
|
|
name: "app/global-ignores",
|
|
ignores: [
|
|
"**/dist/**",
|
|
"**/node_modules/**",
|
|
"packages/api-client/src/",
|
|
// TODO: Remove this in the future, only for compatibility.
|
|
"packages/console-shared/**",
|
|
"packages/components/storybook-static/**",
|
|
"**/build/**",
|
|
],
|
|
},
|
|
|
|
pluginVue.configs["flat/recommended"],
|
|
vueTsConfigs.recommended,
|
|
|
|
{
|
|
name: "app/base",
|
|
files: ["**/*.{ts,mts,tsx,vue}"],
|
|
plugins: {
|
|
unicorn: eslintPluginUnicorn,
|
|
},
|
|
rules: {
|
|
"vue/multi-word-component-names": 0,
|
|
"@typescript-eslint/ban-ts-comment": 0,
|
|
"vue/no-v-html": 0,
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
args: "all",
|
|
argsIgnorePattern: "^_",
|
|
caughtErrors: "all",
|
|
caughtErrorsIgnorePattern: "^_",
|
|
destructuredArrayIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
ignoreRestSiblings: true,
|
|
},
|
|
],
|
|
"unicorn/prefer-node-protocol": "warn",
|
|
},
|
|
},
|
|
|
|
{
|
|
name: "app/config-files",
|
|
files: ["**/*.config.{js,cjs}"],
|
|
rules: {
|
|
"@typescript-eslint/no-require-imports": "off",
|
|
},
|
|
},
|
|
|
|
{
|
|
...pluginVitest.configs.recommended,
|
|
files: ["**/__tests__/*"],
|
|
},
|
|
|
|
skipFormatting
|
|
) as Linter.Config;
|