Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea10ca5

Browse files
authored
docs: 'a .eslint' -> 'an .eslint' for consistency (#16809)
1 parent 3be0748 commit ea10ca5

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ After that, you can run ESLint on any file or directory like this:
5959

6060
## Configuration
6161

62-
After running `npm init @eslint/config`, you'll have a `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
62+
After running `npm init @eslint/config`, you'll have an `.eslintrc` file in your directory. In it, you'll see some rules configured like this:
6363

6464
```json
6565
{

docs/src/use/configure/configuration-files.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ your-project
136136
└── test.js
137137
```
138138

139-
The configuration cascade works based on the location of the file being linted. If there is a `.eslintrc` file in the same directory as the file being linted, then that configuration takes precedence. ESLint then searches up the directory structure, merging any `.eslintrc` files it finds along the way until reaching either a `.eslintrc` file with `root: true` or the root directory.
139+
The configuration cascade works based on the location of the file being linted. If there is an `.eslintrc` file in the same directory as the file being linted, then that configuration takes precedence. ESLint then searches up the directory structure, merging any `.eslintrc` files it finds along the way until reaching either an `.eslintrc` file with `root: true` or the root directory.
140140

141141
In the same way, if there is a `package.json` file in the root directory with an `eslintConfig` field, the configuration it describes is applied to all subdirectories beneath it. However, the configuration described by the `.eslintrc` file in the `tests/` directory overrides conflicting specifications.
142142

@@ -150,7 +150,7 @@ your-project
150150
└── test.js
151151
```
152152

153-
If there is a `.eslintrc` and a `package.json` file found in the same directory, `.eslintrc` takes priority and the `package.json` file is not used.
153+
If there is an `.eslintrc` and a `package.json` file found in the same directory, `.eslintrc` takes priority and the `package.json` file is not used.
154154

155155
By default, ESLint looks for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, place `"root": true` inside the `.eslintrc.*` file or `eslintConfig` field of the `package.json` file or in the `.eslintrc.*` file at your project's root level. ESLint stops looking in parent folders once it finds a configuration with `"root": true`.
156156

docs/src/use/configure/ignore.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ If a config is provided via the `--config` CLI option, the ignore patterns that
3737

3838
## The `.eslintignore` File
3939

40-
You can tell ESLint to ignore specific files and directories by creating a `.eslintignore` file in your project's root directory. The `.eslintignore` file is a plain text file where each line is a glob pattern indicating which paths should be omitted from linting. For example, the following omits all JavaScript files:
40+
You can tell ESLint to ignore specific files and directories by creating an `.eslintignore` file in your project's root directory. The `.eslintignore` file is a plain text file where each line is a glob pattern indicating which paths should be omitted from linting. For example, the following omits all JavaScript files:
4141

4242
```text
4343
**/*.js
4444
```
4545

46-
When ESLint is run, it looks in the current working directory to find a `.eslintignore` file before determining which files to lint. If this file is found, then those preferences are applied when traversing directories. Only one `.eslintignore` file can be used at a time, so `.eslintignore` files other than the one in the current working directory are not used.
46+
When ESLint is run, it looks in the current working directory to find an `.eslintignore` file before determining which files to lint. If this file is found, then those preferences are applied when traversing directories. Only one `.eslintignore` file can be used at a time, so `.eslintignore` files other than the one in the current working directory are not used.
4747

4848
Globs are matched using [node-ignore](https://github.com/kaelzhang/node-ignore), so a number of features are available:
4949

docs/src/use/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ yarn run eslint yourfile.js
6464

6565
**Note:** If you are coming from a version before 1.0.0 please see the [migration guide](migrating-to-1.0.0).
6666

67-
After running `npm init @eslint/config`, you'll have a `.eslintrc.{js,yml,json}` file in your directory. In it, you'll see some rules configured like this:
67+
After running `npm init @eslint/config`, you'll have an `.eslintrc.{js,yml,json}` file in your directory. In it, you'll see some rules configured like this:
6868

6969
```json
7070
{

docs/src/use/migrating-from-jscs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To convert your configuration file, pass in the location of your `.jscs.json` fi
3030
polyjuice --jscs .jscsrc.json > .eslintrc.json
3131
```
3232

33-
This creates a `.eslintrc.json` with the equivalent rules from `.jscsrc.json`.
33+
This creates an `.eslintrc.json` with the equivalent rules from `.jscsrc.json`.
3434

3535
If you have multiple `.jscsrc.json` files, you can pass them all and Polyjuice will combine them into one `.eslintrc.json` file:
3636

docs/src/use/migrating-to-3.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ With ESLint v3.0.0, we are dropping support for Node.js versions prior to 4. Nod
1515

1616
ESLint v3.0.0 now requires that you use a configuration to run. A configuration can be any of the following:
1717

18-
1. A `.eslintrc.js`, `.eslintrc.json`, `.eslintrc.yml`, `.eslintrc.yaml`, or `.eslintrc` file either in your project or home directory.
18+
1. An `.eslintrc.js`, `.eslintrc.json`, `.eslintrc.yml`, `.eslintrc.yaml`, or `.eslintrc` file either in your project or home directory.
1919
2. Configuration options passed on the command line using `--rule` (or to CLIEngine using `rules`).
2020
3. A configuration file passed on the command line using `-c` (or to CLIEngine using `configFile`).
2121
4. A base configuration is provided to CLIEngine using the `baseConfig` option.

docs/src/use/migrating-to-7.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Personal config files have been deprecated since [v6.7.0](https://eslint.org/blo
108108
1. When a project does not have a configuration file present and ESLint loads configuration from `~/.eslintrc.*`.
109109
1. When a project has a configuration file and ESLint ignored a `~/.eslintrc.*` configuration file. This occurs when the `$HOME` directory is an ancestor directory of the project and the project's configuration files doesn't contain `root:true`.
110110

111-
**To address:** Remove `~/.eslintrc.*` configuration files and add a `.eslintrc.*` configuration file to your project. Alternatively, use the `--config` option to use shared config files.
111+
**To address:** Remove `~/.eslintrc.*` configuration files and add an `.eslintrc.*` configuration file to your project. Alternatively, use the `--config` option to use shared config files.
112112

113113
**Related issue(s):** [RFC32](https://github.com/eslint/rfcs/tree/master/designs/2019-deprecating-personal-config/README.md), [#12678](https://github.com/eslint/eslint/pull/12678)
114114

tests/lib/cli-engine/cli-engine.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4433,7 +4433,7 @@ describe("CLIEngine", () => {
44334433
const cwd = getFixturePath("ignored-paths", "configurations");
44344434
const engine = new CLIEngine({ cwd });
44354435

4436-
// a .eslintignore in parent directories includes `*.js`, but don't load it.
4436+
// an .eslintignore in parent directories includes `*.js`, but don't load it.
44374437
assert(!engine.isPathIgnored("foo.js"));
44384438
assert(engine.isPathIgnored("node_modules/foo.js"));
44394439
});
@@ -4593,7 +4593,7 @@ describe("CLIEngine", () => {
45934593
const cwd = getFixturePath("ignored-paths", "no-ignore-file");
45944594
const engine = new CLIEngine({ ignorePath: false, cwd });
45954595

4596-
// a .eslintignore in parent directories includes `*.js`, but don't load it.
4596+
// an .eslintignore in parent directories includes `*.js`, but don't load it.
45974597
assert(!engine.isPathIgnored("foo.js"));
45984598
assert(engine.isPathIgnored("node_modules/foo.js"));
45994599
});

tests/lib/eslint/eslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4400,7 +4400,7 @@ describe("ESLint", () => {
44004400
const cwd = getFixturePath("ignored-paths", "configurations");
44014401
const engine = new ESLint({ cwd });
44024402

4403-
// a .eslintignore in parent directories includes `*.js`, but don't load it.
4403+
// an .eslintignore in parent directories includes `*.js`, but don't load it.
44044404
assert(!await engine.isPathIgnored("foo.js"));
44054405
assert(await engine.isPathIgnored("node_modules/foo.js"));
44064406
});

0 commit comments

Comments
 (0)