From 2e3e0bc1d81038d31c9e98c5a33d6eef5c7f3b4e Mon Sep 17 00:00:00 2001
From: Junyoung Choi
Date: Thu, 26 Apr 2018 16:35:47 -0700
Subject: [PATCH] Fix lint error
---
browser/components/MarkdownEditor.js | 36 +++++++++++-----------
browser/main/lib/dataApi/copyImage.js | 2 +-
browser/main/lib/dataApi/exportNote.js | 2 +-
browser/main/lib/dataApi/moveNote.js | 2 +-
tests/dataApi/attachmentManagement.test.js | 16 +++++-----
5 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/browser/components/MarkdownEditor.js b/browser/components/MarkdownEditor.js
index 6b47c095..313c6f90 100644
--- a/browser/components/MarkdownEditor.js
+++ b/browser/components/MarkdownEditor.js
@@ -249,24 +249,24 @@ class MarkdownEditor extends React.Component {
? 'codeEditor'
: 'codeEditor--hide'
}
- ref='code'
- mode='GitHub Flavored Markdown'
- value={value}
- theme={config.editor.theme}
- keyMap={config.editor.keyMap}
- fontFamily={config.editor.fontFamily}
- fontSize={editorFontSize}
- indentType={config.editor.indentType}
- indentSize={editorIndentSize}
- enableRulers={config.editor.enableRulers}
- rulers={config.editor.rulers}
- displayLineNumbers={config.editor.displayLineNumbers}
- scrollPastEnd={config.editor.scrollPastEnd}
- storageKey={storageKey}
- noteKey={noteKey}
- fetchUrlTitle={config.editor.fetchUrlTitle}
- onChange={(e) => this.handleChange(e)}
- onBlur={(e) => this.handleBlur(e)}
+ ref='code'
+ mode='GitHub Flavored Markdown'
+ value={value}
+ theme={config.editor.theme}
+ keyMap={config.editor.keyMap}
+ fontFamily={config.editor.fontFamily}
+ fontSize={editorFontSize}
+ indentType={config.editor.indentType}
+ indentSize={editorIndentSize}
+ enableRulers={config.editor.enableRulers}
+ rulers={config.editor.rulers}
+ displayLineNumbers={config.editor.displayLineNumbers}
+ scrollPastEnd={config.editor.scrollPastEnd}
+ storageKey={storageKey}
+ noteKey={noteKey}
+ fetchUrlTitle={config.editor.fetchUrlTitle}
+ onChange={(e) => this.handleChange(e)}
+ onBlur={(e) => this.handleBlur(e)}
/>
attachmentManagement
+// TODO: ehhc: check this -> attachmentManagement
const IMAGES_FOLDER_NAME = 'images'
/**
diff --git a/browser/main/lib/dataApi/moveNote.js b/browser/main/lib/dataApi/moveNote.js
index 3a552419..cffb5c53 100644
--- a/browser/main/lib/dataApi/moveNote.js
+++ b/browser/main/lib/dataApi/moveNote.js
@@ -77,7 +77,7 @@ function moveNote (storageKey, noteKey, newStorageKey, newFolderKey) {
while (match != null) {
const [, filename] = match
const oldPath = path.join(oldStorage.path, 'images', filename)
- //TODO: ehhc: attachmentManagement
+ // TODO: ehhc: attachmentManagement
moveTasks.push(
copyImage(oldPath, noteData.storage, false)
.then(() => {
diff --git a/tests/dataApi/attachmentManagement.test.js b/tests/dataApi/attachmentManagement.test.js
index 7e97cf80..c90e1961 100644
--- a/tests/dataApi/attachmentManagement.test.js
+++ b/tests/dataApi/attachmentManagement.test.js
@@ -114,8 +114,8 @@ it('should test that copyAttachment don\'t uses a random file name if not intend
})
it('should replace the all ":storage" path with the actual storage path', function () {
- let storageFolder = systemUnderTest.DESTINATION_FOLDER
- let testInput =
+ const storageFolder = systemUnderTest.DESTINATION_FOLDER
+ const testInput =
'\n' +
' \n' +
' //header\n' +
@@ -133,8 +133,8 @@ it('should replace the all ":storage" path with the actual storage path', functi
'
\n' +
' \n' +
''
- let storagePath = '<>'
- let expectedOutput =
+ const storagePath = '<>'
+ const expectedOutput =
'\n' +
' \n' +
' //header\n' +
@@ -152,17 +152,17 @@ it('should replace the all ":storage" path with the actual storage path', functi
' \n' +
' \n' +
''
- let actual = systemUnderTest.fixLocalURLS(testInput, storagePath)
+ const actual = systemUnderTest.fixLocalURLS(testInput, storagePath)
expect(actual).toEqual(expectedOutput)
})
it('should test that generateAttachmentMarkdown works correct both with previews and without', function () {
- let fileName = 'fileName'
- let path = 'path'
+ const fileName = 'fileName'
+ const path = 'path'
let expected = ``
let actual = systemUnderTest.generateAttachmentMarkdown(fileName, path, true)
expect(actual).toEqual(expected)
expected = `[${fileName}](${path})`
actual = systemUnderTest.generateAttachmentMarkdown(fileName, path, false)
expect(actual).toEqual(expected)
-})
\ No newline at end of file
+})