You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: decisions/004-types.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,13 +26,13 @@ We do not intend to take over full maintenance of `@types/eslint`. Instead, we w
26
26
27
27
For the ESLint team, this decision will:
28
28
29
-
-Ensure we have control over our type definitions.
30
-
-Allow us to design a more coherent and well-integrated type system in the new `@eslint/core`.
31
-
-Provide a clear path for integrating these types with `@types/eslint`, improving consistency across the ecosystem.
29
+
- Ensure we have control over our type definitions.
30
+
- Allow us to design a more coherent and well-integrated type system in the new `@eslint/core`.
31
+
- Provide a clear path for integrating these types with `@types/eslint`, improving consistency across the ecosystem.
32
32
33
33
For the community, this decision may:
34
34
35
-
-Require adjustments to adapt to the new type definitions in `@eslint/core`.
36
-
-Improve the accuracy and reliability of type definitions used in ESLint-related projects.
35
+
- Require adjustments to adapt to the new type definitions in `@eslint/core`.
36
+
- Improve the accuracy and reliability of type definitions used in ESLint-related projects.
37
37
38
38
We recognize that this may frustrate or anger some contributors, but we believe that this approach balances the need for accurate type definitions with the practicalities of maintaining a complex project like ESLint.
Copy file name to clipboardExpand all lines: packages/compat/README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,10 @@ deno add @eslint/compat
30
30
31
31
This package exports the following functions in both ESM and CommonJS format:
32
32
33
-
-`fixupRule(rule)` - wraps the given rule in a compatibility layer and returns the result
34
-
-`fixupPluginRules(plugin)` - wraps each rule in the given plugin using `fixupRule()` and returns a new object that represents the plugin with the fixed-up rules
35
-
-`fixupConfigRules(configs)` - wraps all plugins found in an array of config objects using `fixupPluginRules()`
36
-
-`includeIgnoreFile(path)` - reads an ignore file (like `.gitignore`) and converts the patterns into the correct format for the config file
33
+
-`fixupRule(rule)` - wraps the given rule in a compatibility layer and returns the result
34
+
-`fixupPluginRules(plugin)` - wraps each rule in the given plugin using `fixupRule()` and returns a new object that represents the plugin with the fixed-up rules
35
+
-`fixupConfigRules(configs)` - wraps all plugins found in an array of config objects using `fixupPluginRules()`
36
+
-`includeIgnoreFile(path)` - reads an ignore file (like `.gitignore`) and converts the patterns into the correct format for the config file
Copy file name to clipboardExpand all lines: packages/config-array/README.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -283,10 +283,10 @@ The config array always returns an object, even if there are no configs matching
283
283
284
284
A few things to keep in mind:
285
285
286
-
-If a filename is not an absolute path, it will be resolved relative to the base path directory.
287
-
-The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified.
288
-
-The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation.
289
-
-A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry that is `*` or ends with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches.
286
+
- If a filename is not an absolute path, it will be resolved relative to the base path directory.
287
+
- The returned config object never has `files`, `ignores`, or `name` properties; the only properties on the object will be the other configuration options specified.
288
+
- The config array caches configs, so subsequent calls to `getConfig()` with the same filename will return in a fast lookup rather than another calculation.
289
+
- A config will only be generated if the filename matches an entry in a `files` key. A config will not be generated without matching a `files` key (configs without a `files` key are only applied when another config with a `files` key is applied; configs without `files` are never applied on their own). Any config with a `files` key entry that is `*` or ends with `/**` or `/*` will only be applied if another entry in the same `files` key matches or another config matches.
A file is considered ignored if any of the following is true:
300
300
301
-
-**It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored.
302
-
-**It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored.
303
-
-**It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
304
-
-**If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
305
-
-**The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
301
+
-**It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/a.js` is considered ignored.
302
+
-**It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/baz/a.js` is considered ignored.
303
+
-**It matches an ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
304
+
-**If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
305
+
-**The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
306
306
307
307
For directories, use the `isDirectoryIgnored()` method and pass in the path of any directory, as in this example:
A directory is considered ignored if any of the following is true:
314
314
315
-
-**It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored.
316
-
-**It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored.
317
-
-**It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
318
-
-**If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
319
-
-**The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
315
+
-**It's parent directory is ignored.** For example, if `foo` is in `ignores`, then `foo/baz` is considered ignored.
316
+
-**It has an ancestor directory that is ignored.** For example, if `foo` is in `ignores`, then `foo/bar/baz/a.js` is considered ignored.
317
+
-**It matches and ignored file pattern.** For example, if `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
318
+
-**If it matches an entry in `files` and also in `ignores`.** For example, if `**/*.js` is in `files` and `**/a.js` is in `ignores`, then `foo/a.js` and `foo/baz/a.js` are considered ignored.
319
+
-**The file is outside the `basePath`.** If the `basePath` is `/usr/me`, then `/foo/a.js` is considered ignored.
320
320
321
321
**Important:** A pattern such as `foo/**` means that `foo` and `foo/` are _not_ ignored whereas `foo/bar` is ignored. If you want to ignore `foo` and all of its subdirectories, use the pattern `foo` or `foo/` in `ignores`.
322
322
@@ -331,9 +331,9 @@ Each `ConfigArray` aggressively caches configuration objects to avoid unnecessar
331
331
332
332
The design of this project was influenced by feedback on the ESLint RFC, and incorporates ideas from:
Copy file name to clipboardExpand all lines: packages/migrate-config/README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ This package aids in the migration of the legacy ESLint configuration file forma
10
10
11
11
This tool currently works well for the following config file formats:
12
12
13
-
-`.eslintrc`
14
-
-`.eslintrc.json`
15
-
-`.eslintrc.yml`
13
+
-`.eslintrc`
14
+
-`.eslintrc.json`
15
+
-`.eslintrc.yml`
16
16
17
17
If you are using a JavaScript configuration file (`.eslintrc.js`, `.eslintrc.cjs`, `.eslintrc.mjs`), this tool currently is only capable of migrating the _evaluated_ configuration. That means any logic you may have inside of the file will be lost. If your configuration file is mostly static, then you'll get a good result; if your configuration file is more complex (using functions, calculating paths, etc.) then this tool will not provide an equivalent configuration file.
0 commit comments