Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Add missing Monorepo configuration #13253

Merged
merged 5 commits into from May 7, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions eslint/babel-eslint-parser/README.md
Expand Up @@ -91,6 +91,21 @@ module.exports = {
};
```

**Monorepo configuration**

This configuration is useful for monorepo as it avoids to repeat the configuration of Babel and ESLint on every package.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This configuration is useful for monorepo as it avoids to repeat the configuration of Babel and ESLint on every package.
If you are running ESLint in specific packages and not from the monorepo root, this configuration lets `@babel/eslint-parser` load the Babel configuration defined in the monorepo root.

(You don't need this option if the CWD is the monorepo root when running ESLint)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Maybe :
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 configuration of Babel and ESLint on every package.


```js
module.exports = {
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"rootMode": "upward"
}
}
}
```

### Run

```sh
Expand Down