@mnaoumov/obsidian-dev-toolkit 0.0.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +7 -1
- package/bundlers/esbuild/package.json +6 -0
- package/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/dependency/package.json +6 -0
- package/bundlers/esbuild-impl/fix-source-maps-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/index/package.json +6 -0
- package/bundlers/esbuild-impl/obsidian-plugin-builder/package.json +6 -0
- package/bundlers/esbuild-impl/package.json +6 -0
- package/bundlers/esbuild-impl/preprocess-plugin/package.json +6 -0
- package/bundlers/esbuild-impl/rename-css-plugin/package.json +6 -0
- package/bundlers/index/package.json +6 -0
- package/bundlers/package.json +6 -0
- package/dist/demo-vault-helper/main.js +782 -0
- package/dist/demo-vault-helper/manifest.json +9 -0
- package/dist/integration-test-plugin/main.js +45388 -0
- package/dist/integration-test-plugin/manifest.json +8 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.cjs +335 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.cts +38 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.cjs +253 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/dependency.d.cts +20 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.cjs +226 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/fix-source-maps-plugin.d.cts +34 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.cjs +192 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/index.d.cts +7 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.cjs +375 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/obsidian-plugin-builder.d.cts +98 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.cjs +247 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/preprocess-plugin.d.cts +30 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.cjs +184 -0
- package/dist/lib/cjs/bundlers/esbuild-impl/rename-css-plugin.d.cts +14 -0
- package/dist/lib/cjs/bundlers/esbuild.cjs +177 -0
- package/dist/lib/cjs/bundlers/esbuild.d.cts +11 -0
- package/dist/lib/cjs/bundlers/index.cjs +180 -0
- package/dist/lib/cjs/bundlers/index.d.cts +3 -0
- package/dist/lib/cjs/demo-vault-app-json.cjs +199 -0
- package/dist/lib/cjs/demo-vault-app-json.d.cts +93 -0
- package/dist/lib/cjs/demo-vault-buttons.cjs +580 -0
- package/dist/lib/cjs/demo-vault-buttons.d.cts +259 -0
- package/dist/lib/cjs/demo-vault-coverage.cjs +725 -0
- package/dist/lib/cjs/demo-vault-coverage.d.cts +533 -0
- package/dist/lib/cjs/demo-vault.cjs +309 -0
- package/dist/lib/cjs/demo-vault.d.cts +33 -0
- package/dist/lib/cjs/formatters/dprint.cjs +173 -0
- package/dist/lib/cjs/formatters/dprint.d.cts +15 -0
- package/dist/lib/cjs/formatters/index.cjs +177 -0
- package/dist/lib/cjs/formatters/index.d.cts +2 -0
- package/dist/lib/cjs/index.cjs +207 -0
- package/dist/lib/cjs/index.d.cts +16 -0
- package/dist/lib/cjs/integration-test-setup.cjs +142 -0
- package/dist/lib/cjs/integration-test-setup.d.cts +33 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.cjs +176 -0
- package/dist/lib/cjs/integration-test-vitest-global-setup.d.cts +39 -0
- package/dist/lib/cjs/jest-setup.cjs +147 -0
- package/dist/lib/cjs/jest-setup.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-config.cjs +365 -0
- package/dist/lib/cjs/linters/eslint-config.d.cts +25 -0
- package/dist/lib/cjs/linters/eslint-rules/index.cjs +201 -0
- package/dist/lib/cjs/linters/eslint-rules/index.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.cjs +268 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-description.d.cts +54 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.cjs +231 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-helpers.d.cts +141 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.cjs +228 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-id.d.cts +32 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.cjs +229 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-name.d.cts +30 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.cjs +329 -0
- package/dist/lib/cjs/linters/eslint-rules/manifest-schema.d.cts +45 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.cjs +670 -0
- package/dist/lib/cjs/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.cjs +260 -0
- package/dist/lib/cjs/linters/eslint-rules/no-untrusted-input-events.d.cts +10 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.cjs +186 -0
- package/dist/lib/cjs/linters/eslint-rules/obsidian-dev-utils-plugin.d.cts +13 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.cjs +291 -0
- package/dist/lib/cjs/linters/eslint-rules/require-component-suffix.d.cts +18 -0
- package/dist/lib/cjs/linters/eslint.cjs +173 -0
- package/dist/lib/cjs/linters/eslint.d.cts +15 -0
- package/dist/lib/cjs/linters/index.cjs +189 -0
- package/dist/lib/cjs/linters/index.d.cts +6 -0
- package/dist/lib/cjs/linters/markdownlint.cjs +173 -0
- package/dist/lib/cjs/linters/markdownlint.d.cts +15 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.cjs +189 -0
- package/dist/lib/cjs/linters/obsidianmd-rule-custom-message.d.cts +40 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.cjs +229 -0
- package/dist/lib/cjs/obsidian-plugin-repo-paths.d.cts +253 -0
- package/dist/lib/cjs/setup.cjs +176 -0
- package/dist/lib/cjs/setup.d.cts +21 -0
- package/dist/lib/cjs/templates.cjs +185 -0
- package/dist/lib/cjs/templates.d.cts +13 -0
- package/dist/lib/cjs/test-runners/index.cjs +183 -0
- package/dist/lib/cjs/test-runners/index.d.cts +4 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.cjs +224 -0
- package/dist/lib/cjs/test-runners/integration-test-plugin.d.cts +44 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.cjs +170 -0
- package/dist/lib/cjs/test-runners/performance-eval-cap.d.cts +27 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.cjs +230 -0
- package/dist/lib/cjs/test-runners/stale-build-global-setup.d.cts +86 -0
- package/dist/lib/cjs/test-runners/vitest-config.cjs +497 -0
- package/dist/lib/cjs/test-runners/vitest-config.d.cts +200 -0
- package/dist/lib/cjs/version.cjs +275 -0
- package/dist/lib/cjs/version.d.cts +92 -0
- package/dist/lib/cjs/vitest-setup.cjs +147 -0
- package/dist/lib/cjs/vitest-setup.d.cts +11 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.d.mts +38 -0
- package/dist/lib/esm/bundlers/esbuild-impl/copy-to-obsidian-plugins-folder-plugin.mjs +226 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.d.mts +20 -0
- package/dist/lib/esm/bundlers/esbuild-impl/dependency.mjs +138 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.d.mts +34 -0
- package/dist/lib/esm/bundlers/esbuild-impl/fix-source-maps-plugin.mjs +116 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.d.mts +7 -0
- package/dist/lib/esm/bundlers/esbuild-impl/index.mjs +64 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.d.mts +98 -0
- package/dist/lib/esm/bundlers/esbuild-impl/obsidian-plugin-builder.mjs +255 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.d.mts +30 -0
- package/dist/lib/esm/bundlers/esbuild-impl/preprocess-plugin.mjs +134 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.d.mts +14 -0
- package/dist/lib/esm/bundlers/esbuild-impl/rename-css-plugin.mjs +71 -0
- package/dist/lib/esm/bundlers/esbuild.d.mts +11 -0
- package/dist/lib/esm/bundlers/esbuild.mjs +66 -0
- package/dist/lib/esm/bundlers/index.d.mts +3 -0
- package/dist/lib/esm/bundlers/index.mjs +56 -0
- package/dist/lib/esm/demo-vault-app-json.d.mts +93 -0
- package/dist/lib/esm/demo-vault-app-json.mjs +83 -0
- package/dist/lib/esm/demo-vault-buttons.d.mts +259 -0
- package/dist/lib/esm/demo-vault-buttons.mjs +460 -0
- package/dist/lib/esm/demo-vault-coverage.d.mts +533 -0
- package/dist/lib/esm/demo-vault-coverage.mjs +626 -0
- package/dist/lib/esm/demo-vault.d.mts +33 -0
- package/dist/lib/esm/demo-vault.mjs +205 -0
- package/dist/lib/esm/formatters/dprint.d.mts +15 -0
- package/dist/lib/esm/formatters/dprint.mjs +60 -0
- package/dist/lib/esm/formatters/index.d.mts +2 -0
- package/dist/lib/esm/formatters/index.mjs +54 -0
- package/dist/lib/esm/index.d.mts +16 -0
- package/dist/lib/esm/index.mjs +74 -0
- package/dist/lib/esm/integration-test-setup.d.mts +33 -0
- package/dist/lib/esm/integration-test-setup.mjs +52 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.d.mts +39 -0
- package/dist/lib/esm/integration-test-vitest-global-setup.mjs +65 -0
- package/dist/lib/esm/jest-setup.d.mts +13 -0
- package/dist/lib/esm/jest-setup.mjs +61 -0
- package/dist/lib/esm/linters/eslint-config.d.mts +25 -0
- package/dist/lib/esm/linters/eslint-config.mjs +247 -0
- package/dist/lib/esm/linters/eslint-rules/index.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/index.mjs +70 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.d.mts +54 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-description.mjs +154 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.d.mts +141 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-helpers.mjs +98 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.d.mts +32 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-id.mjs +117 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.d.mts +30 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-name.mjs +118 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.d.mts +45 -0
- package/dist/lib/esm/linters/eslint-rules/manifest-schema.mjs +220 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian.mjs +559 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.d.mts +10 -0
- package/dist/lib/esm/linters/eslint-rules/no-untrusted-input-events.mjs +146 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.d.mts +13 -0
- package/dist/lib/esm/linters/eslint-rules/obsidian-dev-utils-plugin.mjs +73 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.d.mts +18 -0
- package/dist/lib/esm/linters/eslint-rules/require-component-suffix.mjs +175 -0
- package/dist/lib/esm/linters/eslint.d.mts +15 -0
- package/dist/lib/esm/linters/eslint.mjs +60 -0
- package/dist/lib/esm/linters/index.d.mts +6 -0
- package/dist/lib/esm/linters/index.mjs +62 -0
- package/dist/lib/esm/linters/markdownlint.d.mts +15 -0
- package/dist/lib/esm/linters/markdownlint.mjs +60 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.d.mts +40 -0
- package/dist/lib/esm/linters/obsidianmd-rule-custom-message.mjs +75 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.d.mts +253 -0
- package/dist/lib/esm/obsidian-plugin-repo-paths.mjs +116 -0
- package/dist/lib/esm/setup.d.mts +21 -0
- package/dist/lib/esm/setup.mjs +63 -0
- package/dist/lib/esm/templates.d.mts +13 -0
- package/dist/lib/esm/templates.mjs +65 -0
- package/dist/lib/esm/test-runners/index.d.mts +4 -0
- package/dist/lib/esm/test-runners/index.mjs +58 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.d.mts +44 -0
- package/dist/lib/esm/test-runners/integration-test-plugin.mjs +102 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.d.mts +27 -0
- package/dist/lib/esm/test-runners/performance-eval-cap.mjs +56 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.d.mts +86 -0
- package/dist/lib/esm/test-runners/stale-build-global-setup.mjs +123 -0
- package/dist/lib/esm/test-runners/vitest-config.d.mts +200 -0
- package/dist/lib/esm/test-runners/vitest-config.mjs +377 -0
- package/dist/lib/esm/version.d.mts +92 -0
- package/dist/lib/esm/version.mjs +168 -0
- package/dist/lib/esm/vitest-setup.d.mts +11 -0
- package/dist/lib/esm/vitest-setup.mjs +61 -0
- package/dist/templates/.markdownlint-cli2.mjs +4 -0
- package/dist/templates/.nano-staged.mjs +4 -0
- package/dist/templates/commitlint.config.ts +3 -0
- package/dist/templates/dprint.json +26 -0
- package/dist/templates/eslint.config.mts +3 -0
- package/dist/templates/scripts/build/build-clean.ts +4 -0
- package/dist/templates/scripts/build/build-compile-svelte.ts +4 -0
- package/dist/templates/scripts/build/build-compile-typescript.ts +4 -0
- package/dist/templates/scripts/build/build-compile.ts +4 -0
- package/dist/templates/scripts/build/build-templates.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/build.ts +4 -0
- package/dist/templates/scripts/bundlers/esbuild/dev.ts +4 -0
- package/dist/templates/scripts/commitlint-config.ts +3 -0
- package/dist/templates/scripts/eslint-config.ts +10 -0
- package/dist/templates/scripts/formatters/dprint/format-check.ts +8 -0
- package/dist/templates/scripts/formatters/dprint/format.ts +8 -0
- package/dist/templates/scripts/gate/gate.ts +10 -0
- package/dist/templates/scripts/linters/cspell/spellcheck.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint-fix.ts +8 -0
- package/dist/templates/scripts/linters/eslint/lint.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md-fix.ts +8 -0
- package/dist/templates/scripts/linters/markdownlint/lint-md.ts +8 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed-fix.ts +25 -0
- package/dist/templates/scripts/linters/over-exposure/find-overexposed.ts +15 -0
- package/dist/templates/scripts/markdownlint-cli2-config.ts +3 -0
- package/dist/templates/scripts/nano-staged-config.ts +3 -0
- package/dist/templates/scripts/test-runners/vitest/test-coverage.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test-watch.ts +4 -0
- package/dist/templates/scripts/test-runners/vitest/test.ts +4 -0
- package/dist/templates/scripts/version/version.ts +10 -0
- package/dist/templates/scripts/vitest-config.ts +3 -0
- package/dist/templates/vitest.config.ts +3 -0
- package/formatters/dprint/package.json +6 -0
- package/formatters/index/package.json +6 -0
- package/formatters/package.json +6 -0
- package/linters/eslint/package.json +6 -0
- package/linters/eslint-config/package.json +6 -0
- package/linters/eslint-rules/index/package.json +6 -0
- package/linters/eslint-rules/manifest-description/package.json +6 -0
- package/linters/eslint-rules/manifest-helpers/package.json +6 -0
- package/linters/eslint-rules/manifest-id/package.json +6 -0
- package/linters/eslint-rules/manifest-name/package.json +6 -0
- package/linters/eslint-rules/manifest-schema/package.json +6 -0
- package/linters/eslint-rules/no-over-cap-wait-in-eval-in-obsidian/package.json +6 -0
- package/linters/eslint-rules/no-untrusted-input-events/package.json +6 -0
- package/linters/eslint-rules/obsidian-dev-utils-plugin/package.json +6 -0
- package/linters/eslint-rules/package.json +6 -0
- package/linters/eslint-rules/require-component-suffix/package.json +6 -0
- package/linters/index/package.json +6 -0
- package/linters/markdownlint/package.json +6 -0
- package/linters/obsidianmd-rule-custom-message/package.json +6 -0
- package/linters/package.json +6 -0
- package/package.json +241 -13
- package/test-runners/index/package.json +6 -0
- package/test-runners/integration-test-plugin/package.json +6 -0
- package/test-runners/package.json +6 -0
- package/test-runners/performance-eval-cap/package.json +6 -0
- package/test-runners/stale-build-global-setup/package.json +6 -0
- package/test-runners/vitest-config/package.json +6 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var __create = Object.create;
|
|
141
|
+
var __defProp = Object.defineProperty;
|
|
142
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
143
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
144
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
145
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
146
|
+
var __export = (target, all) => {
|
|
147
|
+
for (var name in all)
|
|
148
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
149
|
+
};
|
|
150
|
+
var __copyProps = (to, from, except, desc) => {
|
|
151
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
152
|
+
for (let key of __getOwnPropNames(from))
|
|
153
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
154
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
155
|
+
}
|
|
156
|
+
return to;
|
|
157
|
+
};
|
|
158
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
159
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
160
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
161
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
162
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
163
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
164
|
+
mod
|
|
165
|
+
));
|
|
166
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
167
|
+
var linters_exports = {};
|
|
168
|
+
__export(linters_exports, {
|
|
169
|
+
eslint: () => eslint,
|
|
170
|
+
"eslint-config": () => eslint_config,
|
|
171
|
+
"eslint-rules": () => eslint_rules,
|
|
172
|
+
markdownlint: () => markdownlint,
|
|
173
|
+
"obsidianmd-rule-custom-message": () => obsidianmd_rule_custom_message
|
|
174
|
+
});
|
|
175
|
+
module.exports = __toCommonJS(linters_exports);
|
|
176
|
+
var eslint_config = __toESM(__extractDefault(require('./eslint-config.cjs')), 1);
|
|
177
|
+
var eslint_rules = __toESM(__extractDefault(require('./eslint-rules/index.cjs')), 1);
|
|
178
|
+
var eslint = __toESM(__extractDefault(require('./eslint.cjs')), 1);
|
|
179
|
+
var markdownlint = __toESM(__extractDefault(require('./markdownlint.cjs')), 1);
|
|
180
|
+
var obsidianmd_rule_custom_message = __toESM(__extractDefault(require('./obsidianmd-rule-custom-message.cjs')), 1);
|
|
181
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
182
|
+
0 && (module.exports = {
|
|
183
|
+
eslint,
|
|
184
|
+
"eslint-config": null,
|
|
185
|
+
"eslint-rules": null,
|
|
186
|
+
markdownlint,
|
|
187
|
+
"obsidianmd-rule-custom-message": null
|
|
188
|
+
});
|
|
189
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL2xpbnRlcnMvaW5kZXgudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qIFRISVMgSVMgQSBHRU5FUkFURUQvQlVORExFRCBGSUxFIEJZIEJVSUxEIFNDUklQVCAqL1xuXG5leHBvcnQgKiBhcyAnZXNsaW50LWNvbmZpZycgZnJvbSAnLi9lc2xpbnQtY29uZmlnLnRzJztcbmV4cG9ydCAqIGFzICdlc2xpbnQtcnV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|
+
export * as 'eslint' from './eslint.cjs';
|
|
5
|
+
export * as 'markdownlint' from './markdownlint.cjs';
|
|
6
|
+
export * as 'obsidianmd-rule-custom-message' from './obsidianmd-rule-custom-message.cjs';
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var __defProp = Object.defineProperty;
|
|
141
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
142
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
143
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
144
|
+
var __export = (target, all) => {
|
|
145
|
+
for (var name in all)
|
|
146
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
147
|
+
};
|
|
148
|
+
var __copyProps = (to, from, except, desc) => {
|
|
149
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
150
|
+
for (let key of __getOwnPropNames(from))
|
|
151
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
152
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
153
|
+
}
|
|
154
|
+
return to;
|
|
155
|
+
};
|
|
156
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
157
|
+
var markdownlint_exports = {};
|
|
158
|
+
__export(markdownlint_exports, {
|
|
159
|
+
lint: () => lint
|
|
160
|
+
});
|
|
161
|
+
module.exports = __toCommonJS(markdownlint_exports);
|
|
162
|
+
var import_markdownlint = require('@mnaoumov/typescript-dev-toolkit/linters/markdownlint');
|
|
163
|
+
var import_repo_paths = require('@mnaoumov/typescript-dev-toolkit/repo-paths');
|
|
164
|
+
var import_templates = require('../templates.cjs');
|
|
165
|
+
var import_markdownlint2 = require('@mnaoumov/typescript-dev-toolkit/linters/markdownlint');
|
|
166
|
+
async function lint(options) {
|
|
167
|
+
await (0, import_markdownlint.lint)({ defaultConfigFilePath: (0, import_templates.getTemplateFilePath)(import_repo_paths.RepoPaths.MarkdownlintCli2ConfigMjs), ...options });
|
|
168
|
+
}
|
|
169
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
170
|
+
0 && (module.exports = {
|
|
171
|
+
lint
|
|
172
|
+
});
|
|
173
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vLi4vc3JjL2xpbnRlcnMvbWFya2Rvd25saW50LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvKipcbiAqIEBmaWxlXG4gKlxuICogTGludHMgYW4gT2JzaWRpYW4gcGx1Z2luJ3MgbWFya2Rvd246IHRoZSBnZW5lcmljIHJ1bm5lciBmcm9tIGBAbW5hb3Vtb3YvdHlwZXNjcmlwdC1kZXYtdG9vbGtpdGAsIHdoaWNoIGNvcGllc1xuICogdGhpcyBwYWNrYWdlJ3MgYC5tYXJrZG93bmxpbnQtY2xpMi5tanNgIHRlbXBsYXRlIGludG8gYSBwcm9qZWN0IHRoYXQgaGFzIG5vIGNvbmZpZ3VyYXRpb24geWV0LlxuICovXG5cbmltcG9ydCB0eXBlIHsgTGludE9wdGlvbnMgfSBmcm9tICdAbW5hb3Vtb3YvdHlwZXNjcmlwdC1kZXYtdG9vbGtpdC9saW50ZXJzL21hcmtkb3dubGludCc7XG5cbmltcG9ydCB7IGxpbnQgYXMgbGludEdlbmVyaWMgfSBmcm9tICdAbW5hb3Vtb3YvdHlwZXNjcmlwdC1kZXYtdG9vbGtpdC9saW50ZXJzL21hcmtkb3dubGludCc7XG5pbXBvcnQgeyBSZXBvUGF0aHMgfSBmcm9tICdAbW5hb3Vtb3YvdHlwZXNjcmlwdC1kZXYtdG9vbGtpdC9yZXBvLXBhdGhzJztcblxuaW1wb3J0IHsgZ2V0VGVtcGxhdGVGaWxlUGF0aCB9IGZyb20gJy4uL3RlbXBsYXRlcy50cyc7XG5cbi8qKlxuICogTGludHMgdGhlIHByb2plY3QncyBtYXJrZG93biB3aX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hcmtkb3dubGludCIsICJsaW50R2VuZXJpYyJdCn0K
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference path="../index.d.cts" />
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* Lints an Obsidian plugin's markdown: the generic runner from `@mnaoumov/typescript-dev-toolkit`, which copies
|
|
6
|
+
* this package's `.markdownlint-cli2.mjs` template into a project that has no configuration yet.
|
|
7
|
+
*/
|
|
8
|
+
import type { LintOptions } from '@mnaoumov/typescript-dev-toolkit/linters/markdownlint' with { 'resolution-mode': 'import' };
|
|
9
|
+
/**
|
|
10
|
+
* Lints the project's markdown with `markdownlint-cli2` and `linkinator`.
|
|
11
|
+
*
|
|
12
|
+
* @param options - The {@link LintOptions}.
|
|
13
|
+
*/
|
|
14
|
+
export declare function lint(options?: LintOptions): Promise<void>;
|
|
15
|
+
export { type LintOptions } from '@mnaoumov/typescript-dev-toolkit/linters/markdownlint';
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/*
|
|
2
|
+
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
3
|
+
if you want to view the source, please visit the github repository of this plugin
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
function ensureDisposeSymbols(symbolConstructor = Symbol) {
|
|
8
|
+
symbolConstructor.asyncDispose ??= symbolConstructor.for('Symbol.asyncDispose');
|
|
9
|
+
symbolConstructor.dispose ??= symbolConstructor.for('Symbol.dispose');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function ensureBrowserProcess() {
|
|
13
|
+
const browserProcess = {
|
|
14
|
+
browser: true,
|
|
15
|
+
cwd() {
|
|
16
|
+
return '/';
|
|
17
|
+
},
|
|
18
|
+
env: {},
|
|
19
|
+
platform: 'android'
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line obsidianmd/no-global-this, unicorn/no-unnecessary-global-this -- Must stay `globalThis`-qualified: in the emitted banner a bare `process` is a free identifier, so reading it where the host has none throws a ReferenceError instead of yielding `undefined`. That is the very case this function exists to handle.
|
|
23
|
+
const existingProcess = globalThis.process;
|
|
24
|
+
|
|
25
|
+
if (!existingProcess) {
|
|
26
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
27
|
+
globalThis.process = browserProcess;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (existingProcess.versions?.node) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const existingProcessRecord = existingProcess;
|
|
36
|
+
|
|
37
|
+
for (const [key, value] of Object.entries(browserProcess)) {
|
|
38
|
+
existingProcessRecord[key] ??= value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
existingProcessRecord['browser'] = true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function keepName($unknown) {
|
|
45
|
+
return $unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
(function initCjs() {
|
|
49
|
+
// eslint-disable-next-line obsidianmd/no-global-this -- Actively use globalThis.
|
|
50
|
+
const globalThisRecord = globalThis;
|
|
51
|
+
ensureDisposeSymbols();
|
|
52
|
+
globalThisRecord['__name'] ??= keepName;
|
|
53
|
+
globalThisRecord['__extractDefault'] ??= extractDefault;
|
|
54
|
+
|
|
55
|
+
ensureBrowserProcess();
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line unicorn/consistent-function-scoping -- Serialized with initCjs into the banner; at module scope it would be left out of it.
|
|
58
|
+
function extractDefault(module) {
|
|
59
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
60
|
+
}
|
|
61
|
+
})();
|
|
62
|
+
})();
|
|
63
|
+
(function patchObsidianRequire() {
|
|
64
|
+
const originalRequire = require;
|
|
65
|
+
if (!originalRequire || originalRequire.__isPatched) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// eslint-disable-next-line no-global-assign, no-implicit-globals -- We need to patch the `require()` function.
|
|
70
|
+
require = Object.assign(
|
|
71
|
+
(id) => requirePatched(id),
|
|
72
|
+
originalRequire,
|
|
73
|
+
{
|
|
74
|
+
__isPatched: true
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
function extractDefault(module) {
|
|
79
|
+
return module && module.__esModule && 'default' in module ? module.default : module;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
83
|
+
'@codemirror/autocomplete',
|
|
84
|
+
'@codemirror/collab',
|
|
85
|
+
'@codemirror/commands',
|
|
86
|
+
'@codemirror/language',
|
|
87
|
+
'@codemirror/lint',
|
|
88
|
+
'@codemirror/search',
|
|
89
|
+
'@codemirror/state',
|
|
90
|
+
'@codemirror/text',
|
|
91
|
+
'@codemirror/view',
|
|
92
|
+
'@lezer/common',
|
|
93
|
+
'@lezer/highlight',
|
|
94
|
+
'@lezer/lr',
|
|
95
|
+
'obsidian']
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES = new Set([
|
|
99
|
+
'@codemirror/closebrackets',
|
|
100
|
+
'@codemirror/comment',
|
|
101
|
+
'@codemirror/fold',
|
|
102
|
+
'@codemirror/gutter',
|
|
103
|
+
'@codemirror/highlight',
|
|
104
|
+
'@codemirror/history',
|
|
105
|
+
'@codemirror/matchbrackets',
|
|
106
|
+
'@codemirror/panel',
|
|
107
|
+
'@codemirror/rangeset',
|
|
108
|
+
'@codemirror/rectangular-selection',
|
|
109
|
+
'@codemirror/stream-parser',
|
|
110
|
+
'@codemirror/tooltip']
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
function requirePatched(id) {
|
|
114
|
+
if (OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id) || DEPRECATED_OBSIDIAN_BUILT_IN_MODULE_NAMES.has(id)) {
|
|
115
|
+
return originalRequire?.(id);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated, obsidianmd/no-global-this -- Need access to app. Actively use globalThis.
|
|
119
|
+
if (globalThis.app.isMobile) {
|
|
120
|
+
if (id === 'process' || id === 'node:process') {
|
|
121
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
122
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Fake process object is returned instead.`);
|
|
123
|
+
|
|
124
|
+
return process;
|
|
125
|
+
}
|
|
126
|
+
} else {
|
|
127
|
+
const module = originalRequire?.(id);
|
|
128
|
+
if (module) {
|
|
129
|
+
return extractDefault(module);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line no-console -- Valid usage.
|
|
134
|
+
console.debug(`The most likely you can safely ignore this error. Module not found: ${id}. Empty object is returned instead.`);
|
|
135
|
+
return {};
|
|
136
|
+
}
|
|
137
|
+
})();
|
|
138
|
+
|
|
139
|
+
"use strict";
|
|
140
|
+
var __defProp = Object.defineProperty;
|
|
141
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
142
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
143
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
144
|
+
var __export = (target, all) => {
|
|
145
|
+
for (var name in all)
|
|
146
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
147
|
+
};
|
|
148
|
+
var __copyProps = (to, from, except, desc) => {
|
|
149
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
150
|
+
for (let key of __getOwnPropNames(from))
|
|
151
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
152
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
153
|
+
}
|
|
154
|
+
return to;
|
|
155
|
+
};
|
|
156
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
157
|
+
var obsidianmd_rule_custom_message_exports = {};
|
|
158
|
+
__export(obsidianmd_rule_custom_message_exports, {
|
|
159
|
+
RULE_CUSTOM_MESSAGE_RULE_NAME: () => RULE_CUSTOM_MESSAGE_RULE_NAME,
|
|
160
|
+
stripOwnedRuleCustomMessageEntries: () => stripOwnedRuleCustomMessageEntries
|
|
161
|
+
});
|
|
162
|
+
module.exports = __toCommonJS(obsidianmd_rule_custom_message_exports);
|
|
163
|
+
const RULE_CUSTOM_MESSAGE_RULE_NAME = "obsidianmd/rule-custom-message";
|
|
164
|
+
function stripOwnedRuleCustomMessageEntries(params) {
|
|
165
|
+
const { config, ownedRuleNames } = params;
|
|
166
|
+
const ruleEntry = config.rules?.[RULE_CUSTOM_MESSAGE_RULE_NAME];
|
|
167
|
+
if (!Array.isArray(ruleEntry)) {
|
|
168
|
+
return config;
|
|
169
|
+
}
|
|
170
|
+
const [severity, wrappedRules, ...restOptions] = ruleEntry;
|
|
171
|
+
if (typeof wrappedRules !== "object" || wrappedRules === null) {
|
|
172
|
+
return config;
|
|
173
|
+
}
|
|
174
|
+
const keptEntries = Object.entries(wrappedRules).filter(([ruleName]) => !ownedRuleNames.has(ruleName));
|
|
175
|
+
const narrowedRuleEntry = keptEntries.length === 0 ? "off" : [severity, Object.fromEntries(keptEntries), ...restOptions];
|
|
176
|
+
return {
|
|
177
|
+
...config,
|
|
178
|
+
rules: {
|
|
179
|
+
...config.rules,
|
|
180
|
+
[RULE_CUSTOM_MESSAGE_RULE_NAME]: narrowedRuleEntry
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
+
0 && (module.exports = {
|
|
186
|
+
RULE_CUSTOM_MESSAGE_RULE_NAME,
|
|
187
|
+
stripOwnedRuleCustomMessageEntries
|
|
188
|
+
});
|
|
189
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIj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M3QixXQUFPO0FBQUEsRUFDVDtBQUVBLFFBQU0sQ0FBQyxVQUFVLGNBQWMsR0FBRyxXQUFXLElBQUk7QUFDakQsTUFBSSxPQUFPLGlCQUFpQixZQUFZLGlCQUFpQixNQUFNO0FBQzdELFdBQU87QUFBQSxFQUNUO0FBRUEsUUFBTSxjQUFjLE9BQU8sUUFBUSxZQUFZLEVBQUUsT0FBTyxDQUFDLENBQUMsUUFBUSxNQUFNLENBQUMsZUFBZSxJQUFJLFFBQVEsQ0FBQztBQUNyRyxRQUFNLG9CQUFzQyxZQUFZLFdBQVcsSUFDL0QsUUFDQSxDQUFDLFVBQWlDLE9BQU8sWUFBWSxXQUFXLEdBQUcsR0FBRyxXQUFXO0FBRXJGLFNBQU87QUFBQSxJQUNMLEdBQUc7QUFBQSxJQUNILE9BQU87QUFBQSxNQUNMLEdBQUcsT0FBTztBQUFBLE1BQ1YsQ0FBQyw2QkFBNkIsR0FBRztBQUFBLElBQ25DO0FBQUEsRUFDRjtBQUNGOyIsCiAgIm5hbWVzIjogW10KfQo=
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference path="../index.d.cts" />
|
|
2
|
+
/**
|
|
3
|
+
* @file
|
|
4
|
+
*
|
|
5
|
+
* Keeps `obsidianmd/rule-custom-message` from re-running a builtin rule this library's own config already sets.
|
|
6
|
+
*
|
|
7
|
+
* `eslint-plugin-obsidianmd`'s recommended config turns `no-console` and `no-new-func` off and re-runs each through
|
|
8
|
+
* `obsidianmd/rule-custom-message`, which fetches the builtin rule and reports its findings under its OWN rule id. So
|
|
9
|
+
* the severity a consumer writes on `no-console` is never consulted: `'no-console': 'off'` is inert, and the error
|
|
10
|
+
* that remains names a rule the consumer never configured. This library sets both builtins itself, stricter, so in
|
|
11
|
+
* every consumer the wrapper added nothing but a second report of the same line.
|
|
12
|
+
*/
|
|
13
|
+
import type { Linter } from 'eslint' with { 'resolution-mode': 'import' };
|
|
14
|
+
/**
|
|
15
|
+
* The rule id of the wrapper that re-reports builtin rules under its own name.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RULE_CUSTOM_MESSAGE_RULE_NAME = "obsidianmd/rule-custom-message";
|
|
18
|
+
/**
|
|
19
|
+
* Parameters for {@link stripOwnedRuleCustomMessageEntries}.
|
|
20
|
+
*/
|
|
21
|
+
export interface StripOwnedRuleCustomMessageEntriesParams {
|
|
22
|
+
/**
|
|
23
|
+
* The config whose `obsidianmd/rule-custom-message` entry is narrowed.
|
|
24
|
+
*/
|
|
25
|
+
readonly config: Linter.Config;
|
|
26
|
+
/**
|
|
27
|
+
* The builtin rule names this library's own config sets, which the wrapper must no longer re-run.
|
|
28
|
+
*/
|
|
29
|
+
readonly ownedRuleNames: ReadonlySet<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Removes from a config's `obsidianmd/rule-custom-message` options every wrapped rule named in `ownedRuleNames`.
|
|
33
|
+
*
|
|
34
|
+
* An entry for a rule NOT in the set keeps running through the wrapper, so an entry upstream adds later is not
|
|
35
|
+
* silently dropped. When nothing is left the wrapper is turned `off` rather than run with an empty map.
|
|
36
|
+
*
|
|
37
|
+
* @param params - The parameters.
|
|
38
|
+
* @returns The config, unchanged when it carries no narrowable wrapper entry, otherwise a narrowed copy.
|
|
39
|
+
*/
|
|
40
|
+
export declare function stripOwnedRuleCustomMessageEntries(params: StripOwnedRuleCustomMessageEntriesParams): Linter.Config;
|