Skip to content

Commit 789f6af

Browse files
committed
Add ESLint with obsidianmd plugin
1 parent c9ed38b commit 789f6af

File tree

9 files changed

+4488
-87
lines changed

9 files changed

+4488
-87
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
English | [中文](README_zh.md)
44

5-
A lightweight Obsidian plugin that automatically commits vault changes to git. **Desktop only**.
5+
A lightweight Obsidian plugin that automatically commits vault changes to git. **Desktop only** (mobile users can access version history via git web interfaces).
66

77
> **Design Philosophy**: This plugin stays minimal and focused. It does one thing well: automatic git commits. No bloat, no complexity—just simple, reliable version control for your notes.
88
@@ -125,7 +125,7 @@ Folders show the highest priority status of their contents.
125125
- **Desktop only** (Windows / macOS / Linux)
126126
- Git installed and accessible
127127

128-
> **Why no mobile support?** Mobile platforms lack native Git. While [isomorphic-git](https://github.com/isomorphic-git/isomorphic-git) exists, it has significant limitations: CORS restrictions requiring proxy servers, Buffer compatibility issues, and severe performance problems (large repos can take 100+ seconds or crash). We'll revisit mobile support when isomorphic-git matures.
128+
> **Why no mobile support?** Mobile platforms lack native Git. While [isomorphic-git](https://github.com/isomorphic-git/isomorphic-git) exists, it has significant limitations: CORS restrictions requiring proxy servers, Buffer compatibility issues, and severe performance problems. For mobile users, we recommend using your git hosting provider's web interface or mobile app (GitHub, GitLab, Gitea, etc.) to view and manage your vault's version history.
129129
130130
## License
131131

README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English](README.md) | 中文
44

5-
一个轻量级的 Obsidian 插件,自动将仓库变更提交到 Git。**仅支持桌面端**
5+
一个轻量级的 Obsidian 插件,自动将仓库变更提交到 Git。**仅支持桌面端**(移动端用户可通过 Git 网页端查看版本历史)
66

77
> **设计理念**:本插件保持克制,专注核心功能。只做好一件事:自动 Git 提交。无臃肿、无复杂——为你的笔记提供简单可靠的版本控制。
88
@@ -125,7 +125,7 @@ npm run build
125125
- **仅支持桌面端**(Windows / macOS / Linux)
126126
- 已安装并可访问 Git
127127

128-
> **为何不支持移动端?** 移动平台没有原生 Git。虽然有 [isomorphic-git](https://github.com/isomorphic-git/isomorphic-git),但它存在明显限制:CORS 限制需要代理服务器、Buffer 兼容性问题、以及严重的性能问题(大型仓库可能需要 100 多秒或直接崩溃)。等 isomorphic-git 更成熟后我们会重新考虑移动端支持
128+
> **为何不支持移动端?** 移动平台没有原生 Git。虽然有 [isomorphic-git](https://github.com/isomorphic-git/isomorphic-git),但它存在明显限制:CORS 限制需要代理服务器、Buffer 兼容性问题、以及严重的性能问题。移动端用户可以通过 Git 托管平台的网页版或 App(GitHub、GitLab、Gitea 等)来查看和管理仓库的版本历史
129129
130130
## 许可证
131131

eslint.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import tsparser from "@typescript-eslint/parser";
2+
import { defineConfig } from "eslint/config";
3+
import obsidianmd from "eslint-plugin-obsidianmd";
4+
5+
export default defineConfig([
6+
...obsidianmd.configs.recommended,
7+
{
8+
files: ["src/**/*.ts"],
9+
languageOptions: {
10+
parser: tsparser,
11+
parserOptions: {
12+
project: "./tsconfig.json",
13+
},
14+
globals: {
15+
window: "readonly",
16+
document: "readonly",
17+
process: "readonly",
18+
NodeJS: "readonly",
19+
},
20+
},
21+
rules: {
22+
"obsidianmd/sample-names": "off",
23+
},
24+
},
25+
]);

main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "auto-git-commit",
33
"name": "Auto Git Commit",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"minAppVersion": "1.2.0",
66
"description": "Automatically commit vault changes to git with customizable triggers and templates.",
77
"author": "small",

0 commit comments

Comments
 (0)