Skip to content

Commit f68e547

Browse files
committed
fix(renderer): fix usage of fixText
1 parent b252b0d commit f68e547

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Install with [npm](https://www.npmjs.com/):
1616
## Usage
1717

1818
npm install
19-
npm run bootstrap
19+
npm run prepare
2020
npm run watch
2121
npm run electron
2222

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"lint": "eslint src/ test/ --cache",
1919
"lint:fix": "eslint --fix src/ test/ --cache",
2020
"test": "mocha test/",
21-
"bootstrap": "lerna bootstrap && install-app-deps",
21+
"prepare": "lerna bootstrap && install-app-deps",
2222
"start": "npm-run-all clean --parallel watch:* electron",
2323
"electron": "electron .",
2424
"build:js": "cross-env NODE_ENV=production webpack --progress -p",

src/renderer/infra/textlint/TextlintAPI.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ export default class TextlintAPI {
2323
* @returns {Promise.<TextLintMessage[]>}}
2424
*/
2525
lintText(text, ext = ".md") {
26-
return ipcPromise.send(Key.lintText, {text, ext}).then(messages => {
27-
console.log(messages);
28-
return messages;
29-
});
26+
return ipcPromise.send(Key.lintText, {text, ext});
3027
}
3128

3229
/**
@@ -35,9 +32,7 @@ export default class TextlintAPI {
3532
* @returns {Promise.<TextLintFixResult>}}
3633
*/
3734
fixText(text, ext = ".md") {
38-
return ipcPromise.send(Key.fixText, {text, ext}).then(results => {
39-
return results[0];
40-
});
35+
return ipcPromise.send(Key.fixText, {text, ext});
4136
}
4237

4338
_flattenResultToMessages(results) {

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3845,7 +3845,7 @@ lcid@^1.0.0:
38453845
dependencies:
38463846
invert-kv "^1.0.0"
38473847

3848-
lerna@^2.0.0-beta.34:
3848+
38493849
version "2.0.0-beta.34"
38503850
resolved "https://registry.yarnpkg.com/lerna/-/lerna-2.0.0-beta.34.tgz#c6e0103212f9acc8491a56c283b9ef6ba7717ea2"
38513851
dependencies:

0 commit comments

Comments
 (0)