JetBrains / JetBrains/idea-php-dotenv-plugin

Go to is not working if variable is not access directly (JavaScript)

Open
#44 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
189
Forks
16
PR merge metrics
No merged PRs in 30d

Description

1. Create a `.env` file
```
USER = 'Aaron'
```

2. Create `index.js` file
```
const user = process.env.USER
```
Move caret to `USER` and press Ctrl + B (Declaration or Usages) - the `.env` would be opened, just as expected

3. Now change code to
```
const env = process.env
const user = env.USER
```
Move caret to `USER` and press Ctrl + B (Declaration or Usages) - the caret would be moved to `process.env`. But it should move to `.env` file, just like in point 2, because the code is actually the same

4. Now change code to
```
const {env} = process
const user = env.USER
```
The `USER` is unresolved, Ctrl + B is not working at all. But it should be resolved, and Ctrl + B should work the same as in point 2, because the code is actually the same

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.