Skip to content

Commit

Permalink
🐛 Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Jan 6, 2022
1 parent 0d795ba commit 1e7b967
Show file tree
Hide file tree
Showing 20 changed files with 38 additions and 70 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js eol=lf
*.ts eol=lf
*.tag eol=lf
7 changes: 2 additions & 5 deletions app/data/i18n/Brazilian Portuguese.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"translateToYourLanguage": "Traduza o ct.js!",
"disableSounds": "Desabilitar sons de UI",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Salvar projeto",
Expand Down Expand Up @@ -783,4 +780,4 @@
"learnAboutTypes": "Aprenda sobre programar tipos",
"visible": ""
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Chinese Simplified.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"couldNotLoadFromClipboard": "无法从剪贴板加载数据",
"filter": "过滤:",
"pastedFromClipboard": "从剪贴板粘贴",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -479,8 +477,7 @@
"codeDense": "密集布局",
"disableSounds": "关闭 UI 音效",
"changeDataFolder": "设置数据文件夹位置",
"forceProductionForDebug": "强制生产任务用于调试导出",
"settings": ""
"forceProductionForDebug": "强制生产任务用于调试导出"
},
"project": {
"heading": "项目",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "同步",
"visible": "显示"
}
}
}
4 changes: 1 addition & 3 deletions app/data/i18n/Comments.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"done": "",
"duplicate": "A verb",
"exit": "",
"language": "",
"translateToYourLanguage": "",
"name": "",
"no": "",
"none": "",
Expand Down Expand Up @@ -783,4 +781,4 @@
"step": "",
"visible": ""
}
}
}
4 changes: 1 addition & 3 deletions app/data/i18n/Debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"done": "common.done",
"duplicate": "common.duplicate",
"exit": "common.exit",
"language": "common.language",
"translateToYourLanguage": "common.translateToYourLanguage",
"name": "common.name",
"no": "common.no",
"none": "common.none",
Expand Down Expand Up @@ -783,4 +781,4 @@
"step": "templateView.step",
"visible": "templateView.visible"
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Dutch.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"heading": "Instellingen",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Opslaan van project",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "Bij Stap",
"visible": ""
}
}
}
5 changes: 1 addition & 4 deletions app/data/i18n/English.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
"texture": "Texture",
"type": "Type"
},
"language": "",
"translateToYourLanguage": "",
"newName": "New name:",
"saveProject": "Save project",
"openProject": "Open project…",
Expand Down Expand Up @@ -560,8 +558,7 @@
"codeDense": "Dense layout",
"disableSounds": "Disable UI sounds",
"changeDataFolder": "Set data folder location",
"forceProductionForDebug": "Force production tasks for debug exports",
"settings": ""
"forceProductionForDebug": "Force production tasks for debug exports"
},
"project": {
"heading": "Project",
Expand Down
7 changes: 2 additions & 5 deletions app/data/i18n/French.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"heading": "Paramètres",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Sauvegarder le projet",
Expand Down Expand Up @@ -783,4 +780,4 @@
"learnAboutTypes": "En apprendre plus sur les types de codage",
"visible": ""
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/German.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"heading": "Einstellungen",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Projekt speichern",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "On Step",
"visible": ""
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Polish.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"heading": "Ustawienia",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Zapisz projekt",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "Przy kroku",
"visible": ""
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Romanian.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"heading": "Setări",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Salvează proiectul",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "La Fiecare Pas",
"visible": ""
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Russian.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"selectDialogue": "Выбрать…",
"search": "Поиск:",
"close": "Закрыть",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"translateToYourLanguage": "Переведите ct.js на свой язык!",
"disableSounds": "Отключить звуки интерфейса",
"changeDataFolder": "Изменить папку данных ct.js",
"forceProductionForDebug": " Включить релизные функции для дебаг-экспортов",
"settings": ""
"forceProductionForDebug": " Включить релизные функции для дебаг-экспортов"
},
"project": {
"save": "Сохранить проект",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "Кадр",
"visible": "Отображать"
}
}
}
7 changes: 2 additions & 5 deletions app/data/i18n/Spanish.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"close": "",
"couldNotLoadFromClipboard": "",
"pastedFromClipboard": "",
"language": "",
"translateToYourLanguage": "",
"edit": "",
"nothingToShowFiller": "",
"required": "",
Expand Down Expand Up @@ -524,8 +522,7 @@
"codeDense": "Diseño Denso",
"disableSounds": "",
"changeDataFolder": "",
"forceProductionForDebug": "",
"settings": ""
"forceProductionForDebug": ""
},
"project": {
"save": "Guardar proyecto",
Expand Down Expand Up @@ -783,4 +780,4 @@
"step": "En cada paso",
"visible": ""
}
}
}
2 changes: 1 addition & 1 deletion src/pug/debugger.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ html
script.
window.signals = {};
riot.observable(window.signals);
riot.mount('*');
riot.mount('*');
2 changes: 1 addition & 1 deletion src/riotTags/main-menu/stylebook-section.tag
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ stylebook-section
});
this.on('update', () => {
this.pugified = html2pug(this.refs.example.innerHTML, pugifyOptions);
this.pugified = this.pugified.replace(/^(( )+)/gm, '$1$1');
this.pugified = this.pugified.replace(/^(( {2})+)/gm, '$1$1');
this.refs.codeblock.innerHTML = hljs.highlight('pug', this.pugified).value;
});
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ actions-input-selector
window.signals.off('modulesChanged', this.refreshModules);
});

