46 lines
1.2 KiB
TypeScript
46 lines
1.2 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",
|
|
nursery: "off",
|
|
},
|
|
rules: {
|
|
...explicitTypes.configs.concrete.rules,
|
|
...explicitTypes.configs.naming.rules,
|
|
...explicitTypes.configs.absence.rules,
|
|
...importStructure.configs.modules.rules,
|
|
...projectLint.configs.project.rules,
|
|
},
|
|
overrides: [
|
|
{
|
|
// Vite+ and Oxlint load these through their default export.
|
|
files: ["vite.config.ts", "scripts/project-lint.ts"],
|
|
rules: { "import/no-default-export": "off" },
|
|
},
|
|
],
|
|
options: {
|
|
typeAware: true,
|
|
typeCheck: true,
|
|
maxWarnings: 0,
|
|
reportUnusedDisableDirectives: "error",
|
|
},
|
|
},
|
|
});
|