Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "unicorn", "oxc", "import"],
"jsPlugins": ["eslint-plugin-obsidianmd"],
"categories": {
"correctness": "error"
},
Comment thread
chhoumann marked this conversation as resolved.
"env": {
"browser": true,
"node": true,
"es2021": true
},
"globals": {
"app": "readonly",
"activeWindow": "readonly",
"activeDocument": "readonly"
},
Comment thread
chhoumann marked this conversation as resolved.
"ignorePatterns": ["node_modules", "build", "npm", "main.js", "**/*.svelte"],
"rules": {
"no-prototype-builtins": "off",
"typescript/ban-ts-comment": "off",
"typescript/no-empty-function": "off",
"no-unused-vars": ["error", { "args": "none" }],
"import/no-duplicates": "error",
"typescript/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": false,
"fixStyle": "inline-type-imports"
}
]
},
"overrides": [
{
"files": ["src/**/*.ts"],
"excludeFiles": ["src/**/*.test.ts", "src/**/*.spec.ts"],
"rules": {
"obsidianmd/no-static-styles-assignment": "error",
"obsidianmd/prefer-window-timers": "error",
"obsidianmd/prefer-active-doc": "error",
"obsidianmd/detach-leaves": "error",
"obsidianmd/no-global-this": "error",
"obsidianmd/settings-tab/no-manual-html-headings": "error",
"obsidianmd/commands/no-plugin-name-in-command-name": "error",
"no-restricted-globals": [
"error",
{
"name": "app",
"message": "Avoid the global app object. Use the reference provided by your plugin instance (this.app, or get(plugin).app for module-level code)."
},
{
"name": "fetch",
"message": "Use Obsidian's requestUrl instead of fetch for network requests."
},
{
"name": "localStorage",
"message": "Use App#saveLocalStorage / App#loadLocalStorage for vault-scoped storage instead of the global localStorage."
}
]
}
}
]
}
128 changes: 0 additions & 128 deletions eslint.config.mjs

This file was deleted.

Loading