Skip to content
Open
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,31 @@ You can also override or add rules:

</details>

### Using only Obsidian-specific rules

If you use a linter other than ESLint, you may want to only enable Obsidian-specific rules, without all the General ESLint rules. To do so, use this configuration:

```javascript
// eslint.config.mjs
import tsparser from "@typescript-eslint/parser";
import { defineConfig } from "eslint/config";
import obsidianmd from "eslint-plugin-obsidianmd";

export default defineConfig([
{
files: ["**/*.ts"],
languageOptions: {
parser: tsparser,
parserOptions: { project: "./tsconfig.json" },
},
plugins: {
obsidianmd: obsidianmd,
},
rules: obsidianmd.configs.recommendedPluginRulesOnly,
},
]);
```

## Configurations

<!-- begin auto-generated configs list -->
Expand Down
1 change: 1 addition & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ plugin.configs = {
} as any;
},
} as any,
recommendedPluginRulesOnly: recommendedPluginRulesConfig,
} as any;

export default plugin;