From 150b6e61508d2877876a024af4c1e87eae37e06e Mon Sep 17 00:00:00 2001 From: Ben Perlmutter Date: Tue, 7 Feb 2023 21:56:38 -0500 Subject: [PATCH] clarify scoped module example --- docs/src/extend/shareable-configs.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/extend/shareable-configs.md b/docs/src/extend/shareable-configs.md index fa73ad0e4e3..28a9bb8be77 100644 --- a/docs/src/extend/shareable-configs.md +++ b/docs/src/extend/shareable-configs.md @@ -108,7 +108,7 @@ You can also omit the `eslint-config` and it is automatically assumed by ESLint: } ``` -The module name can also be customized, just note that when using [scoped modules](https://docs.npmjs.com/misc/scope) you cannot omit the `eslint-config-` prefix. Doing so results in package naming conflicts, and thus often in resolution errors. For example, if you have a package named `@scope/eslint-config-myconfig`, the configuration must be specified as: +The module name can also be customized. For example, if you have a package named `@scope/eslint-config-myconfig`, the configuration can be specified as: ```json { @@ -116,6 +116,14 @@ The module name can also be customized, just note that when using [scoped module } ``` +You could also omit `eslint-config` to specify the configuration as: + +```json +{ + "extends": "@scope/myconfig" +} +``` + ### Overriding Settings from Shareable Configs You can override settings from the shareable config by adding them directly into your `.eslintrc` file.