Skip to content

Commit

Permalink
docs: fix deno.land/manual example and clarify linting of code (denol…
Browse files Browse the repository at this point in the history
  • Loading branch information
Soremwar committed Oct 7, 2020
1 parent 21965e8 commit 82a17da
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions docs/contributing/style_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,29 @@ the first column of the comment. For example:
Code examples should not contain additional comments. It is already inside a
comment. If it needs further comments it is not a good example.

### Resolve linting problems using ESLint directives

Currently, the building process uses ESLint to validate linting problems in the
code. Don't use `deno_lint` directives while working with internal Deno code and
the std library.

What would be:

```typescript
// deno-lint-ignore no-explicit-any
let x: any;
```

Should rather be:

```typescript
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let x: any;
```

This ensures the continuous integration process doesn't fail due to linting
problems.

### Each module should come with a test module.

Every module with public functionality `foo.ts` should come with a test module
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/read_write_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ command.
/**
* write.ts
*/
const write = await Deno.writeTextFile("./hello.txt", "Hello World!");
const write = Deno.writeTextFile("./hello.txt", "Hello World!");

write.then(() => console.log("File written to ./hello.txt"));

Expand Down

0 comments on commit 82a17da

Please sign in to comment.