mirror of
https://github.com/scotttomaszewski/obsidian-disciples-journal.git
synced 2026-07-22 05:42:13 +00:00
Resolves FOLLOWUP.md #2. Replaces vault.adapter.* usage with the intended Obsidian APIs: - ESVApiService.saveESVApiResponseAsMdNote: Vault.create() for the note body + FileManager.processFrontMatter() for frontmatter; folder creation via getAbstractFileByPath/createFolder. - DisciplesJournalPlugin.updateAllBibleNoteFrontmatter: reads canonical from metadataCache and updates via processFrontMatter. - FrontmatterUtil: buildFrontmatterString/mergeCustomFrontmatterIntoExisting replaced by applyCustomFrontmatter, which mutates the frontmatter object directly (drops stringifyYaml round-tripping). - BibleFiles.fileExistsForPassage uses getAbstractFileByPath (now sync); clearData deletes via FileManager.trashFile() to respect trash settings. - All passage/content paths run through normalizePath(). - eslint config ignores .devbox/ tooling artifacts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
56 lines
1.7 KiB
JavaScript
56 lines
1.7 KiB
JavaScript
import { defineConfig } from "eslint/config";
|
|
import obsidianmd from "eslint-plugin-obsidianmd";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default defineConfig([
|
|
{
|
|
// obsidianmd only wires up JSON parsing for package.json; other JSON
|
|
// files would be parsed as JS and error. Build artifacts/configs too.
|
|
ignores: [
|
|
"main.js",
|
|
"node_modules/**",
|
|
"**/*.mjs",
|
|
"manifest.json",
|
|
"versions.json",
|
|
"data.json",
|
|
"tsconfig.json",
|
|
"devbox.json",
|
|
"devbox.lock",
|
|
".devbox/**",
|
|
"package-lock.json",
|
|
],
|
|
},
|
|
...obsidianmd.configs.recommended,
|
|
{
|
|
files: ["**/*.ts"],
|
|
languageOptions: {
|
|
parser: tseslint.parser,
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
// Obsidian/CodeMirror callback signatures often include unused args.
|
|
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
// Disabled upstream as "not working as intended" (v0.3.0); it also
|
|
// lower-cases proper nouns (Bible, ESV, Christ). Sentence case is
|
|
// applied manually instead.
|
|
"obsidianmd/ui/sentence-case": "off",
|
|
},
|
|
},
|
|
{
|
|
// obsidianmd's recommended set applies several type-aware rules globally
|
|
// (no file filter). They require TS parser services and crash on the JSON
|
|
// files. They are only meaningful for source, so disable them for JSON.
|
|
files: ["**/*.json"],
|
|
rules: {
|
|
"obsidianmd/no-plugin-as-component": "off",
|
|
"obsidianmd/no-view-references-in-plugin": "off",
|
|
"obsidianmd/prefer-file-manager-trash-file": "off",
|
|
"obsidianmd/prefer-instanceof": "off",
|
|
"obsidianmd/no-unsupported-api": "off",
|
|
},
|
|
},
|
|
]);
|