1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-21 05:51:13 +02:00

eslint fixes..oke bro

This commit is contained in:
Kushagra Gour
2017-01-18 02:59:55 +05:30
parent b85ca0c3c7
commit 52213cdf18
3 changed files with 16 additions and 12 deletions

View File

@@ -255,8 +255,10 @@
"$all": true, "$all": true,
"CoffeeScript": true, "CoffeeScript": true,
"Babel": true, "Babel": true,
"ts": true,
"Sass": true, "Sass": true,
"less": true, "less": true,
"stylus": true,
"marked": true, "marked": true,
"jade": true, "jade": true,
"loadJS": true, "loadJS": true,

View File

@@ -238,7 +238,7 @@
</p> </p>
<div class="onboard-selection-wrap flex"> <div class="onboard-selection-wrap flex">
<div class="onboard-selection selected" id="onboardShowInTabOption" d-click="onShowInTabClicked"> <div class="onboard-selection selected" id="onboardShowInTabOptionBtn" d-click="onShowInTabClicked">
<!-- Awesome free vector from freepik.com --> <!-- Awesome free vector from freepik.com -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve">
<path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474 <path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474
@@ -254,7 +254,7 @@
<div class="onboard-selection-text">Show in new tab</div> <div class="onboard-selection-text">Show in new tab</div>
</div> </div>
<div class="onboard-selection" id="onboardDontShowInTabOption" d-click="onDontShowInTabClicked"> <div class="onboard-selection" id="onboardDontShowInTabOptionBtn" d-click="onDontShowInTabClicked">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="200" viewBox="180 200 340 320" xml:space="preserve">
<path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474 <path style="fill:#A5A5A5;stroke: #555;stroke-width: 11px;" d="M503.916,256v43.116H191.326V256c0-11.906,9.651-21.558,21.558-21.558h269.474
C494.264,234.442,503.916,244.094,503.916,256z"></path> C494.264,234.442,503.916,244.094,503.916,256z"></path>

View File

@@ -3,7 +3,7 @@
onboardModal, layoutBtn1, layoutBtn2, layoutBtn3, helpBtn, onboardModal, onboardModal, onboardModal, layoutBtn1, layoutBtn2, layoutBtn3, helpBtn, onboardModal, onboardModal,
addLibraryModal, addLibraryModal, notificationsBtn, notificationsModal, notificationsModal, addLibraryModal, addLibraryModal, notificationsBtn, notificationsModal, notificationsModal,
notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, openBtn, saveBtn, newBtn, notificationsModal, notificationsBtn, codepenBtn, saveHtmlBtn, openBtn, saveBtn, newBtn,
settingsBtn, onboardModal, notificationsBtn */ settingsBtn, onboardModal, notificationsBtn, onboardShowInTabOptionBtn, onboardDontShowInTabOptionBtn */
/* eslint-disable no-extra-semi */ /* eslint-disable no-extra-semi */
;(function (alertsService) { ;(function (alertsService) {
@@ -478,7 +478,7 @@ settingsBtn, onboardModal, notificationsBtn */
// Last line of message is the actual message // Last line of message is the actual message
var tempArr = error.message.split('\n'); var tempArr = error.message.split('\n');
tempArr.pop(); // This is empty string in the end tempArr.pop(); // This is empty string in the end
showErrors('css', [ { lineNumber: +error.message.match(/stylus:(\d+):/)[1]-298, message: tempArr.pop() } ]); showErrors('css', [ { lineNumber: +error.message.match(/stylus:(\d+):/)[1] - 298, message: tempArr.pop() } ]);
} }
d.resolve(result); d.resolve(result);
}); });
@@ -536,9 +536,11 @@ settingsBtn, onboardModal, notificationsBtn */
} }
} else if (jsMode === JsModes.TS) { } else if (jsMode === JsModes.TS) {
try { try {
code = ts.transpileModule(code, { reportDiagnostics:true, compilerOptions: { noEmitOnError: true, diagnostics:true, module: ts.ModuleKind.ES2015 } }); code = ts.transpileModule(code, { reportDiagnostics: true, compilerOptions: { noEmitOnError: true, diagnostics: true, module: ts.ModuleKind.ES2015 } });
if (code.diagnostics.length) { if (code.diagnostics.length) {
throw({ description: code.diagnostics[0].messageText, lineNumber: ts.getLineOfLocalPosition(code.diagnostics[0].file,code.diagnostics[0].start) });
/* eslint-disable no-throw-literal */
throw ({ description: code.diagnostics[0].messageText, lineNumber: ts.getLineOfLocalPosition(code.diagnostics[0].file,code.diagnostics[0].start) });
} }
} catch (e) { } catch (e) {
showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]); showErrors('js', [ { lineNumber: e.lineNumber - 1, message: e.description } ]);
@@ -732,13 +734,13 @@ settingsBtn, onboardModal, notificationsBtn */
} }
scope.onShowInTabClicked = function () { scope.onShowInTabClicked = function () {
onboardDontShowInTabOption.classList.remove('selected'); onboardDontShowInTabOptionBtn.classList.remove('selected');
onboardShowInTabOption.classList.add('selected'); onboardShowInTabOptionBtn.classList.add('selected');
trackEvent('ui', 'onboardShowInTabClick'); trackEvent('ui', 'onboardShowInTabClick');
} }
scope.onDontShowInTabClicked = function () { scope.onDontShowInTabClicked = function () {
onboardDontShowInTabOption.classList.add('selected'); onboardDontShowInTabOptionBtn.classList.add('selected');
onboardShowInTabOption.classList.remove('selected'); onboardShowInTabOptionBtn.classList.remove('selected');
trackEvent('ui', 'onboardDontShowInTabClick'); trackEvent('ui', 'onboardDontShowInTabClick');
} }
@@ -999,9 +1001,9 @@ settingsBtn, onboardModal, notificationsBtn */
}, function () {}); }, function () {});
chrome.storage.sync.set({ chrome.storage.sync.set({
replaceNewTab: onboardShowInTabOption.classList.contains('selected') replaceNewTab: onboardShowInTabOptionBtn.classList.contains('selected')
}, function () { }, function () {
trackEvent('fn', 'setReplaceNewTabFromOnboard', onboardShowInTabOption.classList.contains('selected')); trackEvent('fn', 'setReplaceNewTabFromOnboard', onboardShowInTabOptionBtn.classList.contains('selected'));
}); });
}); });
} }