diff --git a/components.d.ts b/components.d.ts index 4e5286e3..9ae229b3 100644 --- a/components.d.ts +++ b/components.d.ts @@ -131,15 +131,20 @@ declare module '@vue/runtime-core' { NA: typeof import('naive-ui')['NA'] NAlert: typeof import('naive-ui')['NAlert'] NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] + NCode: typeof import('naive-ui')['NCode'] NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NEllipsis: typeof import('naive-ui')['NEllipsis'] + NFormItem: typeof import('naive-ui')['NFormItem'] NH1: typeof import('naive-ui')['NH1'] NH3: typeof import('naive-ui')['NH3'] NIcon: typeof import('naive-ui')['NIcon'] + NInputNumber: typeof import('naive-ui')['NInputNumber'] NLayout: typeof import('naive-ui')['NLayout'] NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMenu: typeof import('naive-ui')['NMenu'] + NScrollbar: typeof import('naive-ui')['NScrollbar'] + NSwitch: typeof import('naive-ui')['NSwitch'] NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default'] OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default'] PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] diff --git a/src/tools/json-linter/json-linter.vue b/src/tools/json-linter/json-linter.vue index 0b137187..45c56bc6 100644 --- a/src/tools/json-linter/json-linter.vue +++ b/src/tools/json-linter/json-linter.vue @@ -8,18 +8,16 @@ const jsonContent = ref( }`, ); -const conversionResult = computed(() => { +const conversionError = computed(() => { try { linter.parse(jsonContent.value); - return JSON.stringify(JSON.parse(jsonContent.value), null, 2); + return null; } catch (e: any) { - return e.toString().split('\n').map((err: string) => ({ line: -1, message: err, helpLink: '' })); + return e.toString(); } }); -const errors = computed(() => conversionResult.value); - const MONACO_EDITOR_OPTIONS = { automaticLayout: true, formatOnType: true, @@ -41,15 +39,11 @@ const MONACO_EDITOR_OPTIONS = { -
+ {{ conversionError }} +