42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import explicitTypes from "eslint-plugin-explicit-types";
|
|
import importStructure from "eslint-plugin-import-structure";
|
|
import { defineConfig } from "vite-plus";
|
|
|
|
import projectLint, { projectOverrides } from "./scripts/project-lint.ts";
|
|
|
|
export default defineConfig({
|
|
fmt: {
|
|
printWidth: 80,
|
|
quoteProps: "preserve",
|
|
embeddedLanguageFormatting: "off",
|
|
},
|
|
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: projectOverrides,
|
|
options: {
|
|
typeAware: true,
|
|
typeCheck: true,
|
|
maxWarnings: 0,
|
|
reportUnusedDisableDirectives: "error",
|
|
},
|
|
},
|
|
});
|