this.selectMethod = (code) => e => {
this.selectMethod = (code) => () => {
if (this.selectedMethods) {
const ind = this.selectedMethods.indexOf(code);
if (ind > -1) {
Expand Down
15 changes: 7 additions & 8 deletions src/riotTags/shared/asset-input.tag
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ asset-input
const updateResourceAPIs = () => {
this.currentAssetType = this.opts.assettype;
this.resourceAPI = require(`./data/node_requires/resources/${this.currentAssetType}`);
this.names = asset => this.resourceAPI.getName ? this.resourceAPI.getName(asset) : asset.name;
this.names = asset => (this.resourceAPI.getName ? this.resourceAPI.getName(asset) : asset.name);
this.thumbnails = (asset, x2, fs) => this.resourceAPI.getThumbnail(asset, x2, fs);
};
updateResourceAPIs();
// eslint-disable-next-line eqeqeq
if (this.opts.assetid && this.opts.assetid != -1) {
this.currentAsset = this.resourceAPI.getById(this.opts.assetid);
}
Expand All @@ -79,7 +80,7 @@ asset-input
this.openSelector = () => {
this.showingSelector = true;
};
this.closeSelector = e => {
this.closeSelector = () => {
this.showingSelector = false;
this.update();
};
Expand Down Expand Up @@ -107,17 +108,15 @@ asset-input
updateResourceAPIs();
}
setTimeout(() => {
// eslint-disable-next-line eqeqeq
if (this.opts.assetid == -1) {
if (this.currentAsset) {
this.currentAsset = void 0;
this.update();
}
} else {
if (!this.currentAsset ||
this.currentAsset.uid !== this.opts.assetid) {
this.currentAsset = this.resourceAPI.getById(this.opts.assetid);
this.update();
}
} else if (!this.currentAsset || this.currentAsset.uid !== this.opts.assetid) {
this.currentAsset = this.resourceAPI.getById(this.opts.assetid);
this.update();
}
}, 0);
});
4 changes: 2 additions & 2 deletions src/riotTags/shared/asset-selector.tag
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ asset-selector.aDimmer(onclick="{closeSelector}" ref="dimmer")
const updateResourceAPIs = () => {
this.currentAssetType = this.opts.assettype;
this.resourceAPI = require(`./data/node_requires/resources/${this.currentAssetType}`);
this.names = asset => this.resourceAPI.getName ? this.resourceAPI.getName(asset) : asset.name;
this.names = asset => (this.resourceAPI.getName ? this.resourceAPI.getName(asset) : asset.name);
this.thumbnails = (asset, x2, fs) => this.resourceAPI.getThumbnail(asset, x2, fs);
};
updateResourceAPIs();
Expand All @@ -54,7 +54,7 @@ asset-selector.aDimmer(onclick="{closeSelector}" ref="dimmer")
}
}
};
this.onAssetPicked = asset => e => {
this.onAssetPicked = asset => () => {
if (this.opts.onselected) {
if (asset === -1) {
this.opts.onselected(-1);
Expand Down
2 changes: 1 addition & 1 deletion src/riotTags/template-editor.tag
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ template-editor.aPanel.aView.flexrow
this.selectingTexture = true;
};
this.applyTexture = texture => {
console.log('template editor received new texture: ' + texture);
// eslint-disable-next-line eqeqeq
if (texture == -1) {
this.template.texture = -1;
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/styl/typography.styl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ textarea.monospace
code
font-family font-mono
&.inline, p > &, li > &
padding 0px 0.5rem
padding 0 0.5rem
margin 0 0.25rem
border-radius br
background borderPale
Expand Down

0 comments on commit 1e7b967

Please sign in to comment.