From e74b3fb1c6b1d89f856fc4d99b3d534eb823c4c6 Mon Sep 17 00:00:00 2001 From: serut Date: Fri, 7 May 2021 19:53:01 +0200 Subject: [PATCH] [DOC] Add missing Monorepo configuration (#13253) * [DOC] Add missing Monorepo configuration * Update eslint/babel-eslint-parser/README.md Co-authored-by: Federico Ciardi * [DOC] Unify monorepo config file * [DOC] Clean monorepo configuration * [DOC] Monorepo conf when eslint runned by package Co-authored-by: Federico Ciardi --- eslint/babel-eslint-parser/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/eslint/babel-eslint-parser/README.md b/eslint/babel-eslint-parser/README.md index 06c2d7c16f..14c6a86da0 100644 --- a/eslint/babel-eslint-parser/README.md +++ b/eslint/babel-eslint-parser/README.md @@ -91,6 +91,21 @@ module.exports = { }; ``` +**Monorepo configuration** + +This configuration is useful for monorepo, when you are running ESLint on every package and not from the monorepo root folder, as it avoids to repeat the Babel and ESLint configuration on every package. + +```js +module.exports = { + "parser": "@babel/eslint-parser", + "parserOptions": { + "babelOptions": { + "rootMode": "upward" + } + } +} +``` + ### Run ```sh