mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
workspace: add eslint-config package (#510)
This commit is contained in:
1 parent
e7945a104f
commit
65311529bd
28 files changed
+230
-267
No files matched your search
@@ -31,7 +31,6 @@ loadLanguages();
|
||||
languageMeta.forEach((meta) => {
|
||||
for (let i = 0; i < meta.ext.length; ++i) {
|
||||
if (Prism.languages[meta.ext[i]] !== undefined) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
meta.target = meta.ext[i];
|
||||
break;
|
||||
}
|
||||
@@ -44,7 +43,7 @@ languageMeta.forEach((meta) => {
|
||||
// Copy to Clipboard
|
||||
Prism.plugins.toolbar.registerButton('copy-to-clipboard', (env) => {
|
||||
const linkCopy = document.createElement('a');
|
||||
linkCopy.href = 'javascript:;'; // eslint-disable-line no-script-url
|
||||
linkCopy.href = 'javascript:;';
|
||||
linkCopy.textContent = 'Copy';
|
||||
const clip = new Clipboard(linkCopy, { text: () => env.code });
|
||||
clip.on('success', () => {
|
||||
@@ -89,8 +88,8 @@ function handlerInvisiblesToken(tokens, name) {
|
||||
} else if (type === 'Array') {
|
||||
for (let i = 0, l = value.length; i < l; i++) handlerInvisiblesToken(value, i);
|
||||
} else {
|
||||
const inside = value.inside || (value.inside = {});
|
||||
addInvisibles(inside);
|
||||
value.inside ||= {};
|
||||
addInvisibles(value.inside);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user