diff --git a/CliClient/app/autocompletion.js b/CliClient/app/autocompletion.js index dd2175c9c..d3cb6c944 100644 --- a/CliClient/app/autocompletion.js +++ b/CliClient/app/autocompletion.js @@ -10,8 +10,8 @@ async function handleAutocompletionPromise(line) { // Auto-complete the command name const names = await app().commandNames(); let words = getArguments(line); - //If there is only one word and it is not already a command name then you - //should look for commmands it could be + // If there is only one word and it is not already a command name then you + // should look for commmands it could be if (words.length == 1) { if (names.indexOf(words[0]) === -1) { let x = names.filter(n => n.indexOf(words[0]) === 0); @@ -23,29 +23,29 @@ async function handleAutocompletionPromise(line) { return line; } } - //There is more than one word and it is a command + // There is more than one word and it is a command const metadata = (await app().commandMetadata())[words[0]]; - //If for some reason this command does not have any associated metadata - //just don't autocomplete. However, this should not happen. + // If for some reason this command does not have any associated metadata + // just don't autocomplete. However, this should not happen. if (metadata === undefined) { return line; } - //complete an option + // complete an option let next = words.length > 1 ? words[words.length - 1] : ''; let l = []; if (next[0] === '-') { for (let i = 0; i < metadata.options.length; i++) { const options = metadata.options[i][0].split(' '); - //if there are multiple options then they will be separated by comma and - //space. The comma should be removed + // if there are multiple options then they will be separated by comma and + // space. The comma should be removed if (options[0][options[0].length - 1] === ',') { options[0] = options[0].slice(0, -1); } if (words.includes(options[0]) || words.includes(options[1])) { continue; } - //First two elements are the flag and the third is the description - //Only autocomplete long + // First two elements are the flag and the third is the description + // Only autocomplete long if (options.length > 1 && options[1].indexOf(next) === 0) { l.push(options[1]); } else if (options[0].indexOf(next) === 0) { @@ -59,9 +59,9 @@ async function handleAutocompletionPromise(line) { ret.prefix = `${toCommandLine(words.slice(0, -1))} `; return ret; } - //Complete an argument - //Determine the number of positional arguments by counting the number of - //words that don't start with a - less one for the command name + // Complete an argument + // Determine the number of positional arguments by counting the number of + // words that don't start with a - less one for the command name const positionalArgs = words.filter(a => a.indexOf('-') !== 0).length - 1; let cmdUsage = yargParser(metadata.usage)['_']; @@ -155,20 +155,20 @@ function getArguments(line) { if (line[i] === '"') { if (inDoubleQuotes) { inDoubleQuotes = false; - //maybe push word to parsed? - //currentWord += '"'; + // maybe push word to parsed? + // currentWord += '"'; } else { inDoubleQuotes = true; - //currentWord += '"'; + // currentWord += '"'; } } else if (line[i] === '\'') { if (inSingleQuotes) { inSingleQuotes = false; - //maybe push word to parsed? - //currentWord += "'"; + // maybe push word to parsed? + // currentWord += "'"; } else { inSingleQuotes = true; - //currentWord += "'"; + // currentWord += "'"; } } else if (/\s/.test(line[i]) && !(inDoubleQuotes || inSingleQuotes)) { if (currentWord !== '') { diff --git a/CliClient/app/gui/StatusBarWidget.js b/CliClient/app/gui/StatusBarWidget.js index a676f76c6..c79e14f73 100644 --- a/CliClient/app/gui/StatusBarWidget.js +++ b/CliClient/app/gui/StatusBarWidget.js @@ -84,8 +84,8 @@ class StatusBarWidget extends BaseWidget { // On Windows, bgBlueBright is fine and looks dark enough (Windows is probably in the wrong though) // For now, just don't use any colour at all. - //const textStyle = this.promptActive ? (s) => s : chalk.bgBlueBright.white; - //const textStyle = (s) => s; + // const textStyle = this.promptActive ? (s) => s : chalk.bgBlueBright.white; + // const textStyle = (s) => s; const textStyle = this.promptActive ? s => s : chalk.gray; this.term.drawHLine(this.absoluteInnerX, this.absoluteInnerY, this.innerWidth, textStyle(' ')); diff --git a/CliClient/tests/synchronizer.js b/CliClient/tests/synchronizer.js index f002f524d..72c787919 100644 --- a/CliClient/tests/synchronizer.js +++ b/CliClient/tests/synchronizer.js @@ -1027,8 +1027,8 @@ describe('Synchronizer', function() { // If we try to disable encryption now, it should throw an error because some items are // currently encrypted. They must be decrypted first so that they can be sent as // plain text to the sync target. - //let hasThrown = await checkThrowAsync(async () => await encryptionService().disableEncryption()); - //expect(hasThrown).toBe(true); + // let hasThrown = await checkThrowAsync(async () => await encryptionService().disableEncryption()); + // expect(hasThrown).toBe(true); // Now supply the password, and decrypt the items Setting.setObjectKey('encryption.passwordCache', masterKey.id, '123456'); diff --git a/CliClient/tests/test-utils.js b/CliClient/tests/test-utils.js index 7ff783dea..1064dd17c 100644 --- a/CliClient/tests/test-utils.js +++ b/CliClient/tests/test-utils.js @@ -69,11 +69,11 @@ SyncTargetRegistry.addClass(SyncTargetDropbox); // const syncTargetId_ = SyncTargetRegistry.nameToId("nextcloud"); const syncTargetId_ = SyncTargetRegistry.nameToId('memory'); -//const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem'); +// const syncTargetId_ = SyncTargetRegistry.nameToId('filesystem'); // const syncTargetId_ = SyncTargetRegistry.nameToId('dropbox'); const syncDir = `${__dirname}/../tests/sync`; -const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 100;//400; +const sleepTime = syncTargetId_ == SyncTargetRegistry.nameToId('filesystem') ? 1001 : 100;// 400; console.info(`Testing with sync target: ${SyncTargetRegistry.idToName(syncTargetId_)}`); diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index 1817df52e..e09e2936f 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -418,8 +418,8 @@ class Application extends BaseApplication { }, }); - /* We need a dummy entry, otherwise the ternary operator to show a - * menu item only on a specific OS does not work. */ + // We need a dummy entry, otherwise the ternary operator to show a + // menu item only on a specific OS does not work. const noItem = { type: 'separator', visible: false, @@ -576,13 +576,13 @@ class Application extends BaseApplication { } const rootMenuFile = { - /* Using a dummy entry for macOS here, because first menu - * becomes 'Joplin' and we need a nenu called 'File' later. */ + // Using a dummy entry for macOS here, because first menu + // becomes 'Joplin' and we need a nenu called 'File' later. label: shim.isMac() ? '&JoplinMainMenu' : _('&File'), - /* `&` before one of the char in the label name mean, that - * will open this menu. It's needed becase electron - * opens the first menu on Alt press if no hotkey assigned. - * Issue: https://github.com/laurent22/joplin/issues/934 */ + // `&` before one of the char in the label name mean, that + // will open this menu. It's needed becase electron + // opens the first menu on Alt press if no hotkey assigned. + // Issue: https://github.com/laurent22/joplin/issues/934 submenu: [{ label: _('About Joplin'), visible: shim.isMac() ? true : false, diff --git a/ElectronClient/app/compile-package-info.js b/ElectronClient/app/compile-package-info.js index 06617fc58..b1c41aba2 100644 --- a/ElectronClient/app/compile-package-info.js +++ b/ElectronClient/app/compile-package-info.js @@ -22,7 +22,7 @@ let hash; try { branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim(); hash = execSync('git log --pretty="%h" -1').toString().trim(); -} catch(err) { +} catch (err) { console.warn('Could not get git info', err); } if (typeof branch !== 'undefined' && typeof hash !== 'undefined') { diff --git a/ElectronClient/app/gui/NotePropertiesDialog.jsx b/ElectronClient/app/gui/NotePropertiesDialog.jsx index 2f72d161e..0c2fe70b1 100644 --- a/ElectronClient/app/gui/NotePropertiesDialog.jsx +++ b/ElectronClient/app/gui/NotePropertiesDialog.jsx @@ -106,7 +106,7 @@ class NotePropertiesDialog extends React.Component { this.styles_.controlBox = { marginBottom: '1em', - color: 'black', //This will apply for the calendar + color: 'black', // This will apply for the calendar }; this.styles_.button = { diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index a27314b37..be82a4bfb 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -1840,7 +1840,7 @@ class NoteTextComponent extends React.Component { if (this.props.selectedNoteIds.length > 1) { return this.renderMultiNotes(rootStyle); } else if (!note || !!note.encryption_applied) { - //|| (note && !this.props.newNote && this.props.noteId && note.id !== this.props.noteId)) { // note.id !== props.noteId is when the note has not been loaded yet, and the previous one is still in the state + // || (note && !this.props.newNote && this.props.noteId && note.id !== this.props.noteId)) { // note.id !== props.noteId is when the note has not been loaded yet, and the previous one is still in the state return this.renderNoNotes(rootStyle); } diff --git a/ElectronClient/app/theme.js b/ElectronClient/app/theme.js index ca4e06c85..e9e472f1c 100644 --- a/ElectronClient/app/theme.js +++ b/ElectronClient/app/theme.js @@ -386,7 +386,7 @@ function themeStyle(theme) { // For WebView - must correspond to the properties above htmlFontSize: `${Math.round(15 * zoomRatio)}px`, - htmlLineHeight: '1.6em', //Math.round(20 * zoomRatio) + 'px' + htmlLineHeight: '1.6em', // Math.round(20 * zoomRatio) + 'px' htmlCodeFontSize: '.9em', }; diff --git a/ReactNativeClient/lib/ArrayUtils.js b/ReactNativeClient/lib/ArrayUtils.js index b40b5efba..c4639cb60 100644 --- a/ReactNativeClient/lib/ArrayUtils.js +++ b/ReactNativeClient/lib/ArrayUtils.js @@ -20,18 +20,18 @@ ArrayUtils.binarySearch = function(items, value) { middle = Math.floor((stopIndex + startIndex) / 2); while (items[middle] != value && startIndex < stopIndex) { - //adjust search area + // adjust search area if (value < items[middle]) { stopIndex = middle - 1; } else if (value > items[middle]) { startIndex = middle + 1; } - //recalculate middle + // recalculate middle middle = Math.floor((stopIndex + startIndex) / 2); } - //make sure it's the right value + // make sure it's the right value return items[middle] != value ? -1 : middle; }; diff --git a/ReactNativeClient/lib/WebDavApi.js b/ReactNativeClient/lib/WebDavApi.js index 84a1ada1d..0afdaea9b 100644 --- a/ReactNativeClient/lib/WebDavApi.js +++ b/ReactNativeClient/lib/WebDavApi.js @@ -63,7 +63,7 @@ class WebDavApi { try { // Note: Non-ASCII passwords will throw an error about Latin1 characters - https://github.com/laurent22/joplin/issues/246 // Tried various things like the below, but it didn't work on React Native: - //return base64.encode(utf8.encode(this.options_.username() + ':' + this.options_.password())); + // return base64.encode(utf8.encode(this.options_.username() + ':' + this.options_.password())); return base64.encode(`${this.options_.username()}:${this.options_.password()}`); } catch (error) { error.message = `Cannot encode username/password: ${error.message}`; diff --git a/ReactNativeClient/lib/components/ItemList.js b/ReactNativeClient/lib/components/ItemList.js index 9cb4260a6..e4cafb819 100644 --- a/ReactNativeClient/lib/components/ItemList.js +++ b/ReactNativeClient/lib/components/ItemList.js @@ -67,7 +67,7 @@ class ItemList extends React.Component { render() { const style = this.props.style ? this.props.style : {}; - //if (!this.props.itemHeight) throw new Error('itemHeight is required'); + // if (!this.props.itemHeight) throw new Error('itemHeight is required'); let itemComps = []; diff --git a/ReactNativeClient/lib/components/checkbox.js b/ReactNativeClient/lib/components/checkbox.js index 58803b339..89d5e2cc3 100644 --- a/ReactNativeClient/lib/components/checkbox.js +++ b/ReactNativeClient/lib/components/checkbox.js @@ -7,7 +7,7 @@ const styles = { checkboxIcon: { fontSize: 20, height: 22, - //marginRight: 10, + // marginRight: 10, }, }; @@ -57,7 +57,7 @@ class Checkbox extends Component { if (style && style.display === 'none') return ; - //if (style.display) thStyle.display = style.display; + // if (style.display) thStyle.display = style.display; return ( this.onPress()} style={thStyle}> diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index 1612ca59c..40a72b9fc 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -96,7 +96,7 @@ class NoteBodyViewer extends Component { }, paddingBottom: '3.8em', // Extra bottom padding to make it possible to scroll past the action button (so that it doesn't overlap the text) highlightedKeywords: this.props.highlightedKeywords, - resources: this.props.noteResources, //await shared.attachedResources(bodyToRender), + resources: this.props.noteResources, // await shared.attachedResources(bodyToRender), codeTheme: theme.codeThemeCss, postMessageSyntax: 'window.ReactNativeWebView.postMessage', }; diff --git a/ReactNativeClient/lib/components/note-item.js b/ReactNativeClient/lib/components/note-item.js index 8e0dac331..4a2401fb2 100644 --- a/ReactNativeClient/lib/components/note-item.js +++ b/ReactNativeClient/lib/components/note-item.js @@ -30,7 +30,7 @@ class NoteItemComponent extends Component { let styles = { listItem: { flexDirection: 'row', - //height: 40, + // height: 40, borderBottomWidth: 1, borderBottomColor: theme.dividerColor, alignItems: 'flex-start', @@ -38,7 +38,7 @@ class NoteItemComponent extends Component { paddingRight: theme.marginRight, paddingTop: theme.itemMarginTop, paddingBottom: theme.itemMarginBottom, - //backgroundColor: theme.backgroundColor, + // backgroundColor: theme.backgroundColor, }, listItemText: { flex: 1, diff --git a/ReactNativeClient/lib/components/note-list.js b/ReactNativeClient/lib/components/note-list.js index 916dba7f5..d45fc4831 100644 --- a/ReactNativeClient/lib/components/note-list.js +++ b/ReactNativeClient/lib/components/note-list.js @@ -61,7 +61,7 @@ class NoteListComponent extends Component { } filterNotes(notes) { - const todoFilter = 'all'; //Setting.value('todoFilter'); + const todoFilter = 'all'; // Setting.value('todoFilter'); if (todoFilter == 'all') return notes; const now = time.unixMs(); diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js index 24e48f6ce..76765bf72 100644 --- a/ReactNativeClient/lib/components/screens/config.js +++ b/ReactNativeClient/lib/components/screens/config.js @@ -194,7 +194,7 @@ class ConfigScreenComponent extends BaseScreenComponent { styles.switchSettingControl = Object.assign({}, styles.settingControl); delete styles.switchSettingControl.color; - //styles.switchSettingControl.width = '20%'; + // styles.switchSettingControl.width = '20%'; styles.switchSettingControl.flex = 0; this.styles_[themeId] = StyleSheet.create(styles); @@ -366,7 +366,7 @@ class ConfigScreenComponent extends BaseScreenComponent { ); } else { - //throw new Error('Unsupported setting type: ' + md.type); + // throw new Error('Unsupported setting type: ' + md.type); } return output; diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index ffb489141..c238dc564 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -410,7 +410,7 @@ class NoteScreenComponent extends BaseScreenComponent { const format = mimeType == 'image/png' ? 'PNG' : 'JPEG'; reg.logger().info(`Resizing image ${localFilePath}`); - const resizedImage = await ImageResizer.createResizedImage(localFilePath, dimensions.width, dimensions.height, format, 85); //, 0, targetPath); + const resizedImage = await ImageResizer.createResizedImage(localFilePath, dimensions.width, dimensions.height, format, 85); // , 0, targetPath); const resizedImagePath = resizedImage.uri; reg.logger().info('Resized image ', resizedImagePath); diff --git a/ReactNativeClient/lib/components/side-menu-content.js b/ReactNativeClient/lib/components/side-menu-content.js index ed01adfb5..5a5f31499 100644 --- a/ReactNativeClient/lib/components/side-menu-content.js +++ b/ReactNativeClient/lib/components/side-menu-content.js @@ -76,7 +76,7 @@ class SideMenuContentComponent extends Component { styles.folderButtonSelected = Object.assign({}, styles.folderButton); styles.folderButtonSelected.backgroundColor = theme.selectedColor; styles.folderIcon = Object.assign({}, theme.icon); - styles.folderIcon.color = theme.colorFaded; //'#0072d5'; + styles.folderIcon.color = theme.colorFaded; // '#0072d5'; styles.folderIcon.paddingTop = 3; styles.sideButton = Object.assign({}, styles.button, { flex: 0 }); diff --git a/ReactNativeClient/lib/database-driver-react-native.js b/ReactNativeClient/lib/database-driver-react-native.js index 0afefe3f0..3fc14c84f 100644 --- a/ReactNativeClient/lib/database-driver-react-native.js +++ b/ReactNativeClient/lib/database-driver-react-native.js @@ -6,7 +6,7 @@ class DatabaseDriverReactNative { } open(options) { - //SQLite.DEBUG(true); + // SQLite.DEBUG(true); return new Promise((resolve, reject) => { SQLite.openDatabase( { name: options.name }, diff --git a/ReactNativeClient/lib/file-api-driver-local.js b/ReactNativeClient/lib/file-api-driver-local.js index 002441b44..95eaae8f0 100644 --- a/ReactNativeClient/lib/file-api-driver-local.js +++ b/ReactNativeClient/lib/file-api-driver-local.js @@ -97,10 +97,10 @@ class FileApiDriverLocal { try { if (options.target === 'file') { - //output = await fs.copy(path, options.path, { overwrite: true }); + // output = await fs.copy(path, options.path, { overwrite: true }); output = await this.fsDriver().copy(path, options.path); } else { - //output = await fs.readFile(path, options.encoding); + // output = await fs.readFile(path, options.encoding); output = await this.fsDriver().readFile(path, options.encoding); } } catch (error) { diff --git a/ReactNativeClient/lib/file-api.js b/ReactNativeClient/lib/file-api.js index 34a83821e..4a6978b26 100644 --- a/ReactNativeClient/lib/file-api.js +++ b/ReactNativeClient/lib/file-api.js @@ -148,7 +148,7 @@ class FileApi { setTimestamp(path, timestampMs) { this.logger().debug(`setTimestamp ${this.fullPath_(path)}`); return tryAndRepeat(() => this.driver_.setTimestamp(this.fullPath_(path), timestampMs), this.requestRepeatCount()); - //return this.driver_.setTimestamp(this.fullPath_(path), timestampMs); + // return this.driver_.setTimestamp(this.fullPath_(path), timestampMs); } mkdir(path) { diff --git a/ReactNativeClient/lib/fs-driver-node.js b/ReactNativeClient/lib/fs-driver-node.js index 37036b9dd..45a178a43 100644 --- a/ReactNativeClient/lib/fs-driver-node.js +++ b/ReactNativeClient/lib/fs-driver-node.js @@ -173,7 +173,7 @@ class FsDriverNode extends FsDriverBase { } async readFileChunk(handle, length, encoding = 'base64') { - //let buffer = new Buffer(length); + // let buffer = new Buffer(length); let buffer = Buffer.alloc(length); const result = await fs.read(handle, buffer, 0, length, null); if (!result.bytesRead) return null; diff --git a/ReactNativeClient/lib/import-enex-md-gen.js b/ReactNativeClient/lib/import-enex-md-gen.js index 401558a86..7dad191c5 100644 --- a/ReactNativeClient/lib/import-enex-md-gen.js +++ b/ReactNativeClient/lib/import-enex-md-gen.js @@ -392,10 +392,10 @@ function isSpanStyleBold(attributes) { if (style.includes('font-weight: bold;')) { return true; } else if (style.search(/font-family:.*,Bold.*;/) != -1) { - //console.debug('font-family regex matched'); + // console.debug('font-family regex matched'); return true; } else { - //console.debug('Found unsupported style(s) in span tag: %s', style); + // console.debug('Found unsupported style(s) in span tag: %s', style); return false; } } @@ -696,7 +696,7 @@ function enexXmlToMdArray(stream, resources) { if (isSpanWithStyle(nodeAttributes)) { state.spanAttributes.push(nodeAttributes); if (isSpanStyleBold(nodeAttributes)) { - //console.debug('Applying style found in span tag: bold') + // console.debug('Applying style found in span tag: bold') section.lines.push('**'); } } @@ -884,7 +884,7 @@ function enexXmlToMdArray(stream, resources) { let attributes = state.spanAttributes.pop(); if (isSpanWithStyle(attributes)) { if (isSpanStyleBold(attributes)) { - //console.debug('Applying style found in span tag (closing): bold') + // console.debug('Applying style found in span tag (closing): bold') section.lines.push('**'); } } diff --git a/ReactNativeClient/lib/import-enex.js b/ReactNativeClient/lib/import-enex.js index 8cf66939a..09a575821 100644 --- a/ReactNativeClient/lib/import-enex.js +++ b/ReactNativeClient/lib/import-enex.js @@ -10,7 +10,7 @@ const { time } = require('lib/time-utils.js'); const Levenshtein = require('levenshtein'); const md5 = require('md5'); -//const Promise = require('promise'); +// const Promise = require('promise'); const fs = require('fs-extra'); function dateToTimestamp(s, zeroIfInvalid = false) { diff --git a/ReactNativeClient/lib/onedrive-api.js b/ReactNativeClient/lib/onedrive-api.js index 49a1717f2..c0af9d29d 100644 --- a/ReactNativeClient/lib/onedrive-api.js +++ b/ReactNativeClient/lib/onedrive-api.js @@ -186,7 +186,7 @@ class OneDriveApi { let errorResponseText = await response.text(); let errorResponse = null; try { - errorResponse = JSON.parse(errorResponseText); //await response.json(); + errorResponse = JSON.parse(errorResponseText); // await response.json(); } catch (error) { error.message = `OneDriveApi::exec: Cannot parse JSON error: ${errorResponseText} ${error.message}`; throw error; @@ -249,12 +249,12 @@ class OneDriveApi { let response = await this.exec(method, path, query, data); let errorResponseText = await response.text(); try { - let output = JSON.parse(errorResponseText); //await response.json(); + let output = JSON.parse(errorResponseText); // await response.json(); return output; } catch (error) { error.message = `OneDriveApi::execJson: Cannot parse JSON: ${errorResponseText} ${error.message}`; throw error; - //throw new Error('Cannot parse JSON: ' + text); + // throw new Error('Cannot parse JSON: ' + text); } } diff --git a/ReactNativeClient/lib/parseUri.js b/ReactNativeClient/lib/parseUri.js index 957bc8d18..47a30194e 100644 --- a/ReactNativeClient/lib/parseUri.js +++ b/ReactNativeClient/lib/parseUri.js @@ -1,4 +1,4 @@ -/*eslint no-useless-escape: 0*/ +/* eslint no-useless-escape: 0*/ // parseUri 1.2.2 // (c) Steven Levithan diff --git a/ReactNativeClient/lib/path-utils.js b/ReactNativeClient/lib/path-utils.js index dbd4746fa..23e30874d 100644 --- a/ReactNativeClient/lib/path-utils.js +++ b/ReactNativeClient/lib/path-utils.js @@ -1,4 +1,4 @@ -/*eslint no-useless-escape: 0*/ +/* eslint no-useless-escape: 0*/ const { _ } = require('lib/locale'); diff --git a/ReactNativeClient/lib/reducer.js b/ReactNativeClient/lib/reducer.js index bb57d1931..75592dd35 100644 --- a/ReactNativeClient/lib/reducer.js +++ b/ReactNativeClient/lib/reducer.js @@ -459,7 +459,7 @@ const reducer = (state = defaultState, action) => { } } - //newNotes = Note.sortNotes(newNotes, state.notesOrder, newState.settings.uncompletedTodosOnTop); + // newNotes = Note.sortNotes(newNotes, state.notesOrder, newState.settings.uncompletedTodosOnTop); newNotes = Note.sortNotes(newNotes, stateUtils.notesOrder(state.settings), newState.settings.uncompletedTodosOnTop); newState = Object.assign({}, state); newState.notes = newNotes; diff --git a/ReactNativeClient/lib/registry.js b/ReactNativeClient/lib/registry.js index 363be7ee1..bb7a5998a 100644 --- a/ReactNativeClient/lib/registry.js +++ b/ReactNativeClient/lib/registry.js @@ -10,7 +10,7 @@ reg.syncTargets_ = {}; reg.logger = () => { if (!reg.logger_) { - //console.warn('Calling logger before it is initialized'); + // console.warn('Calling logger before it is initialized'); return new Logger(); } diff --git a/ReactNativeClient/lib/services/EncryptionService.js b/ReactNativeClient/lib/services/EncryptionService.js index a8d81d1b2..3a4896bf5 100644 --- a/ReactNativeClient/lib/services/EncryptionService.js +++ b/ReactNativeClient/lib/services/EncryptionService.js @@ -273,7 +273,7 @@ class EncryptionService { ks: 128, // Key size - "128 bits should be secure enough" ts: 64, // ??? mode: 'ocb2', // The cipher mode is a standard for how to use AES and other algorithms to encrypt and authenticate your message. OCB2 mode is slightly faster and has more features, but CCM mode has wider support because it is not patented. - //"adata":"", // Associated Data - not needed? + // "adata":"", // Associated Data - not needed? cipher: 'aes', }); } catch (error) { diff --git a/ReactNativeClient/lib/services/rest/Api.js b/ReactNativeClient/lib/services/rest/Api.js index b6893800d..3f530530b 100644 --- a/ReactNativeClient/lib/services/rest/Api.js +++ b/ReactNativeClient/lib/services/rest/Api.js @@ -568,7 +568,7 @@ class Api { return output; } - async downloadImage_(url /*, allowFileProtocolImages */) { + async downloadImage_(url /* , allowFileProtocolImages */) { const tempDir = Setting.value('tempDir'); const isDataUrl = url && url.toLowerCase().indexOf('data:') === 0; diff --git a/ReactNativeClient/lib/shim-init-node.js b/ReactNativeClient/lib/shim-init-node.js index b15709076..75511e016 100644 --- a/ReactNativeClient/lib/shim-init-node.js +++ b/ReactNativeClient/lib/shim-init-node.js @@ -255,7 +255,7 @@ function shimInit() { shim.fetchBlob = async function(url, options) { if (!options || !options.path) throw new Error('fetchBlob: target file path is missing'); if (!options.method) options.method = 'GET'; - //if (!('maxRetry' in options)) options.maxRetry = 5; + // if (!('maxRetry' in options)) options.maxRetry = 5; const urlParse = require('url').parse; diff --git a/ReactNativeClient/lib/synchronizer.js b/ReactNativeClient/lib/synchronizer.js index 2dde431ad..8d78d7657 100644 --- a/ReactNativeClient/lib/synchronizer.js +++ b/ReactNativeClient/lib/synchronizer.js @@ -548,7 +548,7 @@ class Synchronizer { if (!BaseItem.isSystemPath(remote.path)) continue; // The delta API might return things like the .sync, .resource or the root folder const loadContent = async () => { - let task = await this.downloadQueue_.waitForResult(path); //await this.api().get(path); + let task = await this.downloadQueue_.waitForResult(path); // await this.api().get(path); if (task.error) throw task.error; if (!task.result) return null; return await BaseItem.unserialize(task.result); diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index 6308f8122..ffbba8b04 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -634,7 +634,7 @@ class AppComponent extends React.Component { }, 5); } - } catch(e) { + } catch (e) { reg.logger().error('Error in ShareExtension.data', e); } } diff --git a/Tools/build-website.js b/Tools/build-website.js index bbcf08785..70aec57c9 100644 --- a/Tools/build-website.js +++ b/Tools/build-website.js @@ -449,7 +449,7 @@ function markdownToHtml(md, templateParams) { const anchorName = headingTextToAnchorName(token.content, doneNames); doneNames.push(anchorName); const anchorTokens = createAnchorTokens(anchorName); - //token.children = anchorTokens.concat(token.children); + // token.children = anchorTokens.concat(token.children); token.children = token.children.concat(anchorTokens); } } diff --git a/Tools/tool-utils.js b/Tools/tool-utils.js index 04e3dc159..2f10e8a75 100644 --- a/Tools/tool-utils.js +++ b/Tools/tool-utils.js @@ -28,7 +28,7 @@ toolUtils.downloadFile = function(url, targetPath) { if (response.statusCode !== 200) reject(new Error(`HTTP error ${response.statusCode}`)); response.pipe(file); file.on('finish', function() { - //file.close(); + // file.close(); resolve(); }); }).on('error', (error) => { @@ -74,7 +74,7 @@ toolUtils.fileExists = async function(filePath) { fs.stat(filePath, function(err) { if (err == null) { resolve(true); - } else if(err.code == 'ENOENT') { + } else if (err.code == 'ENOENT') { resolve(false); } else { reject(err);