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

[DOC] Add missing Monorepo configuration #13253

merged 5 commits into from May 7, 2021

Conversation

serut
Copy link
Contributor

@serut serut commented May 4, 2021

Q                       A
Fixed Issues? Improve documentation
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass?
Documentation PR Link
Any Dependency Changes?
License MIT

The babel-eslint-parser should provide in its README the simple configuration required on monorepo environment, to avoid to repeat the eslint/babel config on every package

@babel-bot
Copy link
Collaborator

babel-bot commented May 4, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/45839/

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 4, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e3c20da:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

eslint/babel-eslint-parser/README.md Outdated Show resolved Hide resolved
Comment on lines 98 to 107
```
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"babelOptions": {
"rootMode": "upward"
}
}
}
```
Copy link
Member

Choose a reason for hiding this comment

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

I would use a js config example as in other parts of the docs.

Copy link
Contributor Author

@serut serut May 4, 2021

Choose a reason for hiding this comment

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

Yeah you're right, I've tested and .eslintrc.js is working as well as .eslintrc

@fedeci fedeci added area: eslint PR: Docs 📝 A type of pull request used for our changelog categories labels May 4, 2021
@@ -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.

@JLHwung JLHwung merged commit e74b3fb into babel:main May 7, 2021
@JLHwung
Copy link
Contributor

JLHwung commented May 7, 2021

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: eslint outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Docs 📝 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants