Force `import type` to guarantee import removal
This commit is contained in:
parent
78cbfe8279
commit
07dfbf5d5a
|
@ -184,6 +184,10 @@ module.exports = {
|
|||
},
|
||||
'extendDefaults': true
|
||||
}
|
||||
],
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'warn',
|
||||
{ disallowTypeAnnotations: true }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2,12 +2,15 @@ import { getLanguage, setLanguage } from '../shared/dom-util';
|
|||
import { rest, tokenize } from '../shared/symbols';
|
||||
import { htmlEncode } from '../shared/util';
|
||||
import { HookState } from './hook-state';
|
||||
import { HookEnvMap, Hooks } from './hooks';
|
||||
import { LinkedList, LinkedListHeadNode, LinkedListMiddleNode, LinkedListTailNode } from './linked-list';
|
||||
import { Hooks } from './hooks';
|
||||
import { LinkedList } from './linked-list';
|
||||
import { Registry } from './registry';
|
||||
import { Token, TokenStream } from './token';
|
||||
import { Token } from './token';
|
||||
import type { KnownPlugins } from '../known-plugins';
|
||||
import type { Grammar, GrammarToken, GrammarTokens } from '../types';
|
||||
import type { HookEnvMap } from './hooks';
|
||||
import type { LinkedListHeadNode, LinkedListMiddleNode, LinkedListTailNode } from './linked-list';
|
||||
import type { TokenStream } from './token';
|
||||
|
||||
/**
|
||||
* Prism: Lightweight, robust, elegant syntax highlighting
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { extend } from '../shared/language-util';
|
||||
import { forEach, kebabToCamelCase } from '../shared/util';
|
||||
import { ComponentProto, Grammar } from '../types';
|
||||
import type { ComponentProto, Grammar } from '../types';
|
||||
import type { Prism } from './prism';
|
||||
|
||||
interface Entry {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { Autoloader } from './plugins/autoloader/prism-autoloader';
|
||||
import { CustomClass } from './plugins/custom-class/prism-custom-class';
|
||||
import { FileHighlight } from './plugins/file-highlight/prism-file-highlight';
|
||||
import { FilterHighlightAll } from './plugins/filter-highlight-all/prism-filter-highlight-all';
|
||||
import { JsonpHighlight } from './plugins/jsonp-highlight/prism-jsonp-highlight';
|
||||
import { LineHighlight } from './plugins/line-highlight/prism-line-highlight';
|
||||
import { LineNumbers } from './plugins/line-numbers/prism-line-numbers';
|
||||
import { NormalizeWhitespace } from './plugins/normalize-whitespace/prism-normalize-whitespace';
|
||||
import { PreviewerCollection } from './plugins/previewers/prism-previewers';
|
||||
import { Toolbar } from './plugins/toolbar/prism-toolbar';
|
||||
import type { Autoloader } from './plugins/autoloader/prism-autoloader';
|
||||
import type { CustomClass } from './plugins/custom-class/prism-custom-class';
|
||||
import type { FileHighlight } from './plugins/file-highlight/prism-file-highlight';
|
||||
import type { FilterHighlightAll } from './plugins/filter-highlight-all/prism-filter-highlight-all';
|
||||
import type { JsonpHighlight } from './plugins/jsonp-highlight/prism-jsonp-highlight';
|
||||
import type { LineHighlight } from './plugins/line-highlight/prism-line-highlight';
|
||||
import type { LineNumbers } from './plugins/line-numbers/prism-line-numbers';
|
||||
import type { NormalizeWhitespace } from './plugins/normalize-whitespace/prism-normalize-whitespace';
|
||||
import type { PreviewerCollection } from './plugins/previewers/prism-previewers';
|
||||
import type { Toolbar } from './plugins/toolbar/prism-toolbar';
|
||||
|
||||
declare interface KnownPlugins {
|
||||
autoloader: Autoloader;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { LanguageProto } from '../types';
|
||||
import type { Grammar, LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
id: 'bash',
|
||||
|
@ -17,7 +17,7 @@ export default {
|
|||
inside: 'bash'
|
||||
};
|
||||
|
||||
const commandSubstitutionInside: import('../types').Grammar = {
|
||||
const commandSubstitutionInside: Grammar = {
|
||||
'variable': /^\$\(|^`|\)$|`$/
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Token } from '../core';
|
||||
import { withoutTokenize } from '../shared/language-util';
|
||||
import { tokenize } from '../shared/symbols';
|
||||
import type { Token } from '../core';
|
||||
import type { LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { Token, TokenStream, getTextContent } from '../core/token';
|
||||
import { Token, getTextContent } from '../core/token';
|
||||
import { insertBefore, withoutTokenize } from '../shared/language-util';
|
||||
import { rest, tokenize } from '../shared/symbols';
|
||||
import javascript from './prism-javascript';
|
||||
import markup from './prism-markup';
|
||||
import type { TokenStream } from '../core/token';
|
||||
import type { Grammar, GrammarToken, LanguageProto } from '../types';
|
||||
|
||||
function stringifyToken(token: string | Token | TokenStream | undefined): string {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { LanguageProto } from '../types';
|
||||
import type { GrammarToken, LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
id: 'pascal',
|
||||
|
@ -28,7 +28,7 @@ export default {
|
|||
pattern: /(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,
|
||||
lookbehind: true,
|
||||
greedy: true,
|
||||
inside: null as import('../types').GrammarToken['inside'] // see below
|
||||
inside: null as GrammarToken['inside'] // see below
|
||||
},
|
||||
'keyword': [
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { LanguageProto } from '../types';
|
||||
import type { Grammar, LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
id: 'pascaligo',
|
||||
|
@ -8,7 +8,7 @@ export default {
|
|||
const braces = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source;
|
||||
const type = /(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g, () => braces);
|
||||
|
||||
const classNameInside: import('../types').Grammar = {};
|
||||
const classNameInside: Grammar = {};
|
||||
|
||||
const pascaligo = {
|
||||
'comment': /\(\*[\s\S]+?\*\)|\/\/.*/,
|
||||
|
|
|
@ -2,7 +2,7 @@ import { insertBefore } from '../shared/language-util';
|
|||
import { rest } from '../shared/symbols';
|
||||
import javascript from './prism-javascript';
|
||||
import markup from './prism-markup';
|
||||
import type { LanguageProto } from '../types';
|
||||
import type { GrammarTokens, LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
id: 'pug',
|
||||
|
@ -169,7 +169,7 @@ export default {
|
|||
{ filter: 'sass', language: 'scss' },
|
||||
'stylus'
|
||||
];
|
||||
const all_filters: import('../types').GrammarTokens = {};
|
||||
const all_filters: GrammarTokens = {};
|
||||
for (const filterItem of filters) {
|
||||
const { filter, language } = typeof filterItem === 'string' ? { filter: filterItem, language: filterItem } : filterItem;
|
||||
all_filters['filter-' + filter] = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { LanguageProto } from '../types';
|
||||
import type { Grammar, LanguageProto } from '../types';
|
||||
|
||||
export default {
|
||||
id: 'web-idl',
|
||||
|
@ -14,7 +14,7 @@ export default {
|
|||
/(?!(?:unrestricted|unsigned)\b)/.source + id + /(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source +
|
||||
')' + /(?:\s*\?)?/.source;
|
||||
|
||||
const typeInside: import('../types').Grammar = {};
|
||||
const typeInside: Grammar = {};
|
||||
|
||||
const webIdl = {
|
||||
'comment': {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Token, TokenStream, getTextContent } from '../core/token';
|
||||
import { Token, getTextContent } from '../core/token';
|
||||
import { withoutTokenize } from '../shared/language-util';
|
||||
import { tokenize } from '../shared/symbols';
|
||||
import markup from './prism-markup';
|
||||
import type { TokenStream } from '../core/token';
|
||||
import type { Grammar, GrammarToken, LanguageProto } from '../types';
|
||||
|
||||
function walkTokens(tokens: TokenStream) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { tokenizeStrings } from '../../shared/tokenize-strings';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'autolinker',
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { getParentPre } from '../../shared/dom-util';
|
||||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { htmlEncode } from '../../shared/util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { StateKey } from '../../core/hook-state';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
const CLASS_PATTERN = /(?:^|\s)command-line(?:\s|$)/;
|
||||
const PROMPT_CLASS = 'command-line-prompt';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
type ClassMapper = (className: string) => string;
|
||||
type ClassAdder = (env: ClassAdderEnvironment) => undefined | string | string[];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tokenizeStrings } from '../../shared/tokenize-strings';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'data-uri-highlight',
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { BeforeSanityCheckEnv, BeforeTokenizeEnv } from '../../core/hooks';
|
||||
import { Token, TokenStream, getTextContent } from '../../core/token';
|
||||
import { Token, getTextContent } from '../../core/token';
|
||||
import diff, { PREFIXES } from '../../languages/prism-diff';
|
||||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { BeforeSanityCheckEnv, BeforeTokenizeEnv } from '../../core/hooks';
|
||||
import type { TokenStream } from '../../core/token';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'diff-highlight',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { getParentPre } from '../../shared/dom-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import toolbar from '../toolbar/prism-toolbar';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'download-button',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { setLanguage } from '../../shared/dom-util';
|
||||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { Prism } from '../../core';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
const FAILURE_MESSAGE = (status: number, message: string) => {
|
||||
return `✖ Error ${status} while fetching file: ${message}`;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getLanguage } from '../../shared/dom-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
type Condition = (value: { element: Element; language: string }) => boolean;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'highlight-keywords',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import cssExtras from '../../languages/prism-css-extras';
|
||||
import { MARKUP_TAG } from '../../shared/languages/patterns';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
const HTML_TAG = RegExp(MARKUP_TAG, 'g');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Prism } from '../../core';
|
||||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { Prism } from '../../core';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
function getGlobal(): Record<string, unknown> {
|
||||
return typeof window === 'object' ? window as never : {};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { StateKey } from '../../core/hook-state';
|
||||
import { isActive } from '../../shared/dom-util';
|
||||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { StateKey } from '../../core/hook-state';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
function isElement(child: ChildNode): child is Element {
|
||||
return child.nodeType === 1;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Prism } from '../../core';
|
||||
import { isActive } from '../../shared/dom-util';
|
||||
import { combineCallbacks } from '../../shared/hooks-util';
|
||||
import { lazy, noop } from '../../shared/util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { Prism } from '../../core';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
const LINE_NUMBERS_CLASS = 'line-numbers';
|
||||
const LINKABLE_LINE_NUMBERS_CLASS = 'linkable-line-numbers';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getParentPre, isActive } from '../../shared/dom-util';
|
||||
import { combineCallbacks } from '../../shared/hooks-util';
|
||||
import { isNonNull, noop } from '../../shared/util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
/**
|
||||
* Plugin name which is used as a class name for <pre> which is activating the plugin
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getParentPre, isActive } from '../../shared/dom-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'match-braces',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { getParentPre, isActive } from '../../shared/dom-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
function tabLength(str: string) {
|
||||
let res = 0;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import cssExtras from '../../languages/prism-css-extras';
|
||||
import { forEach } from '../../shared/util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
/**
|
||||
* Returns the absolute X, Y offsets for an element
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { tokenizeStrings } from '../../shared/tokenize-strings';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'show-invisibles',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { getParentPre } from '../../shared/dom-util';
|
||||
import { getTitle } from '../../shared/meta/title-data';
|
||||
import { PluginProto } from '../../types';
|
||||
import toolbar from '../toolbar/prism-toolbar';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'show-language',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CompleteEnv, HookCallback } from '../../core/hooks';
|
||||
import { getParentPre } from '../../shared/dom-util';
|
||||
import { noop } from '../../shared/util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { CompleteEnv, HookCallback } from '../../core/hooks';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
/**
|
||||
* Returns the callback order of the given element.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import treeview from '../../languages/prism-treeview';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'treeview-icons',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { addHooks } from '../../shared/hooks-util';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
export default {
|
||||
id: 'unescaped-markup',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import cssSelector from '../../languages/prism-css-selector';
|
||||
import { PluginProto } from '../../types';
|
||||
import type { PluginProto } from '../../types';
|
||||
|
||||
const htmlTags = new Set<string>([
|
||||
'a', 'abbr', 'acronym', 'b', 'basefont', 'bdo', 'big', 'blink', 'cite', 'code', 'dfn', 'em', 'kbd', 'i',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { HookCallback, HookEnvMap, Hooks } from '../core/hooks';
|
||||
import type { HookCallback, HookEnvMap, Hooks } from '../core/hooks';
|
||||
|
||||
/**
|
||||
* Returns a single function that calls all the given functions.
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { Token, TokenStream, getTextContent } from '../../core/token';
|
||||
import { getTextContent } from '../../core/token';
|
||||
import { withoutTokenize } from '../language-util';
|
||||
import type { Prism } from '../../core';
|
||||
import type { Registry } from '../../core/registry';
|
||||
import type { Token, TokenStream } from '../../core/token';
|
||||
import type { Grammar } from '../../types';
|
||||
import type { tokenize } from '../symbols';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { TokenStream } from '../core/token';
|
||||
import type { TokenStream } from '../core/token';
|
||||
|
||||
/**
|
||||
* Given a token stream and a tokenization function, this will tokenize all
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { KebabToCamelCase } from '../types';
|
||||
import type { KebabToCamelCase } from '../types';
|
||||
|
||||
/**
|
||||
* Returns a function that caches the result of the given supplier.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Prism } from './core/prism';
|
||||
import { TokenStream } from './core/token';
|
||||
import { KnownPlugins } from './known-plugins';
|
||||
import { rest, tokenize } from './shared/symbols';
|
||||
import type { Prism } from './core/prism';
|
||||
import type { TokenStream } from './core/token';
|
||||
import type { KnownPlugins } from './known-plugins';
|
||||
import type { rest, tokenize } from './shared/symbols';
|
||||
|
||||
export interface GrammarOptions {
|
||||
readonly getLanguage: (id: string) => Grammar;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { assert } from 'chai';
|
||||
import { Prism } from '../../src/core/prism';
|
||||
import { Grammar } from '../../src/types';
|
||||
import { simplify } from '../helper/token-stream-transformer';
|
||||
import type { Grammar } from '../../src/types';
|
||||
|
||||
function testTokens({ grammar, code, expected }: { grammar: Grammar, code: string, expected: unknown }) {
|
||||
const instance = new Prism();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
import { KebabToCamelCase } from '../../src/types';
|
||||
import { PrismDOM, PrismWindow, createPrismDOM } from './prism-loader';
|
||||
import { createPrismDOM } from './prism-loader';
|
||||
import { assertEqual, useSnapshot } from './snapshot';
|
||||
import { formatHtml } from './util';
|
||||
import type { KebabToCamelCase } from '../../src/types';
|
||||
import type { PrismDOM, PrismWindow } from './prism-loader';
|
||||
|
||||
interface AssertOptions {
|
||||
language?: string;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { readdirSync } from 'fs';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { DOMWindow } from 'jsdom';
|
||||
import path from 'path';
|
||||
import { Prism } from '../../src/core/prism';
|
||||
import { isNonNull, lazy, noop, toArray } from '../../src/shared/util';
|
||||
import { LanguageProto, PluginProto } from '../../src/types';
|
||||
import type { ComponentProto, LanguageProto, PluginProto } from '../../src/types';
|
||||
import type { DOMWindow } from 'jsdom';
|
||||
|
||||
const SRC_DIR = path.join(__dirname, '../../src');
|
||||
|
||||
|
@ -38,7 +38,7 @@ async function getComponentUncached(id: string) {
|
|||
return exports.default;
|
||||
}
|
||||
}
|
||||
const componentCache = new Map<string, Promise<import('../../src/types').ComponentProto>>();
|
||||
const componentCache = new Map<string, Promise<ComponentProto>>();
|
||||
export function getComponent(id: string) {
|
||||
let promise = componentCache.get(id);
|
||||
if (promise === undefined) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { assert } from 'chai';
|
||||
import fs from 'fs';
|
||||
import { Prism } from '../../src/core';
|
||||
import { TokenStream } from '../../src/core/token';
|
||||
import { createInstance } from './prism-loader';
|
||||
import * as TokenStreamTransformer from './token-stream-transformer';
|
||||
import { formatHtml, getLeadingSpaces } from './util';
|
||||
import type { Prism } from '../../src/core';
|
||||
import type { TokenStream } from '../../src/core/token';
|
||||
|
||||
/**
|
||||
* @param {string[]} languages
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as Prettier from 'prettier';
|
||||
import { RegExpParser } from 'regexpp';
|
||||
import { Flags, Pattern } from 'regexpp/ast';
|
||||
import type { Flags, Pattern } from 'regexpp/ast';
|
||||
|
||||
export interface LiteralAST {
|
||||
pattern: Pattern;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { assert } from 'chai';
|
||||
import { Prism, Token } from '../src/core';
|
||||
import { TokenStream } from '../src/core/token';
|
||||
import { toArray } from '../src/shared/util';
|
||||
import { createInstance, getComponent, getLanguageIds } from './helper/prism-loader';
|
||||
import { prettyprint } from './helper/token-stream-transformer';
|
||||
import type { Prism, Token } from '../src/core';
|
||||
import type { TokenStream } from '../src/core/token';
|
||||
|
||||
|
||||
// This is where you can exclude a language from the identifier test.
|
||||
|
|
|
@ -2,16 +2,17 @@ import { assert } from 'chai';
|
|||
import { JS, NFA, Transformers, Words, combineTransformers, getIntersectionWordSets, isDisjointWith, transform } from 'refa';
|
||||
import * as RAA from 'regexp-ast-analysis';
|
||||
import { visitRegExpAST } from 'regexpp';
|
||||
import { CapturingGroup, Element, Group, LookaroundAssertion, Node, Pattern } from 'regexpp/ast';
|
||||
import * as scslre from 'scslre';
|
||||
import { Prism } from '../src/core';
|
||||
import { lazy, toArray } from '../src/shared/util';
|
||||
import { Grammar, GrammarToken } from '../src/types';
|
||||
import * as args from './helper/args';
|
||||
import { createInstance, getComponent, getLanguageIds } from './helper/prism-loader';
|
||||
import { TestCaseFile, parseLanguageNames } from './helper/test-case';
|
||||
import { loadAllTests } from './helper/test-discovery';
|
||||
import { BFS, BFSPathToPrismTokenPath, LiteralAST, PathItem, isRegExp, parseRegex } from './helper/util';
|
||||
import { BFS, BFSPathToPrismTokenPath, isRegExp, parseRegex } from './helper/util';
|
||||
import type { Prism } from '../src/core';
|
||||
import type { Grammar, GrammarToken } from '../src/types';
|
||||
import type { LiteralAST, PathItem } from './helper/util';
|
||||
import type { CapturingGroup, Element, Group, LookaroundAssertion, Node, Pattern } from 'regexpp/ast';
|
||||
|
||||
/**
|
||||
* A map from language id to a list of code snippets in that language.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
import { createTestSuite } from '../../helper/prism-dom-util';
|
||||
import { PrismDOM } from '../../helper/prism-loader';
|
||||
import type { PrismDOM } from '../../helper/prism-loader';
|
||||
|
||||
|
||||
describe('Keep Markup', () => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { assert } from 'chai';
|
||||
import { knownTitles } from '../../../src/shared/meta/title-data';
|
||||
import { createTestSuite } from '../../helper/prism-dom-util';
|
||||
import { PrismDOM } from '../../helper/prism-loader';
|
||||
import type { PrismDOM } from '../../helper/prism-loader';
|
||||
|
||||
|
||||
describe('Show language', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { assert } from 'chai';
|
||||
import { createTestSuite } from '../../helper/prism-dom-util';
|
||||
import { PrismDOM } from '../../helper/prism-loader';
|
||||
import type { PrismDOM } from '../../helper/prism-loader';
|
||||
|
||||
|
||||
describe('Show language', () => {
|
||||
|
|
Loading…
Reference in New Issue