turbo icon indicating copy to clipboard operation
turbo copied to clipboard

[turborepo] eslint-plugin-turbo: `dotEnv` support differs between workspace setting and root setting

Open konomae opened this issue 1 year ago • 3 comments

What version of Turborepo are you using?

1.10.6

What package manager are you using / does the bug impact?

npm / pnpm

What operating system are you using?

Mac

Describe the Bug

Sample repository: https://github.com/konomae/turbo-lint-repro-202306

In the main branch, dotEnv is specified in the root configuration, but an error occurs.

npm exec eslint .

/Users/user/turbo-lint-repro/apps/myapp/index.js
  1:13  error  HELLO is not listed as a dependency in the root turbo.json or workspace (apps/myapp) turbo.json  turbo/no-undeclared-env-vars

✖ 1 problem (1 error, 0 warnings)

In the use-workspace-config branch, dotEnv is specified in the workspace configuration, no errors occur.

npm exec eslint .
# no errors

Expected Behavior

Behavior should be consistent. Perhaps the latter (no errors) is preferable.

To Reproduce

Sample repository: https://github.com/konomae/turbo-lint-repro-202306

Reproduction Repo

No response

TURBO-2629

konomae avatar Jun 27 '23 04:06 konomae