mnaoumov_obsidian-advanced-.../scripts/eslint-config.ts
Michael Naumov 5f1fa15d08 chore: update obsidian-dev-utils to 85.0.0
Bump obsidian-dev-utils from ^83.0.0 to ^85.0.0 and fix all migration
fallout:

- Remove eslint-disable directives now banned by the stricter
  eslint-comments/no-restricted-disable rule (obsidianmd 0.3.0 -> 0.4.1)
  for @typescript-eslint/no-deprecated, obsidianmd/ui/sentence-case and
  obsidianmd/no-global-this, fixing the underlying code instead.
- Drop the obsolete window.app / app.obsidianDevUtilsState seeding
  (setup.ts and the settings-tab test): under 85 the shared state lives
  on globalThis.__obsidianDevUtils and is reset per test by the wired
  obsidian-dev-utils/vitest-setup.
- Render the debug-namespaces documentation link text via appendText so
  it stays lowercase without suppressing obsidianmd/ui/sentence-case.
- Add a src/**/*-desktop-component.ts override turning off the new
  obsidianmd/no-nodejs-modules warning for the deliberate desktop-only
  node built-in imports (the rule cannot be disabled inline).
2026-07-10 23:03:27 -06:00

28 lines
789 B
TypeScript

import type { Linter } from 'eslint';
import { defineConfig } from 'eslint/config';
import { defineEslintConfigs } from 'obsidian-dev-utils/script-utils/linters/eslint-config';
export const configs: Linter.Config[] = defineEslintConfigs({
customConfigs() {
return defineConfig([
{
rules: {
'obsidianmd/ui/sentence-case': [
'error',
{
brands: ['Error']
}
]
}
},
{
files: ['src/**/*-desktop-component.ts'],
rules: {
// These components execute only on desktop (guarded by Platform.isDesktop) and deliberately import Node.js built-ins; the rule cannot be disabled inline.
'obsidianmd/no-nodejs-modules': 'off'
}
}
]);
}
});