monaco-mermaid-ng 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.
@@ -0,0 +1,86 @@
1
+ // @ts-check
2
+ import js from '@eslint/js';
3
+ import tseslint from 'typescript-eslint';
4
+ import pluginESx from 'eslint-plugin-es-x';
5
+ import stylistic from '@stylistic/eslint-plugin';
6
+ import eslintConfigPrettier from 'eslint-config-prettier';
7
+ import globals from 'globals';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { dirname } from 'node:path';
10
+
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = dirname(__filename);
13
+
14
+ export default tseslint.config(
15
+ // Global ignores
16
+ {
17
+ ignores: [
18
+ 'node_modules/**',
19
+ 'dist/**',
20
+ 'build/**',
21
+ '*.js',
22
+ '*.d.ts',
23
+ '!eslint.config.js',
24
+ ],
25
+ },
26
+
27
+ // Base recommended configs
28
+ js.configs.recommended,
29
+
30
+ // TypeScript type-checked configs
31
+ ...tseslint.configs.recommendedTypeChecked,
32
+ ...tseslint.configs.stylisticTypeChecked,
33
+
34
+ // Main TypeScript configuration
35
+ {
36
+ files: ['**/*.ts'],
37
+ languageOptions: {
38
+ globals: {
39
+ ...globals.browser,
40
+ ...globals.node,
41
+ },
42
+ parserOptions: {
43
+ project: true,
44
+ tsconfigRootDir: __dirname,
45
+ },
46
+ },
47
+ plugins: {
48
+ 'es-x': pluginESx,
49
+ '@stylistic': stylistic,
50
+ },
51
+ rules: {
52
+ // ES-X: Prevent RegExp lookbehind for browser compatibility
53
+ 'es-x/no-regexp-lookbehind-assertions': 'error',
54
+
55
+ // TypeScript strict rules
56
+ '@typescript-eslint/no-unused-vars': [
57
+ 'error',
58
+ { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
59
+ ],
60
+ '@typescript-eslint/no-explicit-any': 'warn',
61
+ '@typescript-eslint/consistent-type-imports': [
62
+ 'error',
63
+ { prefer: 'type-imports', fixStyle: 'inline-type-imports' },
64
+ ],
65
+ '@typescript-eslint/no-import-type-side-effects': 'error',
66
+
67
+ // Stylistic rules
68
+ '@stylistic/semi': ['error', 'always'],
69
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
70
+ },
71
+ },
72
+
73
+ // ESLint config file (JS)
74
+ {
75
+ files: ['eslint.config.js'],
76
+ languageOptions: {
77
+ globals: {
78
+ ...globals.node,
79
+ },
80
+ },
81
+ ...tseslint.configs.disableTypeChecked,
82
+ },
83
+
84
+ // Prettier config - must be last to override conflicting rules
85
+ eslintConfigPrettier
86
+ );
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type * as Monaco from 'monaco-editor';
2
+ declare const _default: (monacoEditor: typeof Monaco) => void;
3
+ export default _default;