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

Fix English in linter.md #479

Merged
merged 2 commits into from
May 28, 2024
Merged
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
31 changes: 16 additions & 15 deletions runtime/manual/tools/linter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ For more detail, run `deno lint --help`.

## Available rules

For a complete list of supported rules visit
For a complete list of supported rules, visit
[the deno_lint rule documentation](https://lint.deno.land).

## Ignore directives

### Files

To ignore whole file `// deno-lint-ignore-file` directive should placed at the
top of the file:
To ignore the whole file, a `// deno-lint-ignore-file` directive should placed
at the top of the file:

```ts
// deno-lint-ignore-file
Expand All @@ -47,7 +47,7 @@ function foo(): any {
}
```

Ignore directive must be placed before first statement or declaration:
The ignore directive must be placed before the first statement or declaration:

```ts
// Copyright 2020 the Deno authors. All rights reserved. MIT license.
Expand All @@ -65,7 +65,7 @@ function foo(): any {
}
```

You can also ignore certain diagnostics in the whole file
You can also ignore certain diagnostics in the whole file:

```ts
// deno-lint-ignore-file no-explicit-any no-empty
Expand All @@ -77,8 +77,9 @@ function foo(): any {

### Diagnostics

To ignore certain diagnostic `// deno-lint-ignore <codes...>` directive should
be placed before offending line. Specifying ignored rule name is required:
To ignore certain diagnostics, the `// deno-lint-ignore <rules...>` directive
should be placed before the targeted line. Specifying the ignored rule name is
required:

```ts
// deno-lint-ignore no-explicit-any
Expand All @@ -103,16 +104,16 @@ function foo(): any {

## Configuration

Starting with Deno v1.14 a linter can be customized using either
[a configuration file](../getting_started/configuration_file.md) or following
CLI flags:
Starting with Deno v1.14, the linter can be customized using either
[a configuration file](../getting_started/configuration_file.md) or the
following CLI flags:

- `--rules-tags` - List of tag names that will be run. Empty list disables all
tags and will only use rules from `include`. Defaults to "recommended".
- `--rules-tags` - List of rule names that will be run. Empty list disables all
rules and will only use rules from `rules-include`. Defaults to "recommended".

- `--rules-exclude` - List of rule names that will be excluded from configured
tag sets. Even if the same rule is in `include` it will be excluded; in other
words, `--rules-exclude` has higher precedence over `--rules-include`.
rule sets. Even if the same rule is in `include`, it will be excluded; in
other words, `--rules-exclude` has higher precedence over `--rules-include`.

- `--rules-include` - List of rule names that will be run. If the same rule is
in `exclude` it will be excluded.
in `rules-exclude`, it will be excluded.
Loading