Skip to content

[eslint-plugin-turbo] not picking up Package Configurations #9955

@bitttttten

Description

@bitttttten

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Expected behavior

We have a root turbo.json

// turbo.json
{
  "$schema": "https://turbo.build/schema.json",
  "ui": "tui",
  "globalDependencies": ["**/.env", ".env"],
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "env": [
        "CIRCLE_BRANCH",
        "DEBUG",
        "ABSOLUTE_PUBLIC_PATH",
        "POSTBUILD_DEBUG",
        "PROJECT_NAME",
        "PLATFORM"
      ]
    },
  }
}

Then another turbo.json that lists

// apps/example/turbo.json
{
  "$schema": "https://turbo.build/schema.json",
  "extends": ["//"],
  "tasks": {
    "build": {
      "env": ["TOKEN"]
    }
  }
}

This line should not fail the linter:

const token = process.env.TOKEN
invariant(token, 'TOKEN is not set')

Actual behavior

The linter complains, even though the TOKEN env var is set in the

To Reproduce

Image

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions