mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
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:
@@ -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)/,
|
||||
});
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user