Skip to content

Commit 87a0c58

Browse files
committed
Include a missing file and update the docs for @rushstack/eslint-patch.
1 parent 3eaac21 commit 87a0c58

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "",
5+
"type": "none",
6+
"packageName": "@rushstack/eslint-patch"
7+
}
8+
],
9+
"packageName": "@rushstack/eslint-patch",
10+
"email": "[email protected]"
11+
}

eslint/eslint-patch/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,25 @@ This patch works by modifying the ESLint engine so that its module resolver will
5555
the referencing config file, rather than the project folder. The patch is compatible with ESLint 6, 7, and 8.
5656
It also works with any editor extensions that load ESLint as a library.
5757

58-
For an even leaner setup, `@your-company/eslint-config` can provide the patch as its own dependency. See
58+
There is a second patch in this package that removes the restriction on eslint configuration package names.
59+
Similarly to the first, this patch is applied by adding a `require()` call to the top of the **.eslintrc.js**,
60+
for example:
61+
62+
**.eslintrc.js**
63+
```ts
64+
require("@rushstack/eslint-patch/modern-module-resolution");
65+
require("@rushstack/eslint-patch/custom-config-package-names"); // <-- Add this line
66+
67+
// Add your "extends" boilerplate here, for example:
68+
module.exports = {
69+
extends: [
70+
'@your-company/build-rig/profile/default/includes/eslint/node' // Notice the package name does not start with "eslint-config-"
71+
],
72+
parserOptions: { tsconfigRootDir: __dirname }
73+
};
74+
```
75+
76+
For an even leaner setup, `@your-company/eslint-config` can provide the patches as its own dependency. See
5977
[@rushstack/eslint-config](https://www.npmjs.com/package/@rushstack/eslint-config) for a real world example
6078
and recommended approach.
6179

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./lib/custom-config-package-names');

0 commit comments

Comments
 (0)