feat: add linting and formatting setup with configs in .config folder

- Add ESLint configuration with TypeScript support
- Add Prettier configuration for code formatting
- Move all config files to .config/ folder to keep them hidden from Obsidian
- Add lint and format scripts to package.json
- Add .eslintignore and .prettierignore files
- Remove framework-specific configuration
- Configure for general JavaScript/TypeScript development
This commit is contained in:
Noah Brier
2025-09-15 08:31:46 -04:00
parent fa83f75f42
commit 61d14875d5
6 changed files with 61 additions and 6 deletions
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url'
import tsEslint, { parser } from 'typescript-eslint' import tsEslint, { parser } from 'typescript-eslint'
const __dirname = path.dirname(fileURLToPath(import.meta.url)) const __dirname = path.dirname(fileURLToPath(import.meta.url))
const gitIgnorePath = path.join(__dirname, '.gitignore') const gitIgnorePath = path.join(__dirname, '..', '.gitignore')
const autofix = process.env.CI ? 'error' : 'warn' const autofix = process.env.CI ? 'error' : 'warn'
/** @type {import('@typescript-eslint/utils/ts-eslint').FlatConfig.Config[]} */ /** @type {import('@typescript-eslint/utils/ts-eslint').FlatConfig.Config[]} */
@@ -257,7 +257,7 @@ export default [
languageOptions: { languageOptions: {
parserOptions: { parserOptions: {
projectService: true, projectService: true,
tsconfigRootDir: __dirname, tsconfigRootDir: path.join(__dirname, '..'),
}, },
}, },
name: 'claudesidian/typed', name: 'claudesidian/typed',
+29
View File
@@ -0,0 +1,29 @@
# Ignore Obsidian folders
00_Inbox/
01_Projects/
02_Areas/
03_Resources/
04_Archives/
05_Attachments/
06_Metadata/
OLD_VAULT/
# Ignore dependencies
node_modules/
package-lock.json
# Ignore build/dist
dist/
build/
# Ignore hidden folders
.obsidian/
.trash/
.tmp/
.backup/
# Ignore git
.git/
# Ignore config folder
.config/
+26
View File
@@ -0,0 +1,26 @@
# Ignore Obsidian folders
00_Inbox/
01_Projects/
02_Areas/
03_Resources/
04_Archives/
05_Attachments/
06_Metadata/
OLD_VAULT/
# Ignore dependencies
node_modules/
package-lock.json
# Ignore build/dist
dist/
build/
# Ignore hidden folders
.obsidian/
.trash/
.tmp/
.backup/
# Ignore git
.git/
+4 -4
View File
@@ -6,10 +6,10 @@
"scripts": { "scripts": {
"setup": "pnpm install && echo '✅ Setup complete! Configure GEMINI_API_KEY for vision features'", "setup": "pnpm install && echo '✅ Setup complete! Configure GEMINI_API_KEY for vision features'",
"test-gemini": "GEMINI_API_KEY=${GEMINI_API_KEY} node .claude/mcp-servers/gemini-vision.mjs", "test-gemini": "GEMINI_API_KEY=${GEMINI_API_KEY} node .claude/mcp-servers/gemini-vision.mjs",
"lint": "eslint . --fix && prettier --write .", "lint": "eslint --config .config/eslint.config.js . --fix && prettier --config .config/.prettierrc.js --write .",
"lint:check": "eslint . && prettier --check .", "lint:check": "eslint --config .config/eslint.config.js . && prettier --config .config/.prettierrc.js --check .",
"format": "prettier --write .", "format": "prettier --config .config/.prettierrc.js --write .",
"format:check": "prettier --check .", "format:check": "prettier --config .config/.prettierrc.js --check .",
"attachments:list": "ls -1 '05_Attachments/' | grep -v Organized | head -20", "attachments:list": "ls -1 '05_Attachments/' | grep -v Organized | head -20",
"attachments:count": "ls -1 '05_Attachments/' | grep -v Organized | wc -l", "attachments:count": "ls -1 '05_Attachments/' | grep -v Organized | wc -l",
"attachments:organized": "ls -1 '05_Attachments/Organized' 2>/dev/null | wc -l || echo '0'", "attachments:organized": "ls -1 '05_Attachments/Organized' 2>/dev/null | wc -l || echo '0'",