Sanity-check decaffeinate the rest

pull/1441/head
Simon Legner 1 year ago
parent 4177026c11
commit e5fcde09f9

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
//= require_tree ./vendor
//= require lib/license

@ -1,15 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS203: Remove `|| {}` from converted for-own loops
* DS207: Consider shorter variations of null checks
* DS208: Avoid top-level this
* DS209: Avoid top-level return
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
//
// App
//

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS208: Avoid top-level this
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
let defaultUrl = null;
let currentSlug = null;

@ -1,5 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* Copyright 2013-2023 Thibaut Courouble and other contributors
*

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
this.LocalStorageStore = class LocalStorageStore {
get(key) {
try {

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.models.Doc = class Doc extends app.Model {
// Attributes: name, slug, type, version, release, db_size, mtime, links

@ -1,5 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
app.Model = class Model {
constructor(attributes) {
for (var key in attributes) {

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.models.Type = class Type extends app.Model {
// Attributes: name, slug, count

@ -1,12 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const error = function (title, text, links) {
if (text == null) {
text = "";

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const notice = (text) => `<p class="_notice-text">${text}</p>`;
app.templates.singleDocNotice = (doc) =>

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS101: Remove unnecessary use of Array.from
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const notif = function (title, html) {
html = html.replace(/<a /g, '<a class="_notif-link" ');
return ` <h5 class="_notif-title">${title}</h5>
@ -70,7 +62,7 @@ app.templates.notifUpdates = function (docs, disabledDocs) {
if (docs.length > 0) {
html += '<div class="_news-row">';
html += '<ul class="_notif-list">';
for (doc of Array.from(docs)) {
for (doc of docs) {
html += `<li>${doc.name}`;
if (doc.release) {
html += ` <code>&rarr;</code> ${doc.release}`;
@ -82,7 +74,7 @@ app.templates.notifUpdates = function (docs, disabledDocs) {
if (disabledDocs.length > 0) {
html += '<div class="_news-row"><p class="_news-title">Disabled:';
html += '<ul class="_notif-list">';
for (doc of Array.from(disabledDocs)) {
for (doc of disabledDocs) {
html += `<li>${doc.name}`;
if (doc.release) {
html += ` <code>&rarr;</code> ${doc.release}`;

@ -1,8 +1,3 @@
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
//= depend_on news.json
app.templates.newsPage = () => ` <h1 class="_lined-heading">Changelog</h1>

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.templates.offlinePage = (docs) => `\
<h1 class="_lined-heading">Offline Documentation</h1>

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const themeOption = ({ label, value }, settings) => `\
<label class="_settings-label _theme-label">
<input type="radio" name="theme" value="${value}"${

@ -1,17 +1,11 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.templates.typePage = (type) => ` <h1>${type.doc.fullName} / ${
type.name
}</h1>
app.templates.typePage = (type) => {
return ` <h1>${type.doc.fullName} / ${type.name}</h1>
<ul class="_entry-list">${app.templates.render(
"typePageEntry",
type.entries(),
)}</ul> `;
"typePageEntry",
type.entries(),
)}</ul> `;
};
app.templates.typePageEntry = (entry) =>
`<li><a href="${entry.fullPath()}">${$.escape(entry.name)}</a></li>`;
app.templates.typePageEntry = (entry) => {
return `<li><a href="${entry.fullPath()}">${$.escape(entry.name)}</a></li>`;
};

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.templates.path = function (doc, type, entry) {
const arrow = '<svg class="_path-arrow"><use xlink:href="#icon-dir"/></svg>';
let html = `<a href="${doc.fullPath()}" class="_path-item _icon-${

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
const { templates } = app;
const arrow = '<svg class="_list-arrow"><use xlink:href="#icon-dir"/></svg>';

@ -1,10 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.templates.tipKeyNav = () => `\
<p class="_notif-text">
<strong>ProTip</strong>

@ -1,11 +1,3 @@
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS206: Consider reworking classes to avoid initClass
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/main/docs/suggestions.md
*/
app.views.StaticPage = class StaticPage extends app.View {
static className = "_static";

Loading…
Cancel
Save