Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo/refactor : Eslint warnings + updates with PR #339

Merged
merged 4 commits into from
Apr 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ensureDir("./bar"); // returns a promise
ensureDirSync("./ensureDirSync"); // void
```

### ensure_file
### ensureFile

Ensures that the file exists.
If the file that is requested to be created is in directories
Expand Down
3 changes: 2 additions & 1 deletion prettier/main_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ test(async function testPrettierOptions() {
const file2 = join(testdata, "opts", "2.ts");
const file3 = join(testdata, "opts", "3.md");

const getSourceCode = async f => decoder.decode(await Deno.readFile(f));
const getSourceCode = async (f: string): Promise<string> =>
decoder.decode(await Deno.readFile(f));

await run([...cmd, "--no-semi", file0]);
assertEquals(
Expand Down
2 changes: 1 addition & 1 deletion testing/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { runTests } from "./mod.ts";

async function main() {
async function main(): Promise<void> {
// Testing entire test suite serially
await runTests();
}
Expand Down
4 changes: 2 additions & 2 deletions toml/parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { existsSync } from "../fs/exists.ts";
import { readFileStrSync } from "../fs/read_file_str.ts";
import { deepAssign } from "../util/deep_assign.ts";
import { pad } from "../strings/pad.ts";

Expand Down Expand Up @@ -542,7 +543,6 @@ export function parseFile(filePath: string): object {
if (!existsSync(filePath)) {
throw new Error("File not found");
}
const decoder = new TextDecoder();
const strFile = decoder.decode(Deno.readFileSync(filePath));
const strFile = readFileStrSync(filePath);
return parse(strFile);
}