chore(eslint): add ESLint config for TypeScript and obsidianmd plugin

This commit is contained in:
xberry1231 2026-04-26 18:30:50 -04:00
parent 4697b9e79c
commit 32c3dd66af

31
eslint.config.mjs Normal file
View file

@ -0,0 +1,31 @@
import tsparser from "@typescript-eslint/parser";
import obsidianmd from "eslint-plugin-obsidianmd";
export default [
{
ignores: ["dist/**", "main.js", "node_modules/**"],
},
...obsidianmd.configs.recommended,
{
files: ["**/*.ts"],
languageOptions: {
parser: tsparser,
parserOptions: {
project: "./tsconfig.json",
},
},
rules: {
"no-console": [
"error",
{ allow: ["warn", "error", "debug"] },
],
"no-restricted-syntax": [
"error",
{
selector: "TSAnyKeyword",
message: "Unexpected any. Specify a different type.",
},
],
},
},
];