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

Place elint dependencies in root workspace #754

Open
martinfrances107 opened this issue May 31, 2019 · 0 comments
Open

Place elint dependencies in root workspace #754

martinfrances107 opened this issue May 31, 2019 · 0 comments

Comments

@martinfrances107
Copy link
Contributor

The first rule of yarn club is don't talk about yarn club.

The second rule of yarn club is don't put dependencies in the root work-space.

Indeed if you actually want to override and put dependencies in, then you must do something like

yarn add --ignore-workspace-root-check eslint

From this article .. here is the BUT

https://medium.com/@jsilvax/a-workflow-guide-for-lerna-with-yarn-workspaces-60f97481149d

If you have common dev dependencies, it’s better to specify them in the workspace root package.json. For instance, this can be dependencies like Jest, Husky, Storybook, Eslint, Prettier, etc.

Related to this project here is what I see as a conceptual flaw.

in the root package .. this command

"eslint": "eslint packages/*/src --ext .js,.jsx,.ts,.tsx --max-warnings=0 --fix",

packages/*/src is expanded by the shell script into this list of packages/sub-directories.

admin-ui
components
extension-points
utilities

So formally the linting of files in utilities only works accidentally because of it's sister package admin-ui that contains the eslint dependency.

I intend to come up with a pull request that moves Jest, prettier, storybook and all the eslint packages up into the root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant