Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit40dbe2a

Browse files
authored
docs: fix mismatch betweenglobalIgnores() code and text (#19914)
docs: Update paragraphs to reference globalIgnores() helper examples
1 parent76c2340 commit40dbe2a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎docs/src/use/configure/ignore.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ You can configure ESLint to ignore certain files and directories while linting b
2323

2424
##Ignoring Files
2525

26-
In your`eslint.config.js` file,if an`ignores` key is used without any other keys intheconfiguration object, then thepatternsact as global ignores. Here's an example:
26+
In your`eslint.config.js` file,you can usethe`globalIgnores()` helper function to indicatepatternsof files to be ignored. Here's an example:
2727

2828
```js
2929
// eslint.config.js
@@ -43,7 +43,7 @@ You can also ignore files on the command line using [`--ignore-pattern`](../comm
4343

4444
##Ignoring Directories
4545

46-
Ignoring directories works the same way as ignoring files, byplacing a patternin the`ignores` key of a configuration object with no other keys. For example, the following ignores the`.config` directory as a whole (meaning file search will not traverse into it at all):
46+
Ignoring directories works the same way as ignoring files, bypassing a patternto the`globalIgnores()` helper function. For example, the following ignores the`.config` directory as a whole (meaning file search will not traverse into it at all):
4747

4848
```js
4949
// eslint.config.js
@@ -127,8 +127,8 @@ You can also unignore files on the command line using [`--ignore-pattern`](../co
127127

128128
How glob patterns are evaluated depends on where they are located and how they are used:
129129

130-
1. When using`ignores` in an`eslint.config.js` file, glob patterns are evaluated relative to the`eslint.config.js` file.
131-
1. When using`ignores` in an alternate configuration file specified using the[`--config`](../command-line-interface#-c---config) command line option, glob patterns are evaluated relative to the current working directory.
130+
1. When using`globalIgnores()` in an`eslint.config.js` file, glob patterns are evaluated relative to the`eslint.config.js` file.
131+
1. When using`globalIgnores()` in an alternate configuration file specified using the[`--config`](../command-line-interface#-c---config) command line option, glob patterns are evaluated relative to the current working directory.
132132
1. When using[`--ignore-pattern`](../command-line-interface#--ignore-pattern), glob patterns are evaluated relative to the current working directory.
133133

134134
##Name the Global Ignores Config

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp