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:
@@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import tsEslint, { parser } from 'typescript-eslint'
|
||||
|
||||
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'
|
||||
|
||||
/** @type {import('@typescript-eslint/utils/ts-eslint').FlatConfig.Config[]} */
|
||||
@@ -257,7 +257,7 @@ export default [
|
||||
languageOptions: {
|
||||
parserOptions: {
|
||||
projectService: true,
|
||||
tsconfigRootDir: __dirname,
|
||||
tsconfigRootDir: path.join(__dirname, '..'),
|
||||
},
|
||||
},
|
||||
name: 'claudesidian/typed',
|
||||
@@ -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/
|
||||
@@ -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
@@ -6,10 +6,10 @@
|
||||
"scripts": {
|
||||
"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",
|
||||
"lint": "eslint . --fix && prettier --write .",
|
||||
"lint:check": "eslint . && prettier --check .",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"lint": "eslint --config .config/eslint.config.js . --fix && prettier --config .config/.prettierrc.js --write .",
|
||||
"lint:check": "eslint --config .config/eslint.config.js . && prettier --config .config/.prettierrc.js --check .",
|
||||
"format": "prettier --config .config/.prettierrc.js --write .",
|
||||
"format:check": "prettier --config .config/.prettierrc.js --check .",
|
||||
"attachments:list": "ls -1 '05_Attachments/' | grep -v Organized | head -20",
|
||||
"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'",
|
||||
|
||||
Reference in New Issue
Block a user