diff options
author | Steven Guerrero <stephenguerrero43@gmail.com> | 2020-10-06 19:31:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 11:31:36 +1100 |
commit | 82a17dad11f415a3ef31484f3511abc1de5a61ee (patch) | |
tree | d7fa293325f5435533499a50753d6369b96b1407 | |
parent | 21965e8a964a98284bf41f1502cde1c78f20c925 (diff) |
docs: fix deno.land/manual example and clarify linting of code (#7842)
Fixes #7841
-rw-r--r-- | docs/contributing/style_guide.md | 23 | ||||
-rw-r--r-- | docs/examples/read_write_files.md | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/docs/contributing/style_guide.md b/docs/contributing/style_guide.md index 4d93818f0..261a03cc9 100644 --- a/docs/contributing/style_guide.md +++ b/docs/contributing/style_guide.md @@ -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 diff --git a/docs/examples/read_write_files.md b/docs/examples/read_write_files.md index 0840c35d4..a53c2bcbe 100644 --- a/docs/examples/read_write_files.md +++ b/docs/examples/read_write_files.md @@ -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")); |