mirror of
https://github.com/xwberry/obsidian-drag-out.git
synced 2026-07-22 06:54:07 +00:00
chore(eslint): add ESLint config for TypeScript and obsidianmd plugin
This commit is contained in:
parent
4697b9e79c
commit
32c3dd66af
1 changed files with 31 additions and 0 deletions
31
eslint.config.mjs
Normal file
31
eslint.config.mjs
Normal 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.",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
Loading…
Reference in a new issue