mirror of
https://github.com/dotwee/obsidian-raindropio-plugin.git
synced 2026-07-22 06:50:29 +00:00
build: update dependencies and eslint configuration
Move obsidian to devDependencies and remove tslib, which is unneeded without importHelpers. Pin eslint and @eslint/js to version 9 to stay compatible with eslint-plugin-obsidianmd peer requirements. Switch the flat config to defineConfig from eslint/config and apply ignore patterns before rulesets. Matches the current obsidian-sample-plugin setup and removes a type-cast workaround in the config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c22dc1f969
commit
0a6af4ed0f
3 changed files with 40 additions and 76 deletions
|
|
@ -1,15 +1,23 @@
|
|||
import tseslint from 'typescript-eslint';
|
||||
import obsidianmd from "eslint-plugin-obsidianmd";
|
||||
import globals from "globals";
|
||||
import { globalIgnores } from "eslint/config";
|
||||
import { globalIgnores, defineConfig } from "eslint/config";
|
||||
|
||||
type EslintConfig = Parameters<typeof tseslint.config>[number];
|
||||
|
||||
const obsidianRecommendedConfigList = [
|
||||
...((obsidianmd.configs?.recommended ?? []) as Iterable<EslintConfig>),
|
||||
];
|
||||
|
||||
export default tseslint.config(
|
||||
export default defineConfig(
|
||||
globalIgnores([
|
||||
"node_modules",
|
||||
"dist",
|
||||
"esbuild.config.mjs",
|
||||
"eslint.config.js",
|
||||
"eslint.config.mts",
|
||||
"jest.config.cjs",
|
||||
"package.json",
|
||||
"package-lock.json",
|
||||
"pnpm-lock.yaml",
|
||||
"version-bump.mjs",
|
||||
"versions.json",
|
||||
"tsconfig.json",
|
||||
"main.js",
|
||||
]),
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
|
|
@ -17,10 +25,7 @@ export default tseslint.config(
|
|||
},
|
||||
parserOptions: {
|
||||
projectService: {
|
||||
allowDefaultProject: [
|
||||
'eslint.config.js',
|
||||
'manifest.json'
|
||||
]
|
||||
allowDefaultProject: ['eslint.config.mts', 'manifest.json'],
|
||||
},
|
||||
tsconfigRootDir: import.meta.dirname,
|
||||
extraFileExtensions: ['.json']
|
||||
|
|
@ -35,19 +40,5 @@ export default tseslint.config(
|
|||
},
|
||||
},
|
||||
},
|
||||
...obsidianRecommendedConfigList,
|
||||
globalIgnores([
|
||||
"node_modules",
|
||||
"dist",
|
||||
"esbuild.config.mjs",
|
||||
"eslint.config.js",
|
||||
"eslint.config.mts",
|
||||
"jest.config.cjs",
|
||||
"package.json",
|
||||
"package-lock.json",
|
||||
"pnpm-lock.yaml",
|
||||
"version-bump.mjs",
|
||||
"versions.json",
|
||||
"main.js",
|
||||
]),
|
||||
...obsidianmd.configs.recommended,
|
||||
);
|
||||
|
|
|
|||
61
package-lock.json
generated
61
package-lock.json
generated
|
|
@ -8,21 +8,19 @@
|
|||
"name": "obsidian-raindropio-plugin",
|
||||
"version": "1.0.4",
|
||||
"license": "WTFPL",
|
||||
"dependencies": {
|
||||
"obsidian": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^26.1.0",
|
||||
"esbuild": "0.28.1",
|
||||
"eslint": "^9.39.4",
|
||||
"eslint-plugin-obsidianmd": "0.4.1",
|
||||
"globals": "17.7.0",
|
||||
"jest": "^30.4.2",
|
||||
"jest-environment-jsdom": "^30.4.1",
|
||||
"jiti": "2.7.0",
|
||||
"obsidian": "latest",
|
||||
"ts-jest": "^29.4.11",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "8.62.1"
|
||||
}
|
||||
|
|
@ -488,6 +486,7 @@
|
|||
},
|
||||
"node_modules/@codemirror/state": {
|
||||
"version": "6.5.0",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
|
|
@ -496,6 +495,7 @@
|
|||
},
|
||||
"node_modules/@codemirror/view": {
|
||||
"version": "6.38.6",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
|
|
@ -1271,24 +1271,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
|
||||
"integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
|
||||
"version": "9.39.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
|
||||
"integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://eslint.org/donate"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^10.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/json": {
|
||||
|
|
@ -1877,6 +1869,7 @@
|
|||
},
|
||||
"node_modules/@marijn/find-cluster-break": {
|
||||
"version": "1.0.2",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
|
|
@ -2027,6 +2020,7 @@
|
|||
},
|
||||
"node_modules/@types/codemirror": {
|
||||
"version": "5.60.8",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/tern": "*"
|
||||
|
|
@ -2043,6 +2037,7 @@
|
|||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.9",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-coverage": {
|
||||
|
|
@ -2112,6 +2107,7 @@
|
|||
},
|
||||
"node_modules/@types/tern": {
|
||||
"version": "0.23.9",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "*"
|
||||
|
|
@ -3360,6 +3356,7 @@
|
|||
},
|
||||
"node_modules/crelt": {
|
||||
"version": "1.0.6",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
|
|
@ -4249,19 +4246,6 @@
|
|||
"typescript-eslint": "^8.35.1"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-obsidianmd/node_modules/@eslint/js": {
|
||||
"version": "9.39.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
|
||||
"integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://eslint.org/donate"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-obsidianmd/node_modules/@types/node": {
|
||||
"version": "20.12.12",
|
||||
"dev": true,
|
||||
|
|
@ -4411,19 +4395,6 @@
|
|||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/@eslint/js": {
|
||||
"version": "9.39.4",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.4.tgz",
|
||||
"integrity": "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://eslint.org/donate"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"dev": true,
|
||||
|
|
@ -6612,6 +6583,7 @@
|
|||
},
|
||||
"node_modules/moment": {
|
||||
"version": "2.29.4",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
|
|
@ -6819,6 +6791,7 @@
|
|||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.13.1.tgz",
|
||||
"integrity": "sha512-qtTEA2pmhJzhuhJqzbBFRYhpIOqvW+krDYjtFynv66KbxBbumHBlsJfWw3I4jtnK/6fZwbQhCrmmDdRwXmX56w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/codemirror": "5.60.8",
|
||||
|
|
@ -7862,6 +7835,7 @@
|
|||
},
|
||||
"node_modules/style-mod": {
|
||||
"version": "4.1.3",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
|
|
@ -8438,6 +8412,7 @@
|
|||
},
|
||||
"node_modules/w3c-keyname": {
|
||||
"version": "2.2.8",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,21 +29,19 @@
|
|||
"bookmarks"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@eslint/js": "10.0.1",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^26.1.0",
|
||||
"esbuild": "0.28.1",
|
||||
"eslint": "^9.39.4",
|
||||
"eslint-plugin-obsidianmd": "0.4.1",
|
||||
"globals": "17.7.0",
|
||||
"jest": "^30.4.2",
|
||||
"jest-environment-jsdom": "^30.4.1",
|
||||
"jiti": "2.7.0",
|
||||
"obsidian": "latest",
|
||||
"ts-jest": "^29.4.11",
|
||||
"tslib": "2.8.1",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "8.62.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"obsidian": "latest"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue