From 815abf05741cbb7a197e1eeb67e0d5fcdf5a2b83 Mon Sep 17 00:00:00 2001 From: Steven Hargrove Date: Tue, 6 Feb 2018 23:17:47 -0500 Subject: [PATCH] added docs to describe new settings['import/paths'] behavior --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index ae6b92c04..5b61dfad9 100644 --- a/README.md +++ b/README.md @@ -353,6 +353,18 @@ settings: [`eslint_d`]: https://www.npmjs.com/package/eslint_d [`eslint-loader`]: https://www.npmjs.com/package/eslint-loader +#### `import/paths` + +Settings for `package.json` lookup paths in order to include their defined dependencies in addition to the next-immediate `package.json` relative to the linted file. For example, the [`no-extraneous-dependencies`] rule. + +This is useful in scenarios where your workspace includes several hierarchical `package.json` files. For example, a [lerna](https://github.com/lerna/lerna) monorepo where you've hoisted all your `devDependencies` to the `package.json` at the root of the monorepo. + +```yaml +# .eslintrc.yml +settings: + import/paths: ['.', 'packages/my-dev-utils'] +``` + ## SublimeLinter-eslint SublimeLinter-eslint introduced a change to support `.eslintignore` files