42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import explicitTypes from "eslint-plugin-explicit-types";
|
|
import importStructure from "eslint-plugin-import-structure";
|
|
import { defineConfig } from "vite-plus";
|
|
|
|
import projectLint from "./scripts/project-lint.ts";
|
|
|
|
export default defineConfig({
|
|
lint: {
|
|
plugins: ["typescript", "unicorn", "oxc", "import"],
|
|
jsPlugins: [
|
|
"eslint-plugin-explicit-types",
|
|
"eslint-plugin-import-structure",
|
|
"./scripts/project-lint.ts",
|
|
],
|
|
categories: {
|
|
correctness: "error",
|
|
suspicious: "error",
|
|
pedantic: "error",
|
|
perf: "error",
|
|
style: "error",
|
|
restriction: "error",
|
|
},
|
|
rules: {
|
|
...explicitTypes.configs.all.rules,
|
|
...importStructure.configs.all.rules,
|
|
...projectLint.configs.project.rules,
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ["vite.config.ts", "scripts/**"],
|
|
rules: projectLint.configs.node.rules,
|
|
},
|
|
],
|
|
options: {
|
|
typeAware: true,
|
|
typeCheck: true,
|
|
maxWarnings: 0,
|
|
reportUnusedDisableDirectives: "error",
|
|
},
|
|
},
|
|
});
|