-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/45839/ |
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:
|
eslint/babel-eslint-parser/README.md
Outdated
``` | ||
{ | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"babelOptions": { | ||
"rootMode": "upward" | ||
} | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
eslint/babel-eslint-parser/README.md
Outdated
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
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.
Thanks! |
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