obsidian-plugin-config 1.4.7 → 1.5.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/.editorconfig +13 -13
- package/.injection-info.json +5 -5
- package/.vscode/settings.json +11 -11
- package/.vscode/tasks.json +118 -118
- package/README.md +147 -192
- package/bin/obsidian-inject.js +8 -1
- package/eslint.config.mts +64 -64
- package/package.json +1 -1
- package/scripts/build-npm.ts +357 -346
- package/scripts/esbuild.config.ts +268 -268
- package/scripts/help.ts +152 -152
- package/scripts/inject-core.ts +725 -725
- package/scripts/inject-path.ts +10 -0
- package/scripts/inject-prompt.ts +11 -0
- package/scripts/utils.ts +151 -151
- package/tsconfig.json +30 -30
- package/versions.json +3 -1
package/eslint.config.mts
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import * as typescriptEslintParser from "@typescript-eslint/parser";
|
|
2
|
-
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
3
|
-
import "eslint-import-resolver-typescript";
|
|
4
|
-
import type {
|
|
5
|
-
Linter
|
|
6
|
-
} from "eslint";
|
|
7
|
-
|
|
8
|
-
const configs: Linter.Config[] = [
|
|
9
|
-
{
|
|
10
|
-
ignores: [
|
|
11
|
-
"eslint.config.mts",
|
|
12
|
-
"templates/**"
|
|
13
|
-
]
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
files: ["**/*.ts"],
|
|
17
|
-
ignores: [
|
|
18
|
-
"dist/**",
|
|
19
|
-
"node_modules/**",
|
|
20
|
-
"main.js"
|
|
21
|
-
],
|
|
22
|
-
languageOptions: {
|
|
23
|
-
parser: typescriptEslintParser,
|
|
24
|
-
sourceType: "module",
|
|
25
|
-
parserOptions: {
|
|
26
|
-
project: "./tsconfig.json",
|
|
27
|
-
ecmaVersion: 2023
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
plugins: {
|
|
31
|
-
"@typescript-eslint": typescriptEslintPlugin as any // Type assertion to bypass type checking
|
|
32
|
-
},
|
|
33
|
-
rules: {
|
|
34
|
-
// Base rules
|
|
35
|
-
"no-unused-vars": "off",
|
|
36
|
-
"@typescript-eslint/no-unused-vars": ["error", { "args": "none", "varsIgnorePattern": "^_" }],
|
|
37
|
-
"@typescript-eslint/ban-ts-comment": "warn",
|
|
38
|
-
"no-prototype-builtins": "off",
|
|
39
|
-
"@typescript-eslint/no-empty-function": "off",
|
|
40
|
-
|
|
41
|
-
// Useful rules but not too strict
|
|
42
|
-
"semi": "error",
|
|
43
|
-
"eqeqeq": ["error", "always"],
|
|
44
|
-
"prefer-const": "error",
|
|
45
|
-
"@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }],
|
|
46
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
47
|
-
"@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports" }],
|
|
48
|
-
|
|
49
|
-
// Disable overly strict rules
|
|
50
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
51
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
|
52
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
53
|
-
"@typescript-eslint/no-unsafe-argument": "off"
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
files: ["src/**/*.ts"],
|
|
58
|
-
rules: {
|
|
59
|
-
"no-console": ["warn", { "allow": ["warn", "error", "debug"] }]
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
];
|
|
63
|
-
|
|
64
|
-
export default configs;
|
|
1
|
+
import * as typescriptEslintParser from "@typescript-eslint/parser";
|
|
2
|
+
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
|
|
3
|
+
import "eslint-import-resolver-typescript";
|
|
4
|
+
import type {
|
|
5
|
+
Linter
|
|
6
|
+
} from "eslint";
|
|
7
|
+
|
|
8
|
+
const configs: Linter.Config[] = [
|
|
9
|
+
{
|
|
10
|
+
ignores: [
|
|
11
|
+
"eslint.config.mts",
|
|
12
|
+
"templates/**"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
files: ["**/*.ts"],
|
|
17
|
+
ignores: [
|
|
18
|
+
"dist/**",
|
|
19
|
+
"node_modules/**",
|
|
20
|
+
"main.js"
|
|
21
|
+
],
|
|
22
|
+
languageOptions: {
|
|
23
|
+
parser: typescriptEslintParser,
|
|
24
|
+
sourceType: "module",
|
|
25
|
+
parserOptions: {
|
|
26
|
+
project: "./tsconfig.json",
|
|
27
|
+
ecmaVersion: 2023
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
plugins: {
|
|
31
|
+
"@typescript-eslint": typescriptEslintPlugin as any // Type assertion to bypass type checking
|
|
32
|
+
},
|
|
33
|
+
rules: {
|
|
34
|
+
// Base rules
|
|
35
|
+
"no-unused-vars": "off",
|
|
36
|
+
"@typescript-eslint/no-unused-vars": ["error", { "args": "none", "varsIgnorePattern": "^_" }],
|
|
37
|
+
"@typescript-eslint/ban-ts-comment": "warn",
|
|
38
|
+
"no-prototype-builtins": "off",
|
|
39
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
40
|
+
|
|
41
|
+
// Useful rules but not too strict
|
|
42
|
+
"semi": "error",
|
|
43
|
+
"eqeqeq": ["error", "always"],
|
|
44
|
+
"prefer-const": "error",
|
|
45
|
+
"@typescript-eslint/explicit-function-return-type": ["warn", { "allowExpressions": true }],
|
|
46
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
47
|
+
"@typescript-eslint/consistent-type-imports": ["warn", { "prefer": "type-imports" }],
|
|
48
|
+
|
|
49
|
+
// Disable overly strict rules
|
|
50
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
51
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
52
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
53
|
+
"@typescript-eslint/no-unsafe-argument": "off"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
files: ["src/**/*.ts"],
|
|
58
|
+
rules: {
|
|
59
|
+
"no-console": ["warn", { "allow": ["warn", "error", "debug"] }]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
export default configs;
|