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: packages/compat/README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ This package exports the following functions in both ESM and CommonJS format:
33
33
-`fixupRule(rule)` - wraps the given rule in a compatibility layer and returns the result
34
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
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
36
37
37
38
### Fixing Rules
38
39
@@ -142,6 +143,46 @@ module.exports = [
142
143
];
143
144
```
144
145
146
+
### Including Ignore Files
147
+
148
+
If you were using an alternate ignore file in ESLint v8.x, such as using `--ignore-path .gitignore` on the command line, you can include those patterns programmatically in your config file using the `includeIgnoreFile()` function. For example:
**Limitation:** This works without modification when the ignore file is in the same directory as your config file. If the ignore file is in a different directory, you may need to modify the patterns manually.
0 commit comments