Type fixes in app (part 1) (#16545)

* Fix paths of imports

* Process not-found.vue as ts

To prevent the following error from 'vue-tsc':
  error TS6504: File '/Users/pascal/Development/directus/app/src/modules/insights/routes/not-found.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?

Note: We could also enable 'allowJS' but since this is the only js file
this seems to be a more fitting fix

* Drop hljs language definition for GraphQL (now in core)

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
Pascal Jufer
2023-01-09 19:29:03 +01:00
committed by GitHub
parent bc82c7bb8c
commit c16be6f644
18 changed files with 18 additions and 64 deletions

View File

@@ -1,45 +0,0 @@
import { HASH_COMMENT_MODE, NUMBER_MODE, QUOTE_STRING_MODE } from 'highlight.js';
export default (): LanguageDetail & ModeDetails => ({
aliases: ['gql'],
keywords: {
keyword:
'query mutation subscription|10 type input schema directive interface union scalar fragment|10 enum on ...',
literal: 'true false null',
},
contains: [
HASH_COMMENT_MODE,
QUOTE_STRING_MODE,
NUMBER_MODE,
{
className: 'type',
begin: '[^\\w][A-Z][a-z]',
end: '\\W',
excludeEnd: !0,
},
{
className: 'literal',
begin: '[^\\w][A-Z][A-Z]',
end: '\\W',
excludeEnd: !0,
},
{
className: 'variable',
begin: '\\$',
end: '\\W',
excludeEnd: !0,
},
{
className: 'keyword',
begin: '[.]{2}',
end: '\\.',
},
{
className: 'meta',
begin: '@',
end: '\\W',
excludeEnd: !0,
},
],
illegal: /([;<']|BEGIN)/,
});

View File

@@ -19,6 +19,7 @@ export function unexpectedError(error: Error | RequestError | APIError): void {
store.add({
title: i18n.global.t(`errors.${code}`),
type: 'error',
code,
dialog: true,
error,
});